Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -686,12 +686,14 @@ (define (db:get-run-stats db) (let ((totals (make-hash-table)) (res '())) (sqlite3:for-each-row (lambda (runname state count) - (hash-table-set! totals state (+ (hash-table-ref/default totals state 0) count)) - (set! res (cons (list runname state count) res))) + (let* ((stateparts (string-split state "/")) + (newstate (conc (car stateparts) "\n" (cadr stateparts)))) + (hash-table-set! totals newstate (+ (hash-table-ref/default totals newstate 0) count)) + (set! res (cons (list runname newstate count) res)))) db "SELECT runname,t.state||'/'||t.status AS s,count(t.id) FROM runs AS r INNER JOIN tests AS t ON r.id=t.run_id GROUP BY s,runname;" ) (for-each (lambda (state) (set! res (cons (list "Totals" state (hash-table-ref totals state)) res))) (hash-table-keys totals)) Index: dcommon.scm ================================================================== --- dcommon.scm +++ dcommon.scm @@ -43,11 +43,11 @@ #:numlin-visible (length key-vals) #:click-cb (lambda (obj lin col status) (print "obj: " obj " lin: " lin " col: " col " status: " status))))) (iup:attribute-set! keys-matrix "0:0" "Run Keys") (iup:attribute-set! keys-matrix "0:1" "Key Name") - (iup:attribute-set! keys-matrix "WIDTH1" "100") + ;; (iup:attribute-set! keys-matrix "WIDTH1" "100") ;; fill in keys (for-each (lambda (var) ;; (iup:attribute-set! keys-matrix "ADDLIN" (conc curr-row-num)) (iup:attribute-set! keys-matrix (conc curr-row-num ":0") curr-row-num) @@ -68,11 +68,11 @@ #:numcol-visible 1 #:numlin-visible (length key-vals) #:scrollbar "YES"))) (iup:attribute-set! section-matrix "0:0" varcolname) (iup:attribute-set! section-matrix "0:1" valcolname) - (iup:attribute-set! section-matrix "WIDTH1" "300") + (iup:attribute-set! section-matrix "WIDTH1" "200") ;; fill in keys (for-each (lambda (var) ;; (iup:attribute-set! keys-matrix "ADDLIN" (conc curr-row-num)) (iup:attribute-set! section-matrix (conc curr-row-num ":0") var) @@ -94,11 +94,11 @@ #:expand "YES" ;; "HORIZONTAL" #:numcol 1 #:numlin 3 #:numcol-visible 1 #:numlin-visible 3))) - (iup:attribute-set! general-matrix "WIDTH1" "300") + (iup:attribute-set! general-matrix "WIDTH1" "200") (iup:attribute-set! general-matrix "0:1" "About this Megatest area") ;; User (this is not always obvious - it is common to run as a different user (iup:attribute-set! general-matrix "1:0" "User") (iup:attribute-set! general-matrix "1:1" (current-user-name)) ;; Megatest area @@ -114,11 +114,11 @@ (indices (common:sparse-list-generate-index run-stats)) ;; proc: set-cell)) (max-row (apply max (map cadr (car indices)))) (max-col (apply max (map cadr (cadr indices)))) (max-visible (max (- *num-tests* 15) 3)) (stats-matrix (iup:matrix - #:alignment1 "ALEFT" + ;; #:alignment1 "ALEFT" #:expand "YES" ;; "HORIZONTAL" #:numcol max-col #:numlin (if (< max-row max-visible) max-visible max-row) ;; min of 20 #:numcol-visible max-col #:numlin-visible (if (> max-row max-visible) max-visible max-row))) @@ -140,10 +140,11 @@ (set! numcols cnum))) (debug:print 0 "Setting row " rnum ", col " cnum " to " v) (iup:attribute-set! stats-matrix (conc rnum ":" cnum) v))) (row-indices (car indices)) (col-indices (cadr indices))) + (iup:attribute-set! stats-matrix "WIDTHDEF" "40") ;; Row labels (for-each (lambda (ind) (let ((name (car ind)) (num (cadr ind))) (iup:attribute-set! stats-matrix (conc num ":0") name))) @@ -162,11 +163,11 @@ (row-num (cadr (assoc row-name row-indices))) (col-num (cadr (assoc col-name col-indices)))) (iup:attribute-set! stats-matrix (conc row-num ":" col-num) value))) run-stats) (iup:vbox - (iup:label "Run statistics" #:expand "HORIZONTAL") + (iup:label "Run statistics" #:expand "HORIZONTAL") stats-matrix))) ;; The main menu (define (dcommon:main-menu) (iup:menu ;; a menu is a special attribute to a dialog (think Gnome putting the menu at screen top)