Index: dashboard-tests.scm ================================================================== --- dashboard-tests.scm +++ dashboard-tests.scm @@ -203,11 +203,12 @@ (logfile "/this/dir/better/not/exist") (rundir logfile) (testfullname (if testdat (db:test-get-fullname testdat) "Gathering data ...")) (viewlog (lambda (x) (if (file-exists? logfile) - (system (conc "firefox " logfile "&")) + ;(system (conc "firefox " logfile "&")) + (iup:send-url logfile) (message-window (conc "File " logfile " not found"))))) (xterm (lambda (x) (if (directory-exists? rundir) (let ((shell (if (get-environment-variable "SHELL") (conc "-e " (get-environment-variable "SHELL")) Index: dashboard.scm ================================================================== --- dashboard.scm +++ dashboard.scm @@ -97,10 +97,58 @@ (else 1))) (define uidat #f) ;; (megatest-dashboard) +;(define img1 (iup:image/palette 16 16 (u8vector->blob (u8vector +; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 +; 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 +; 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 +; 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 +; 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 +; 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 +; 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 +; 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 +; 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 +; 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 +; 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 +; 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 +; 2 2 2 0 2 0 2 0 2 2 0 2 2 2 0 0 +; 2 2 2 0 2 0 0 2 0 0 2 0 2 0 2 2 +; 2 2 2 0 2 0 2 2 0 2 2 0 2 2 2 2 +; 2 2 2 0 2 0 2 2 0 2 2 0 2 2 0 0 +; 2 2 2 0 2 0 2 2 0 2 2 0 2 0 2 1)))) +; +;(define img2 (iup:image/palette 16 16 (u8vector->blob (u8vector +; 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 +; 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 +; 2 2 2 2 2 2 2 2 2 2 2 2 2 1 1 1 +; 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 +; 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 +; 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 +; 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 +; 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 +; 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 +; 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 +; 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 +; 2 2 2 0 2 2 2 2 2 2 2 2 2 2 2 2 +; 2 2 2 0 2 0 2 0 2 2 0 2 2 2 0 0 +; 2 2 2 0 2 0 0 2 0 0 2 0 2 0 2 2 +; 2 2 2 0 2 0 2 2 0 2 2 0 2 2 2 2 +; 2 2 2 0 2 0 2 2 0 2 2 0 2 2 0 0 +; 2 2 2 0 2 0 2 2 0 2 2 0 2 0 2 1)))) +; +;(iup:handle-name-set! img1 "img1") +;(iup:attribute-set! img1 "0" "0 0 0") +;(iup:attribute-set! img1 "1" "BGCOLOR") +;(iup:attribute-set! img1 "2" "255 0 0") +; +;(iup:handle-name-set! img2 "img2") +;(iup:attribute-set! img2 "0" "0 0 0") +;(iup:attribute-set! img2 "1" "BGCOLOR") +;(iup:attribute-set! img2 "2" "255 0 0") + (define (message-window msg) (iup:show (iup:dialog (iup:vbox (iup:label msg #:margin "40x40"))))) @@ -152,12 +200,16 @@ (fulltestname (iup:attribute btn "TITLE")) (parts (string-split fulltestname "(")) (basetestname (if (null? parts) "" (car parts)))) ;(print "Toggling " basetestname " currently " (hash-table-ref/default *collapsed* basetestname #f)) (if (hash-table-ref/default *collapsed* basetestname #f) - (hash-table-delete! *collapsed* basetestname) - (hash-table-set! *collapsed* basetestname #t)))) + (begin + ;(iup:attribute-set! btn "FGCOLOR" "0 0 0") + (hash-table-delete! *collapsed* basetestname)) + (begin + ;(iup:attribute-set! btn "FGCOLOR" "0 192 192") + (hash-table-set! *collapsed* basetestname #t))))) (define blank-line-rx (regexp "^\\s*$")) (define (collapse-rows inlst) (let ((newlst (filter (lambda (x) @@ -204,10 +256,11 @@ (let* ((lbl (vector-ref lftcol i)) (oldval (iup:attribute lbl "TITLE")) (newval (vector-ref allvals i))) (if (not (equal? oldval newval)) (iup:attribute-set! lbl "TITLE" newval)) + (iup:attribute-set! lbl "FGCOLOR" (if (hash-table-ref/default *collapsed* newval #f) "0 112 112" "0 0 0")) (if (< i maxn) (loop (+ i 1))))))) (define (get-color-for-state-status state status) (case (string->symbol state) @@ -372,10 +425,12 @@ ;; now lftlst will be an hbox with the test keys and the test name labels (set! lftlst (append lftlst (list (apply iup:vbox (reverse res)))))) (else (let ((labl (iup:button "" #:flat "YES" + ; #:image img1 + ; #:impress img2 #:size "100x15" #:fontsize "10" #:action (lambda (obj) (toggle-hide testnum))))) ;; (iup:attribute obj "TITLE")))) (vector-set! lftcol testnum labl)