Megatest

Diff
Login

Differences From Artifact [628c78d614]:

To Artifact [49be3b47ca]:


19
20
21
22
23
24
25








26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
(define (gutils:colors-similar? color1 color2)
  (let* ((c1 (map string->number (string-split color1)))
	 (c2 (map string->number (string-split color2)))
	 (delta (map (lambda (a b)(abs (- a b))) c1 c2)))
    (null? (filter (lambda (x)(> x 3)) delta))))

(define (gutils:get-color-for-state-status state status);; #!key (get-label #f))








  ;; ((if get-label cadr car)
  (case (string->symbol state)
    ((COMPLETED) ;; ARCHIVED)
     (case (string->symbol status)
       ((PASS)        (list "70  249 73" status))
       ((WARN WAIVED) (list "255 172 13" status))
       ((SKIP)        (list "230 230 0" status))
       (else (list "253 33 49" status))))
    ((ARCHIVED)
     (case (string->symbol status)
       ((PASS)        (list "70  170 73" status))
       ((WARN WAIVED) (list "200 130 13" status))
       ((SKIP)        (list "180 180 0" status))
       (else (list "180 33 49" status))))
    ;;      (if (equal? status "PASS")
    ;;	  '("70 249 73" "PASS")
    ;;	  (if (or (equal? status "WARN")
    ;;		  (equal? status "WAIVED"))
    ;;	      (list "255 172 13" status)
    ;;	      (list "223 33 49"  status)))) ;; greenish orangeish redish
    ((LAUNCHED)         (list "101 123 142"  state))
    ((CHECK)            (list "255 100 50"   state))
    ((REMOTEHOSTSTART)  (list "50 130 195"   state))
    ((RUNNING)          (list "9 131 232"    state))
    ((KILLREQ)          (list "39 82 206"    state))
    ((KILLED)           (list "234 101 17"   state))
    ((NOT_STARTED)      (list "240 240 240"  state))
    (else               (list "192 192 192"  state))))








>
>
>
>
>
>
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
(define (gutils:colors-similar? color1 color2)
  (let* ((c1 (map string->number (string-split color1)))
	 (c2 (map string->number (string-split color2)))
	 (delta (map (lambda (a b)(abs (- a b))) c1 c2)))
    (null? (filter (lambda (x)(> x 3)) delta))))

(define (gutils:get-color-for-state-status state status);; #!key (get-label #f))
  (cond
   ((not (string? state))
    (debug:print 0 "ERROR: gutils:get-color-for-state-status recieved non-string state " state)
    (list "253 33 49" status))
   ((not (string? status))
    (debug:print 0 "ERROR: gutils:get-color-for-state-status recieved non-string status " status)
    (list "253 33 49" status))
   (else
    ;; ((if get-label cadr car)
    (case (string->symbol state)
      ((COMPLETED) ;; ARCHIVED)
       (case (string->symbol status)
	 ((PASS)        (list "70  249 73" status))
	 ((WARN WAIVED) (list "255 172 13" status))
	 ((SKIP)        (list "230 230 0" status))
	 (else (list "253 33 49" status))))
      ((ARCHIVED)
       (case (string->symbol status)
	 ((PASS)        (list "70  170 73" status))
	 ((WARN WAIVED) (list "200 130 13" status))
	 ((SKIP)        (list "180 180 0" status))
	 (else (list "180 33 49" status))))
      ;;      (if (equal? status "PASS")
      ;;	  '("70 249 73" "PASS")
      ;;	  (if (or (equal? status "WARN")
      ;;		  (equal? status "WAIVED"))
      ;;	      (list "255 172 13" status)
      ;;	      (list "223 33 49"  status)))) ;; greenish orangeish redish
      ((LAUNCHED)         (list "101 123 142"  state))
      ((CHECK)            (list "255 100 50"   state))
      ((REMOTEHOSTSTART)  (list "50 130 195"   state))
      ((RUNNING)          (list "9 131 232"    state))
      ((KILLREQ)          (list "39 82 206"    state))
      ((KILLED)           (list "234 101 17"   state))
      ((NOT_STARTED)      (list "240 240 240"  state))
      (else               (list "192 192 192"  state))))))