@@ -18,19 +18,17 @@ ;; ;;====================================================================== (declare (unit dcommon)) -(declare (uses gutils)) (declare (uses dbmod)) (declare (uses commonmod)) (declare (uses configfmod)) (declare (uses rmtmod)) (declare (uses testsmod)) (declare (uses mtargs)) (declare (uses vgmod)) -;; (declare (uses vgmod.import)) (declare (uses ezstepsmod)) (declare (uses rmtmod)) (declare (uses subrunmod)) (declare (uses megatestmod)) (declare (uses runsmod)) @@ -421,24 +419,24 @@ (col-name (conc target "/" runname)) (res (hash-table-ref/default runs-index col-name #f))) (if res res (if force-set - (let ((max-col-num (+ 1 (common:max (cons-1 (hash-table-values runs-index)))))) + (let ((max-col-num (+ 1 (common:max (cons -1 (hash-table-values runs-index)))))) (hash-table-set! runs-index col-name max-col-num) max-col-num))))) -(define (dcommon:runsdat-get-row-num dat testname itempath force-set) - (let* ((tests-index (dboard:runsdat-runs-index dat)) - (row-name (conc testname "/" itempath)) - (res (hash-table-ref/default runs-index row-name #f))) - (if res - res - (if force-set - (let ((max-row-num (+ 1 (common:max (cons -1 (hash-table-values tests-index)))))) - (hash-table-set! runs-index row-name max-row-num) - max-row-num))))) +;; (define (dcommon:runsdat-get-row-num dat testname itempath force-set) +;; (let* ((tests-index (dboard:runsdat-runs-index dat)) +;; (row-name (conc testname "/" itempath)) +;; (res (hash-table-ref/default runs-index row-name #f))) +;; (if res +;; res +;; (if force-set +;; (let ((max-row-num (+ 1 (common:max (cons -1 (hash-table-values tests-index)))))) +;; (hash-table-set! runs-index row-name max-row-num) +;; max-row-num))))) (define (dcommon:rundat-copy-tests-to-by-name rundat) (let ((src-ht (dboard:rundat-tests rundat)) (trg-ht (dboard:rundat-tests-by-name rundat))) (if (and (hash-table? src-ht)(hash-table? trg-ht)) @@ -785,11 +783,11 @@ )) (colnames (list "Id" "MTver" "Pid" "Host" "Interface:OutPort" "RunTime" "State" "RunId")) (updater (lambda () (if (dashboard:monitor-changed? commondat tabdat) (let ((servers (case (rmt:transport-mode) - ((http)(server:choose-server *toppath* 'all-valid)) ;; (server:get-list *toppath* limit: 10))) + ;; ((http)(server:choose-server *toppath* 'all-valid)) ;; (server:get-list *toppath* limit: 10))) (else '())))) (iup:attribute-set! servers-matrix "NUMLIN" (length servers)) ;; (set! colnum 0) ;; (for-each (lambda (colname) ;; ;; (print "colnum: " colnum " colname: " colname) @@ -1915,10 +1913,11 @@ (keys (rmt:get-keys)) ;; to be removed when targets handling is refactored (runs (make-sparse-vector)) ;; id => runrec (runsbynum (make-vector 100 #f)) ;; vector num => runrec (targ-runid (make-hash-table)) ;; area/target/runname => run-id ;; not sure this will be needed (tests (make-hash-table)) ;; test[/itempath] => list of test rec + (path-run-ids (make-hash-table)) ;; referenced but not set anywhere in new run viewer, maybe get rid of this whole attempt? ;; run sql filters (targ-sql-filt "%") (runname-sql-filt "%") (run-state-sql-filt "%") @@ -1991,21 +1990,21 @@ status ;; test status ) ;; default is to NOT set the cell if the column and row names are not pre-existing ;; -(define (dboard:runsdat-set-test-cell dat target runname testname itempath test-id state status #!key (force-set #f)) - (let* ((col-num (dcommon:runsdat-get-col-num dat target runname force-set)) - (row-num (dcommon:runsdat-get-row-num dat testname itempath force-set))) - (if (and row-num col-num) - (let ((tdat (make-dboard:testdat - id: test-id - state: state - status: status))) - (sparse-array-set! (dboard:runsdat-matrix-dat dat) col-num row-num tdat) - tdat) - #f))) +;; (define (dboard:runsdat-set-test-cell dat target runname testname itempath test-id state status #!key (force-set #f)) +;; (let* ((col-num (dcommon:runsdat-get-col-num dat target runname force-set)) +;; (row-num (dcommon:runsdat-get-row-num dat testname itempath force-set))) +;; (if (and row-num col-num) +;; (let ((tdat (make-dboard:testdat +;; id: test-id +;; state: state +;; status: status))) +;; (sparse-array-set! (dboard:runsdat-matrix-dat dat) col-num row-num tdat) +;; tdat) +;; #f))) (define *dashboard-mode* (string->symbol (or (configf:lookup *configdat* "dashboard" "mode") "dashboard"))) (define *exit-started* #f)