︙ | | | ︙ | |
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
(exit)))
(if (args:get-arg "-h")
(begin
(print help)
(exit)))
;; TODO: Move this inside (main)
;;
(if (not (launch:setup))
(begin
(print "Failed to find megatest.config, exiting")
(exit 1)))
|
>
>
>
>
|
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
(exit)))
(if (args:get-arg "-h")
(begin
(print help)
(exit)))
(if (not (common:on-homehost?))
(begin
(debug:print 0 *default-log-port* "ERROR: Current policy requires running dashboard on homehost: " (common:get-homehost))))
;; TODO: Move this inside (main)
;;
(if (not (launch:setup))
(begin
(print "Failed to find megatest.config, exiting")
(exit 1)))
|
︙ | | | ︙ | |
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
;; Runs view
((buttondat (make-hash-table)) : hash-table) ;;
((item-test-names '()) : list) ;; list of itemized tests
((run-keys (make-hash-table)) : hash-table)
(runs-matrix #f) ;; used in newdashboard
((start-run-offset 0) : number) ;; left-right slider value
((start-test-offset 0) : number) ;; up-down slider value
((runs-btn-height (or (configf:lookup *configdat* "dashboard" "btn-height") "x14")) : string) ;; was 12
((runs-btn-fontsz (or (configf:lookup *configdat* "dashboard" "btn-fontsz") "10")) : string) ;; was 8
((runs-cell-width (or (configf:lookup *configdat* "dashboard" "cell-width") "60")) : string) ;; was 50
((all-test-names '()) : list)
;; Canvas and drawing data
(cnv #f)
(cnv-obj #f)
|
|
|
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
|
;; Runs view
((buttondat (make-hash-table)) : hash-table) ;;
((item-test-names '()) : list) ;; list of itemized tests
((run-keys (make-hash-table)) : hash-table)
(runs-matrix #f) ;; used in newdashboard
((start-run-offset 0) : number) ;; left-right slider value
((start-test-offset 0) : number) ;; up-down slider value
((runs-btn-height (or (configf:lookup *configdat* "dashboard" "btn-height") "x16")) : string) ;; was 12
((runs-btn-fontsz (or (configf:lookup *configdat* "dashboard" "btn-fontsz") "10")) : string) ;; was 8
((runs-cell-width (or (configf:lookup *configdat* "dashboard" "cell-width") "60")) : string) ;; was 50
((all-test-names '()) : list)
;; Canvas and drawing data
(cnv #f)
(cnv-obj #f)
|
︙ | | | ︙ | |
288
289
290
291
292
293
294
295
296
297
298
299
300
301
|
(runs-summary-source-runname-label #f)
(runs-summary-dest-runname-label #f)
;; runs summary view
tests-tree ;; used in newdashboard
)
(define (dboard:tabdat-target-string vec)
(let ((targ (dboard:tabdat-target vec)))
(if (list? targ)(string-intersperse targ "/") "no-target-specified")))
(define (dboard:tabdat-test-patts-use vec)
(let ((val (dboard:tabdat-test-patts vec)))(if val val ""))) ;;RADT => What is the if for?
|
>
>
>
>
>
>
>
>
>
>
>
|
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
|
(runs-summary-source-runname-label #f)
(runs-summary-dest-runname-label #f)
;; runs summary view
tests-tree ;; used in newdashboard
)
;; register tabdat with BBpp
;; this is used by BBpp (Brandon's pretty printer) to convert dboard:tabdat into a composition of lists that pp will handle
(hash-table-set! *BBpp_custom_expanders_list* TABDAT:
(cons dboard:tabdat?
(lambda (tabdat-item)
(filter
(lambda (alist-entry)
(member (car alist-entry)
'(allruns-by-id allruns))) ;; FIELDS OF INTEREST
(dboard:tabdat->alist tabdat-item)))))
(define (dboard:tabdat-target-string vec)
(let ((targ (dboard:tabdat-target vec)))
(if (list? targ)(string-intersperse targ "/") "no-target-specified")))
(define (dboard:tabdat-test-patts-use vec)
(let ((val (dboard:tabdat-test-patts vec)))(if val val ""))) ;;RADT => What is the if for?
|
︙ | | | ︙ | |
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
|
tests-drawn ;; list of id's already drawn on screen
tests-notdrawn ;; list of id's NOT already drawn
rowsused ;; hash of lists covering what areas used - replace with quadtree
hierdat ;; put hierarchial sorted list here
tests ;; hash of id => testdat
((tests-by-name (make-hash-table)) : hash-table) ;; hash of testfullname => testdat
key-vals
((last-update 0) : fixnum) ;; last query to db got records from before last-update
((data-changed #f) : boolean)
((run-data-offset 0) : number) ;; get only 100 items per call, set back to zero when received less that 100 items
(db-path #f)
)
(define (dboard:rundat-make-init #!key (run #f)(key-vals #f)(tests #f));; -100 is before time began
(make-dboard:rundat
run: run
tests: (or tests (make-hash-table))
key-vals: key-vals
))
|
|
>
|
|
|
|
>
>
>
>
>
>
>
>
>
>
>
>
>
|
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
|
tests-drawn ;; list of id's already drawn on screen
tests-notdrawn ;; list of id's NOT already drawn
rowsused ;; hash of lists covering what areas used - replace with quadtree
hierdat ;; put hierarchial sorted list here
tests ;; hash of id => testdat
((tests-by-name (make-hash-table)) : hash-table) ;; hash of testfullname => testdat
key-vals
((last-update 0) : number) ;; last query to db got records from before last-update
((last-db-time 0) : number) ;; last timestamp on megatest.db
((data-changed #f) : boolean)
((run-data-offset 0) : number) ;; get only 100 items per call, set back to zero when received less than 100 items
(db-path #f))
;; register dboard:rundat with BBpp
;; this is used by BBpp (Brandon's pretty printer) to convert dboard:rundat into a composition of lists that pp will handle
(hash-table-set! *BBpp_custom_expanders_list* RUNDAT:
(cons dboard:rundat?
(lambda (tabdat-item)
(filter
(lambda (alist-entry)
(member (car alist-entry)
'(run run-data-offset ))) ;; FIELDS OF INTEREST
(dboard:rundat->alist tabdat-item)))))
(define (dboard:rundat-make-init #!key (run #f)(key-vals #f)(tests #f));; -100 is before time began
(make-dboard:rundat
run: run
tests: (or tests (make-hash-table))
key-vals: key-vals
))
|
︙ | | | ︙ | |
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
|
;; This is roughly the same as dboard:get-tests-dat, should merge them if possible
;;
;; gets all the tests for run-id that match testnamepatt and key-vals, merges them
;;
;; NOTE: Yes, this is used
;;
(define (dboard:get-tests-for-run-duplicate tabdat run-id run testnamepatt key-vals)
(let* ((access-mode (dboard:tabdat-access-mode tabdat))
(num-to-get
(let ((num-tests-from-config (configf:lookup *configdat* "setup" "num-tests-to-get")))
(if num-tests-from-config
(begin
(BB> "override num-tests 100 -> "num-tests-from-config)
(string->number num-tests-from-config))
100)))
(states (hash-table-keys (dboard:tabdat-state-ignore-hash tabdat)))
(statuses (hash-table-keys (dboard:tabdat-status-ignore-hash tabdat)))
(do-not-use-db-file-timestamps #t) ;; (configf:lookup *configdat* "setup" "do-not-use-db-file-timestamps")) ;; this still hosts runs-summary-tab
(do-not-use-query-timestamps #t) ;; (configf:lookup *configdat* "setup" "do-not-use-query-timestamps")) ;; this no longer troubles runs-summary-tab
(sort-info (get-curr-sort))
(sort-by (vector-ref sort-info 1))
(sort-order (vector-ref sort-info 2))
(bubble-type (if (member sort-order '(testname))
'testname
'itempath))
;; note: the rundat is normally created in "update-rundat".
(run-dat (or (hash-table-ref/default (dboard:tabdat-allruns-by-id tabdat) run-id #f)
(let ((rd (dboard:rundat-make-init run: run key-vals: key-vals)))
(hash-table-set! (dboard:tabdat-allruns-by-id tabdat) run-id rd)
rd)))
;; (prev-tests (dboard:rundat-tests prev-dat)) ;; (vector-ref prev-dat 1))
(last-update
(if do-not-use-query-timestamps
0
(dboard:rundat-last-update run-dat)
;;(hash-table-ref/default (dboard:tabdat-run-update-times tabdat) run-id 0)
))
(db-path (or (dboard:rundat-db-path run-dat)
(let* ((db-dir (tasks:get-task-db-path))
(db-pth (conc db-dir "/" run-id ".db")))
(dboard:rundat-db-path-set! run-dat db-pth)
db-pth)))
(tmptests (if (or do-not-use-db-file-timestamps
(>= (common:lazy-modification-time db-path) last-update))
(db:dispatch-query access-mode rmt:get-tests-for-run db:get-tests-for-run
run-id testnamepatt states statuses ;; run-id testpatt states statuses
(dboard:rundat-run-data-offset run-dat)
num-to-get
(dboard:tabdat-hide-not-hide tabdat) ;; no-in
sort-by ;; sort-by
sort-order ;; sort-order
#f ;; 'shortlist ;; qrytype
(if (dboard:tabdat-filters-changed tabdat)
0
last-update) ;; last-update
*dashboard-mode*) ;; use dashboard mode
'()))
(use-new (dboard:tabdat-hide-not-hide tabdat))
(tests-ht (if (dboard:tabdat-filters-changed tabdat)
(let ((ht (make-hash-table)))
(dboard:rundat-tests-set! run-dat ht)
ht)
(dboard:rundat-tests run-dat))))
;;(start-time (current-seconds)))
;; to limit the amount of data transferred each cycle use limit of num-to-get and offset
(dboard:rundat-run-data-offset-set!
run-dat
(if (< (length tmptests) num-to-get)
0
(let ((newval (+ num-to-get (dboard:rundat-run-data-offset run-dat))))
;; (print "Incremental get, offset=" (dboard:rundat-run-data-offset run-dat) " retrieved: " (length tmptests) " newval: " newval)
newval)))
(for-each
(lambda (tdat)
(let ((test-id (db:test-get-id tdat))
(state (db:test-get-state tdat)))
(dboard:rundat-data-changed-set! run-dat #t)
(if (equal? state "DELETED")
(hash-table-delete! tests-ht test-id)
(hash-table-set! tests-ht test-id tdat))))
tmptests)
;; set last-update to 0 if still getting data incrementally
(if (> (dboard:rundat-run-data-offset run-dat) 0)
(begin
;; (print "run-data-offset: " (dboard:rundat-run-data-offset run-dat) ", setting last-update to 0")
;; (dboard:rundat-last-update-set! run-dat 0)
(dboard:rundat-last-update-set! run-dat 0))
;; (hash-table-set! (dboard:tabdat-run-update-times tabdat) run-id (- start-time 3))
(dboard:rundat-last-update-set! run-dat (- (current-seconds) 2))) ;; go back two seconds in time to ensure all changes are captured.
;; (debug:print-info 0 *default-log-port* "tests-ht: " (hash-table-keys tests-ht))
tests-ht))
;; tmptests - new tests data
;; prev-tests - old tests data
;;
;; (define (dashboard:merge-changed-tests tabdat tests tmptests) ;; use-new prev-tests)
;; (let* ((newdat (filter
|
>
|
<
|
<
<
<
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
|
>
|
|
|
|
|
>
>
>
|
>
|
|
|
|
|
|
|
|
|
<
<
|
|
|
|
>
>
|
>
>
>
>
>
>
>
>
>
>
>
>
|
>
|
<
<
|
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
|
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
|
;; This is roughly the same as dboard:get-tests-dat, should merge them if possible
;;
;; gets all the tests for run-id that match testnamepatt and key-vals, merges them
;;
;; NOTE: Yes, this is used
;;
(define (dboard:get-tests-for-run-duplicate tabdat run-id run testnamepatt key-vals)
(let* ((start-time (current-seconds))
(access-mode (dboard:tabdat-access-mode tabdat))
(num-to-get (string->number (or (configf:lookup *configdat* "setup" "num-tests-to-get")
"200")))
(states (hash-table-keys (dboard:tabdat-state-ignore-hash tabdat)))
(statuses (hash-table-keys (dboard:tabdat-status-ignore-hash tabdat)))
(do-not-use-db-file-timestamps #f) ;; (configf:lookup *configdat* "setup" "do-not-use-db-file-timestamps")) ;; this still hosts runs-summary-tab
(do-not-use-query-timestamps #f) ;; (configf:lookup *configdat* "setup" "do-not-use-query-timestamps")) ;; this no longer troubles runs-summary-tab
(sort-info (get-curr-sort))
(sort-by (vector-ref sort-info 1))
(sort-order (vector-ref sort-info 2))
(bubble-type (if (member sort-order '(testname))
'testname
'itempath))
;; note: the rundat is normally created in "update-rundat".
(run-dat (or (hash-table-ref/default (dboard:tabdat-allruns-by-id tabdat) run-id #f)
(let ((rd (dboard:rundat-make-init run: run key-vals: key-vals)))
(hash-table-set! (dboard:tabdat-allruns-by-id tabdat) run-id rd)
rd)))
;; (prev-tests (dboard:rundat-tests prev-dat)) ;; (vector-ref prev-dat 1))
(last-update (if (or do-not-use-query-timestamps
(dboard:tabdat-filters-changed tabdat))
0
(dboard:rundat-last-update run-dat)))
(last-db-time (if do-not-use-db-file-timestamps
0
(dboard:rundat-last-db-time run-dat)))
(db-path (or (dboard:rundat-db-path run-dat)
(let* ((db-dir (common:get-db-tmp-area))
(db-pth (conc db-dir "/megatest.db")))
(dboard:rundat-db-path-set! run-dat db-pth)
db-pth)))
(db-mod-time (common:lazy-sqlite-db-modification-time db-path))
(db-modified (>= db-mod-time last-db-time))
(multi-get (> (dboard:rundat-run-data-offset run-dat) 0)) ;; multi-get in progress
(tmptests (if (or do-not-use-db-file-timestamps
(dboard:tabdat-filters-changed tabdat)
db-modified)
(db:dispatch-query access-mode rmt:get-tests-for-run db:get-tests-for-run
run-id testnamepatt states statuses ;; run-id testpatt states statuses
(dboard:rundat-run-data-offset run-dat) ;; query offset
num-to-get
(dboard:tabdat-hide-not-hide tabdat) ;; no-in
sort-by ;; sort-by
sort-order ;; sort-order
#f ;; 'shortlist ;; qrytype
last-update ;; last-update
*dashboard-mode*) ;; use dashboard mode
'()))
(use-new (dboard:tabdat-hide-not-hide tabdat))
(tests-ht (if (dboard:tabdat-filters-changed tabdat)
(let ((ht (make-hash-table)))
(dboard:rundat-tests-set! run-dat ht)
ht)
(dboard:rundat-tests run-dat)))
(got-all (< (length tmptests) num-to-get)) ;; got all for this round
)
;; if we saw the db modified, reset it (the signal has already been used)
(if (and got-all ;; (not multi-get)
db-modified)
(dboard:rundat-last-db-time-set! run-dat (- start-time 2)))
;; to limit the amount of data transferred each cycle use limit of num-to-get and offset
;; DO NOT bump time indexes last-update and last-db-time until all the first pass of the
;; data has been read
;; set last-update to 0 if still getting data incrementally ;; NO NEED, handled above
;;
;; (debug:print 0 *default-log-port* "got-all: " got-all " multi-get: " multi-get " num-to-get: " num-to-get " (length tmptests): " (length tmptests) " db-modified: " db-modified " db-mod-time: " db-mod-time " db-path: " db-path)
(if got-all
(begin
(dboard:rundat-last-update-set! run-dat (- start-time 2))
(dboard:rundat-run-data-offset-set! run-dat 0))
(begin
(dboard:rundat-run-data-offset-set! run-dat
(+ num-to-get (dboard:rundat-run-data-offset run-dat)))))
(for-each
(lambda (tdat)
(let ((test-id (db:test-get-id tdat))
(state (db:test-get-state tdat)))
(dboard:rundat-data-changed-set! run-dat #t)
(if (equal? state "DELETED")
(hash-table-delete! tests-ht test-id)
(hash-table-set! tests-ht test-id tdat))))
tmptests)
tests-ht))
;; tmptests - new tests data
;; prev-tests - old tests data
;;
;; (define (dashboard:merge-changed-tests tabdat tests tmptests) ;; use-new prev-tests)
;; (let* ((newdat (filter
|
︙ | | | ︙ | |
621
622
623
624
625
626
627
628
629
630
631
632
633
634
|
(start-time (current-seconds))
(runs-hash (let ((ht (make-hash-table)))
(for-each (lambda (run)
(hash-table-set! ht (db:get-value-by-header run header "id") run))
runs-tree) ;; (vector-ref runs-dat 1))
ht))
(tb (dboard:tabdat-runs-tree tabdat)))
(dboard:tabdat-last-runs-update-set! tabdat (- (current-seconds) 2))
(dboard:tabdat-header-set! tabdat header)
;;
;; trim runs to only those that are changing often here
;;
(if (null? runs)
(begin
|
>
>
|
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
|
(start-time (current-seconds))
(runs-hash (let ((ht (make-hash-table)))
(for-each (lambda (run)
(hash-table-set! ht (db:get-value-by-header run header "id") run))
runs-tree) ;; (vector-ref runs-dat 1))
ht))
(tb (dboard:tabdat-runs-tree tabdat)))
;;(BB> "In update-rundat")
;;(inspect allruns runs-hash)
(dboard:tabdat-last-runs-update-set! tabdat (- (current-seconds) 2))
(dboard:tabdat-header-set! tabdat header)
;;
;; trim runs to only those that are changing often here
;;
(if (null? runs)
(begin
|
︙ | | | ︙ | |
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
|
(let* ((newmaxtests (max num-tests maxtests))
;; (last-update (- (current-seconds) 10))
(run-struct (or run-struct
(dboard:rundat-make-init
run: run
tests: tests-ht
key-vals: key-vals)))
(new-res (if (null? all-test-ids) res (cons run-struct res)))
(elapsed-time (- (current-seconds) start-time)))
(if (null? all-test-ids)
(hash-table-delete! (dboard:tabdat-allruns-by-id tabdat) run-id)
(hash-table-set! (dboard:tabdat-allruns-by-id tabdat) run-id run-struct))
(if (or (null? tal)
(> elapsed-time 2)) ;; stop loading data after 5 seconds, on the next call more data *should* be loaded since get-tests-for-run uses last update
(begin
|
|
>
>
>
>
>
>
|
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
|
(let* ((newmaxtests (max num-tests maxtests))
;; (last-update (- (current-seconds) 10))
(run-struct (or run-struct
(dboard:rundat-make-init
run: run
tests: tests-ht
key-vals: key-vals)))
(new-res (if (null? all-test-ids)
res
(delete-duplicates
(cons run-struct res)
(lambda (a b)
(eq? (db:get-value-by-header (dboard:rundat-run a) header "id")
(db:get-value-by-header (dboard:rundat-run b) header "id"))))))
(elapsed-time (- (current-seconds) start-time)))
(if (null? all-test-ids)
(hash-table-delete! (dboard:tabdat-allruns-by-id tabdat) run-id)
(hash-table-set! (dboard:tabdat-allruns-by-id tabdat) run-id run-struct))
(if (or (null? tal)
(> elapsed-time 2)) ;; stop loading data after 5 seconds, on the next call more data *should* be loaded since get-tests-for-run uses last update
(begin
|
︙ | | | ︙ | |
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
|
(dboard:tabdat-num-tests-set! tabdat (string->number
(or (args:get-arg "-rows")
(get-environment-variable "DASHBOARDROWS")
"15"))))
(define *tim* (iup:timer))
(define *ord* #f)
(iup:attribute-set! *tim* "TIME" 300)
(iup:attribute-set! *tim* "RUN" "YES")
(define *last-recalc-ended-time* 0)
(define (dashboard:recalc modtime please-update-buttons last-db-update-time)
(or please-update-buttons
(and ;; (> (current-milliseconds)(+ *last-recalc-ended-time* 150)) ;; can't use this - it needs to be tab specific
(> modtime (- last-db-update-time 3)) ;; add three seconds of margin
(> (current-seconds)(+ last-db-update-time 1)))))
;; (define *monitor-db-path* #f)
(define *last-monitor-update-time* 0)
;; Force creation of the db in case it isn't already there.
(tasks:open-db)
(define (dashboard:get-youngest-run-db-mod-time dbdir)
(handle-exceptions
exn
(begin
(debug:print 0 *default-log-port* "WARNING: error in accessing databases in get-youngest-run-db-mod-time: " ((condition-property-accessor 'exn 'message) exn))
(current-seconds)) ;; something went wrong - just print an error and return current-seconds
(common:max (map (lambda (filen)
(file-modification-time filen))
(glob (conc dbdir "/*.db*"))))))
(define (dashboard:monitor-changed? commondat tabdat)
(let* ((run-update-time (current-seconds))
|
|
|
|
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
|
(dboard:tabdat-num-tests-set! tabdat (string->number
(or (args:get-arg "-rows")
(get-environment-variable "DASHBOARDROWS")
"15"))))
(define *tim* (iup:timer))
(define *ord* #f)
(iup:attribute-set! *tim* "TIME" 300 )
(iup:attribute-set! *tim* "RUN" "YES")
(define *last-recalc-ended-time* 0)
(define (dashboard:recalc modtime please-update-buttons last-db-update-time)
(or please-update-buttons
(and ;; (> (current-milliseconds)(+ *last-recalc-ended-time* 150)) ;; can't use this - it needs to be tab specific
(> modtime (- last-db-update-time 3)) ;; add three seconds of margin
(> (current-seconds)(+ last-db-update-time 1)))))
;; (define *monitor-db-path* #f)
(define *last-monitor-update-time* 0)
;; Force creation of the db in case it isn't already there.
(tasks:open-db)
(define (dashboard:get-youngest-run-db-mod-time dbdir)
(handle-exceptions
exn
(begin
(debug:print 0 *default-log-port* "WARNING: error in accessing databases in get-youngest-run-db-mod-time: " ((condition-property-accessor 'exn 'message) exn) " db-dir="dbdir)
(current-seconds)) ;; something went wrong - just print an error and return current-seconds
(common:max (map (lambda (filen)
(file-modification-time filen))
(glob (conc dbdir "/*.db*"))))))
(define (dashboard:monitor-changed? commondat tabdat)
(let* ((run-update-time (current-seconds))
|
︙ | | | ︙ | |
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
|
(min (vector-ref (car dat) 2))
(max (vector-ref (car dat) 2)))
(let* ((val (vector-ref hed 2))
(newmin (if (< val min) val min))
(newmax (if (> val max) val max))
(newres (cons val res)))
(if (null? tal)
(values (reverse res) newmin newmax)
(loop (car tal)(cdr tal) newres newmin newmax)))))))
(if (not (hash-table-exists? graph-matrix-table fieldn))
(begin
(let* ((graph-color-rgb (vg:generate-color-rgb))
(graph-color (vg:iup-color->number graph-color-rgb))
(graph-matrix-col (dboard:tabdat-graph-matrix-col tabdat))
(graph-matrix-row (dboard:tabdat-graph-matrix-row tabdat))
|
|
|
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
|
(min (vector-ref (car dat) 2))
(max (vector-ref (car dat) 2)))
(let* ((val (vector-ref hed 2))
(newmin (if (< val min) val min))
(newmax (if (> val max) val max))
(newres (cons val res)))
(if (null? tal)
(values (reverse res) (- newmin 2) (+ newmax 2))
(loop (car tal)(cdr tal) newres newmin newmax)))))))
(if (not (hash-table-exists? graph-matrix-table fieldn))
(begin
(let* ((graph-color-rgb (vg:generate-color-rgb))
(graph-color (vg:iup-color->number graph-color-rgb))
(graph-matrix-col (dboard:tabdat-graph-matrix-col tabdat))
(graph-matrix-row (dboard:tabdat-graph-matrix-row tabdat))
|
︙ | | | ︙ | |
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
|
(let* ((tabdat (dboard:common-get-tabdat commondat tab-num: tab-num))
(dbkeys (dboard:tabdat-dbkeys tabdat)))
;;(print "RA => calling runs-tab-updater with commondat " commondat " tab-num " tab-num)
;;(tabdat-values tabdat) ;;RA added
;; (pp (dboard:tabdat->alist tabdat))
;; (if (dashboard:database-changed? commondat tabdat context-key: 'runs-rundat)
(dashboard:do-update-rundat tabdat)
(let ((uidat (dboard:commondat-uidat commondat)))
;;(print "RA => Calling update-buttons with tabdat : " tabdat " uidat " uidat)
(update-buttons tabdat uidat (dboard:tabdat-numruns tabdat) (dboard:tabdat-num-tests tabdat)))
))
"dashboard:runs-tab-updater"))
;;======================================================================
|
>
>
>
|
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
|
(let* ((tabdat (dboard:common-get-tabdat commondat tab-num: tab-num))
(dbkeys (dboard:tabdat-dbkeys tabdat)))
;;(print "RA => calling runs-tab-updater with commondat " commondat " tab-num " tab-num)
;;(tabdat-values tabdat) ;;RA added
;; (pp (dboard:tabdat->alist tabdat))
;; (if (dashboard:database-changed? commondat tabdat context-key: 'runs-rundat)
(dashboard:do-update-rundat tabdat)
;;(BB> "dashboard:runs-tab-updater")
;;(inspect tabdat)
(let ((uidat (dboard:commondat-uidat commondat)))
;;(print "RA => Calling update-buttons with tabdat : " tabdat " uidat " uidat)
(update-buttons tabdat uidat (dboard:tabdat-numruns tabdat) (dboard:tabdat-num-tests tabdat)))
))
"dashboard:runs-tab-updater"))
;;======================================================================
|
︙ | | | ︙ | |