Megatest

Check-in [955fb16781]
Login
Overview
Comment:Added a color to hex function
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | matt-db-sync
Files: files | file ages | folders
SHA1: 955fb1678160067a48b819d1f4c4e081decc3316
User & Date: mrwellan on 2016-10-28 18:04:05
Other Links: branch diff | manifest | tags
Context
2016-10-31
09:55
Bring in working parts of cached-db to v1.62 check-in: efa4004401 user: mrwellan tags: v1.62-side
2016-10-30
22:33
Migrated remaining calls in dashboard to use cache db and fixed issue with db:get-db failing to pass through a pair. check-in: 92a15e9c56 user: matt tags: matt-db-sync
2016-10-28
18:04
Added a color to hex function check-in: 955fb16781 user: mrwellan tags: matt-db-sync
15:15
Partial fixes for sync from multi-db to megatest.db check-in: d1e28c26f9 user: mrwellan tags: matt-db-sync
Changes

Modified common.scm from [5539c56e2c] to [5849a40b64].

1238
1239
1240
1241
1242
1243
1244








1245
1246
1247
1248
1249
1250
1251
;;     ((CHECK)            "255 100 50")
;;     ((REMOTEHOSTSTART)  "50  130 195")
;;     ((RUNNING)          "9   131 232")
;;     ((KILLREQ)          "39  82  206")
;;     ((KILLED)           "234 101 17")
;;     ((NOT_STARTED)      "240 240 240")
;;     (else               "192 192 192")))









(define (common:get-color-from-status status)
  (cond
   ((equal? status "PASS")    "green")
   ((equal? status "FAIL")    "red")
   ((equal? status "WARN")    "orange")
   ((equal? status "KILLED")  "orange")







>
>
>
>
>
>
>
>







1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
;;     ((CHECK)            "255 100 50")
;;     ((REMOTEHOSTSTART)  "50  130 195")
;;     ((RUNNING)          "9   131 232")
;;     ((KILLREQ)          "39  82  206")
;;     ((KILLED)           "234 101 17")
;;     ((NOT_STARTED)      "240 240 240")
;;     (else               "192 192 192")))

(define (common:iup-color->rgb-hex instr)
  (string-intersperse 
   (map (lambda (x)
          (number->string x 16))
        (map string->number
             (string-split instr)))
   "/"))

(define (common:get-color-from-status status)
  (cond
   ((equal? status "PASS")    "green")
   ((equal? status "FAIL")    "red")
   ((equal? status "WARN")    "orange")
   ((equal? status "KILLED")  "orange")