Overview
Comment: | Added collapse/expand for itemized tests and completed alternative sort methods |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.55 |
Files: | files | file ages | folders |
SHA1: |
48f16932ad0af60da9187e508dfa79b8 |
User & Date: | mrwellan on 2013-08-19 15:42:22 |
Other Links: | branch diff | manifest | tags |
Context
2013-08-19
| ||
15:58 | Added collapse/expand for itemized tests and completed alternative sort methods check-in: b50d150110 user: mrwellan tags: v1.55 | |
15:42 | Added collapse/expand for itemized tests and completed alternative sort methods check-in: 48f16932ad user: mrwellan tags: v1.55 | |
14:20 | Added REMOTEHOSTSTART and LAUNCHED to SKIP critera as analogs to RUNNING check-in: 70f2768e25 user: mrwellan tags: v1.55 | |
Changes
Modified dashboard.scm from [1cd65f8047] to [ff304606c8].
︙ | ︙ | |||
126 127 128 129 130 131 132 133 134 135 136 137 138 139 | (define *last-update* (current-seconds)) (define *last-db-update-time* 0) (define *please-update-buttons* #t) (define *delayed-update* 0) (define *update-is-running* #f) (define *update-mutex* (make-mutex)) (define *num-tests* 15) (define *start-run-offset* 0) (define *start-test-offset* 0) (define *examine-test-dat* (make-hash-table)) (define *exit-started* #f) (define *status-ignore-hash* (make-hash-table)) (define *state-ignore-hash* (make-hash-table)) | > | 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 | (define *last-update* (current-seconds)) (define *last-db-update-time* 0) (define *please-update-buttons* #t) (define *delayed-update* 0) (define *update-is-running* #f) (define *update-mutex* (make-mutex)) (define *all-item-test-names* '()) (define *num-tests* 15) (define *start-run-offset* 0) (define *start-test-offset* 0) (define *examine-test-dat* (make-hash-table)) (define *exit-started* #f) (define *status-ignore-hash* (make-hash-table)) (define *state-ignore-hash* (make-hash-table)) |
︙ | ︙ | |||
207 208 209 210 211 212 213 | ;; trim runs to only those that are changing often here ;; (for-each (lambda (run) (let* ((run-id (db:get-value-by-header run header "id")) (sort-info (vector-ref *tests-sort-options* *tests-sort-reverse*)) (sort-by (vector-ref sort-info 1)) (sort-order (vector-ref sort-info 2)) | | > > | 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 | ;; trim runs to only those that are changing often here ;; (for-each (lambda (run) (let* ((run-id (db:get-value-by-header run header "id")) (sort-info (vector-ref *tests-sort-options* *tests-sort-reverse*)) (sort-by (vector-ref sort-info 1)) (sort-order (vector-ref sort-info 2)) (tmptests (mt:get-tests-for-run run-id testnamepatt states statuses sort-by: sort-by sort-order: sort-order)) ;; NOTE: bubble-up also sets the global *all-item-test-names* (tests (bubble-up tmptests)) (key-vals (cdb:remote-run db:get-key-vals #f run-id))) ;; Not sure this is needed? (set! referenced-run-ids (cons run-id referenced-run-ids)) (if (> (length tests) maxtests) (set! maxtests (length tests))) (if (or (not *hide-empty-runs*) ;; this reduces the data burden when set (not (null? tests))) |
︙ | ︙ | |||
271 272 273 274 275 276 277 | ((string-match blank-line-rx x) #f) ((equal? x basetname) #t) ((hash-table-ref/default *collapsed* basetname #f) ;(print "Removing " basetname " from items") #f) (else #t)))) inlst)) | | < < < < < < < < < < < < < < < < < < < < < < < < < < | | 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 | ((string-match blank-line-rx x) #f) ((equal? x basetname) #t) ((hash-table-ref/default *collapsed* basetname #f) ;(print "Removing " basetname " from items") #f) (else #t)))) inlst)) (vlst (run-item-name->vectors newlst))) (map (lambda (x) (if (equal? (vector-ref x 1) "") (vector-ref x 0) (conc (vector-ref x 0) "(" (vector-ref x 1) ")"))) vlst))) (define (update-labels uidat) (let* ((rown 0) (keycol (dboard:uidat-get-keycol uidat)) (lftcol (dboard:uidat-get-lftcol uidat)) (numcols (vector-length lftcol)) (maxn (- numcols 1)) |
︙ | ︙ | |||
330 331 332 333 334 335 336 | (if (> (length parts) 1)(conc " " (car (string-split (cadr parts) ")"))) newval)))) (vector-set! keycol i newval) (iup:attribute-set! lbl "TITLE" munged-val))) (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))))))) | | > | | > > > | > > > > | > > > > | > > > > | | | < < | < < | | | < < < < < < | 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 | (if (> (length parts) 1)(conc " " (car (string-split (cadr parts) ")"))) newval)))) (vector-set! keycol i newval) (iup:attribute-set! lbl "TITLE" munged-val))) (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))))))) ;; Bubble up the top tests to above the items, collect the items underneath ;; all while preserving the sort order from the SQL query as best as possible. ;; (define (bubble-up test-dats) (let* ((tnames '()) ;; list of names used to reserve order (tests (make-hash-table))) ;; hash of lists, used to build as we go (for-each (lambda (testdat) (let* ((tname (db:test-get-testname testdat)) (ipath (db:test-get-item-path testdat)) (seen (hash-table-ref/default tests tname #f))) (if (not seen)(set! tnames (append tnames (list tname)))) (if (equal? ipath "") ;; This a top level, prepend it (hash-table-set! tests tname (cons testdat (hash-table-ref/default tests tname '()))) ;; This is item, append it (hash-table-set! tests tname (append (hash-table-ref/default tests tname '())(list testdat)))))) test-dats) ;; Set all tests with items (set! *all-item-test-names* (filter (lambda (tname) (> (length (hash-table-ref tests tname)) 1)) tnames)) (let loop ((hed (car tnames)) (tal (cdr tnames)) (res '())) (let ((newres (append res (hash-table-ref tests hed)))) (if (null? tal) newres (loop (car tal)(cdr tal) newres)))))) (define (update-buttons uidat numruns numtests) (let* ((runs (if (> (length *allruns*) numruns) (take-right *allruns* numruns) (pad-list *allruns* numruns))) (lftcol (dboard:uidat-get-lftcol uidat)) (tableheader (dboard:uidat-get-header uidat)) |
︙ | ︙ | |||
1154 1155 1156 1157 1158 1159 1160 | (iup:button "HideEmpty" #:action (lambda (obj) (set! *hide-empty-runs* (not *hide-empty-runs*)) (iup:attribute-set! obj "TITLE" (if *hide-empty-runs* "+Hide" "-Hide")) (mark-for-update)))) (iup:hbox (iup:button "Quit" #:action (lambda (obj)(if *db* (sqlite3:finalize! *db*))(exit))) (iup:button "Refresh" #:action (lambda (obj) | | | | > > | > > > > | < < > > > > | 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 | (iup:button "HideEmpty" #:action (lambda (obj) (set! *hide-empty-runs* (not *hide-empty-runs*)) (iup:attribute-set! obj "TITLE" (if *hide-empty-runs* "+Hide" "-Hide")) (mark-for-update)))) (iup:hbox (iup:button "Quit" #:action (lambda (obj)(if *db* (sqlite3:finalize! *db*))(exit))) (iup:button "Refresh" #:action (lambda (obj) (mark-for-update))) (iup:button "Collapse" #:action (lambda (obj) (let ((myname (iup:attribute obj "TITLE"))) (if (equal? myname "Collapse") (begin (for-each (lambda (tname) (hash-table-set! *collapsed* tname #t)) *all-item-test-names*) (iup:attribute-set! obj "TITLE" "Expand")) (begin (for-each (lambda (tname) (hash-table-delete! *collapsed* tname)) (hash-table-keys *collapsed*)) (iup:attribute-set! obj "TITLE" "Collapse")))) (mark-for-update)))))) (iup:frame #:title "hide" (iup:vbox (apply iup:hbox (map (lambda (status) (iup:toggle status #:action (lambda (obj val) |
︙ | ︙ |