Index: multi-dboard.scm ================================================================== --- multi-dboard.scm +++ multi-dboard.scm @@ -156,11 +156,11 @@ cfgdat ;; data from ~/.megatest/.dat areas ;; hash of areaname -> area-rec current-window-id ;; current-tab-id ;; update-needed ;; flag to indicate that the tab pointed to by current tab id needs refreshing immediately - tab-ids ;; hash of tab-id -> areaname + tabs ;; hash of tab-id -> areaname (??) should be of type "tab" ) ;; all the components of an area display, all fits into a tab but ;; parts may be swapped in/out as needed ;; @@ -262,19 +262,35 @@ ;; (define (dboard:general-updater con port) (for-each (lambda (window-id) (print "Processing for window-id " window-id) - (let* ((window-dat (hash-table-ref *windows* window-id)) - (areas (data-areas window-dat))) + (let* ((window-dat (hash-table-ref *windows* window-id)) + (areas (data-areas window-dat)) + (tabs (data-tabs window-dat)) + (tab-ids (hash-table-keys tabs)) + (current-tab (if (null? tab-ids) + #f + (hash-table-ref tabs (car tab-ids)))) + (current-tree (if (null? tab-ids) #f (tab-tree current-tab)))) ;; now for each area in the window gather the data (for-each (lambda (area-name) (print "Processing for area-name " area-name) - (let ((area-dat (hash-table-ref areas area-name))) + (let* ((area-dat (hash-table-ref areas area-name)) + (runs (areadat-runs area-dat))) (print "Processing " area-dat " for area-name " area-name) - (areadb:populate-run-info area-dat))) + (areadb:populate-run-info area-dat) + (for-each + (lambda (run-id) + (let* ((run (hash-table-ref runs run-id)) + (target (rundat-target run)) + (runname (rundat-runname run))) + (if current-tree + (tree:add-node current-tree area-name (append (string-split target "/")(list runname)))) + )) + (hash-table-keys runs)))) (hash-table-keys areas)))) (hash-table-keys *windows*))) ;;====================================================================== ;; D A S H B O A R D D B @@ -424,11 +440,11 @@ #f ;; the run-id (make-hash-table) ;; run-id -> test-id, for current test id "" ))) (hash-table-set! (data-areas data) aname area-dat) ;; dboard-dat) - (hash-table-set! (data-tab-ids data) window-id dboard-dat) + (hash-table-set! (data-tabs data) window-id dboard-dat) (tab-tree-set! dboard-dat tb) (tab-matrix-set! dboard-dat ad) (iup:split #:value 200 tb ad))) @@ -450,16 +466,16 @@ #:tabchangepos-cb (lambda (obj curr prev) (data-current-tab-id-set! data curr) (data-update-needed-set! data #t) (print "Tab is: " curr ", prev was " prev)) area-panels)) - (tab-ids (data-tab-ids data))) + (tabs (data-tabs data))) (if (not (null? area-names)) (let loop ((index 0) (hed (car area-names)) (tal (cdr area-names))) - (hash-table-set! tab-ids index hed) + ;; (hash-table-set! tabs index hed) (debug:print 0 "Adding area " hed " with index " index " to dashboard") (iup:attribute-set! tabtop (conc "TABTITLE" index) hed) (if (not (null? tal)) (loop (+ index 1)(car tal)(cdr tal))))) tabtop))))