︙ | | | ︙ | |
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
license GPL, Copyright (C) Matt Welland 2012-2017
Usage: dashboard [options]
-h : this help
-test run-id,test-id : control test identified by testid
-skip-version-check : skip the version check
-use-db-cache : access database via cache
Misc
-rows R : set number of rows
-cols C : set number of columns
"))
;; -server host:port : connect to host:port instead of db access
|
>
>
>
|
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
|
license GPL, Copyright (C) Matt Welland 2012-2017
Usage: dashboard [options]
-h : this help
-test run-id,test-id : control test identified by testid
-skip-version-check : skip the version check
-use-db-cache : access database via cache
-target T : prefill target filter with given target pattern
-runname R : prefill runname filter with given runname pattern
-testpatt P : prefill testpatt filter with given testpatt
Misc
-rows R : set number of rows
-cols C : set number of columns
"))
;; -server host:port : connect to host:port instead of db access
|
︙ | | | ︙ | |
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
"-run"
"-test"
"-xterm"
"-debug"
"-host"
"-transport"
"-start-dir"
)
(list "-h"
"-use-server"
"-guimonitor"
"-main"
"-v"
"-q"
|
>
>
>
|
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
"-run"
"-test"
"-xterm"
"-debug"
"-host"
"-transport"
"-start-dir"
"-target" ;; use as filter
"-runname" ;; use as filter
"-testpatt" ;; use as filter
)
(list "-h"
"-use-server"
"-guimonitor"
"-main"
"-v"
"-q"
|
︙ | | | ︙ | |
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
|
(else
teststate)))
(button (vector-ref columndat rown))
(color (car (gutils:get-color-for-state-status teststate teststatus)))
(curr-color (vector-ref buttondat 1)) ;; (iup:attribute button "BGCOLOR"))
(curr-title (vector-ref buttondat 2))) ;; (iup:attribute button "TITLE")))
(if (not (equal? curr-color color))
(iup:attribute-set! button "BGCOLOR" color))
(if (not (equal? curr-title buttontxt))
(iup:attribute-set! button "TITLE" buttontxt))
(vector-set! buttondat 0 run-id)
(vector-set! buttondat 1 color)
(vector-set! buttondat 2 buttontxt)
(vector-set! buttondat 3 testdat)
(vector-set! buttondat 4 run-key)))
(set! rown (+ rown 1))))
(dboard:tabdat-all-test-names tabdat)))
|
|
>
|
|
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
|
(else
teststate)))
(button (vector-ref columndat rown))
(color (car (gutils:get-color-for-state-status teststate teststatus)))
(curr-color (vector-ref buttondat 1)) ;; (iup:attribute button "BGCOLOR"))
(curr-title (vector-ref buttondat 2))) ;; (iup:attribute button "TITLE")))
(if (not (equal? curr-color color))
#;(iup:attribute-set! button "BGCOLOR" color)
(iup:attribute-set! button "FGCOLOR" color))
(if (not (equal? curr-title buttontxt))
(iup:attribute-set! button "TITLE" (conc "<span weight=\"bold\">" buttontxt "</span>")))
(vector-set! buttondat 0 run-id)
(vector-set! buttondat 1 color)
(vector-set! buttondat 2 buttontxt)
(vector-set! buttondat 3 testdat)
(vector-set! buttondat 4 run-key)))
(set! rown (+ rown 1))))
(dboard:tabdat-all-test-names tabdat)))
|
︙ | | | ︙ | |
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
|
;;(iup:frame
;; #:title "Logs" ;; To be replaced with tabs
;; (let ((logs-tb (iup:textbox #:expand "YES"
;; #:multiline "YES")))
;; (dboard:tabdat-logs-textbox-set! tabdat logs-tb)
;; logs-tb))
;; browse runs as a tree. Used in both "Runs" tab and
;; in the runs control panel.
;;
(define (dboard:runs-tree-browser commondat tabdat)
(let* ((txtbox (iup:textbox
#:action (lambda (val a b)
(debug:catch-and-dump
(lambda ()
;; for the Runs view we put the list
;; of keyvals into tabdat target for
;; the Run Controls we put then update
;; the run-command
(if b (dboard:tabdat-target-set! tabdat
(string-split b "/")))
(dashboard:update-run-command tabdat))
"command-testname-selector tb action"))
#:value (dboard:test-patt->lines
(dboard:tabdat-test-patts-use tabdat))
#:expand "HORIZONTAL"
;; #:size "10x30"
))
(tb
(iup:treebox
#:value 0
#:title "Runs" ;; was #:name -- iup 3.19 changed
|
>
>
>
>
<
|
<
<
<
<
<
|
|
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
|
;;(iup:frame
;; #:title "Logs" ;; To be replaced with tabs
;; (let ((logs-tb (iup:textbox #:expand "YES"
;; #:multiline "YES")))
;; (dboard:tabdat-logs-textbox-set! tabdat logs-tb)
;; logs-tb))
(define (dboard:runs-tree-txtbox-change tabdat val a b)
(if b (dboard:tabdat-target-set! tabdat (string-split b "/")))
(dashboard:update-run-command tabdat))
;; browse runs as a tree. Used in both "Runs" tab and
;; in the runs control panel.
;;
(define (dboard:runs-tree-browser commondat tabdat)
(let* ((txtbox (iup:textbox
#:action (lambda (val a b)
(debug:catch-and-dump
(lambda ()
(dboard:runs-tree-txtbox-change tabdat val a b))
"command-testname-selector tb action"))
#:value (dboard:test-patt->lines
(dboard:tabdat-test-patts-use tabdat))
#:expand "HORIZONTAL"
;; #:size "10x30"
))
(tb
(iup:treebox
#:value 0
#:title "Runs" ;; was #:name -- iup 3.19 changed
|
︙ | | | ︙ | |
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
|
(dboard:tabdat-curr-run-id-set! tabdat run-id)
(dboard:tabdat-view-changed-set! tabdat #t))
(debug:print-error 5 *default-log-port* "tree-path->run-id returned non-number " run-id))))
"treebox"))
;; (print "path: " (tree:node->path obj id) " run-id: " run-id)
)))
(dboard:tabdat-runs-tree-set! tabdat tb)
(iup:detachbox
(iup:vbox
txtbox
tb
))))
;; browse runs as a tree. Used in both "Runs" tab and
|
>
>
>
>
>
>
>
>
|
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
|
(dboard:tabdat-curr-run-id-set! tabdat run-id)
(dboard:tabdat-view-changed-set! tabdat #t))
(debug:print-error 5 *default-log-port* "tree-path->run-id returned non-number " run-id))))
"treebox"))
;; (print "path: " (tree:node->path obj id) " run-id: " run-id)
)))
(dboard:tabdat-runs-tree-set! tabdat tb)
(if (args:get-arg "-runname")
(let ((runname (args:get-arg "-runname")))
(update-search commondat tabdat "runname" runname)
#;(hash-table-set! (dboard:tabdat-searchpatts tabdat) "runname" runname)))
(if (args:get-arg "-target") ;;
(let ((target (args:get-arg "-target")))
(iup:attribute-set! txtbox value: target)
(dboard:runs-tree-txtbox-change tabdat #f #f target)))
(iup:detachbox
(iup:vbox
txtbox
tb
))))
;; browse runs as a tree. Used in both "Runs" tab and
|
︙ | | | ︙ | |
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
|
;; (iup:attribute-set! obj "TITLE" (if (dboard:tabdat-hide-empty-runs tabdat) "+HideE" "-HideE"))
;; (mark-for-update tabdat))))
(set! hide (iup:button "Hide"
#:expand "NO" #:size "40x15" ;; #:expand "HORIZONTAL"
#:action (lambda (obj)
(dboard:tabdat-hide-not-hide-set! tabdat #t) ;; (not (dboard:tabdat-hide-not-hide tabdat)))
;; (iup:attribute-set! obj "TITLE" (if (dboard:tabdat-hide-not-hide tabdat) "HideTests" "NotHide"))
(iup:attribute-set! hide "BGCOLOR" sel-color)
(iup:attribute-set! show "BGCOLOR" nonsel-color)
(mark-for-update tabdat))))
(set! show (iup:button "Show"
#:expand "NO" #:size "40x15" ;; #:expand "HORIZONTAL"
#:action (lambda (obj)
(dboard:tabdat-hide-not-hide-set! tabdat #f) ;; (not (dboard:tabdat-hide-not-hide tabdat)))
(iup:attribute-set! show "BGCOLOR" sel-color)
(iup:attribute-set! hide "BGCOLOR" nonsel-color)
(mark-for-update tabdat))))
(iup:attribute-set! hide "BGCOLOR" sel-color)
(iup:attribute-set! show "BGCOLOR" nonsel-color)
;; (dboard:tabdat-hide-not-hide-button-set! tabdat hideit) ;; never used, can eliminate ...
(iup:vbox
(iup:hbox hide show)
sort-lb)))
)
;; insert extra widget here
|
|
|
|
|
|
|
|
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
|
;; (iup:attribute-set! obj "TITLE" (if (dboard:tabdat-hide-empty-runs tabdat) "+HideE" "-HideE"))
;; (mark-for-update tabdat))))
(set! hide (iup:button "Hide"
#:expand "NO" #:size "40x15" ;; #:expand "HORIZONTAL"
#:action (lambda (obj)
(dboard:tabdat-hide-not-hide-set! tabdat #t) ;; (not (dboard:tabdat-hide-not-hide tabdat)))
;; (iup:attribute-set! obj "TITLE" (if (dboard:tabdat-hide-not-hide tabdat) "HideTests" "NotHide"))
(iup:attribute-set! hide "FGCOLOR" sel-color)
(iup:attribute-set! show "FGCOLOR" nonsel-color)
(mark-for-update tabdat))))
(set! show (iup:button "Show"
#:expand "NO" #:size "40x15" ;; #:expand "HORIZONTAL"
#:action (lambda (obj)
(dboard:tabdat-hide-not-hide-set! tabdat #f) ;; (not (dboard:tabdat-hide-not-hide tabdat)))
(iup:attribute-set! show "FGCOLOR" sel-color)
(iup:attribute-set! hide "FGCOLOR" nonsel-color)
(mark-for-update tabdat))))
(iup:attribute-set! hide "FGCOLOR" sel-color)
(iup:attribute-set! show "FGCOLOR" nonsel-color)
;; (dboard:tabdat-hide-not-hide-button-set! tabdat hideit) ;; never used, can eliminate ...
(iup:vbox
(iup:hbox hide show)
sort-lb)))
)
;; insert extra widget here
|
︙ | | | ︙ | |
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
|
(i 0)
(btn-height (dboard:tabdat-runs-btn-height runs-dat))
(btn-fontsz (dboard:tabdat-runs-btn-fontsz runs-dat))
(cell-width (dboard:tabdat-runs-cell-width runs-dat)))
;; controls (along bottom)
;; (set! controls (dboard:make-controls commondat runs-dat))
;; create the left most column for the run key names and the test names
(set! lftlst
(list (iup:hbox
(iup:label) ;; (iup:valuator)
(apply iup:vbox
(map (lambda (x)
(let ((res (iup:hbox
#:expand "HORIZONTAL"
(iup:label x
#:size (conc 40 btn-height)
#:fontsize btn-fontsz
#:expand "NO") ;; "HORIZONTAL")
(iup:textbox
#:size (conc 35 btn-height)
#:fontsize btn-fontsz
#:value "%"
#:expand "NO" ;; "HORIZONTAL"
#:action (lambda (obj unk val)
;; each field
;; (field name is "x" var) live updates
;; the search filter as it is typed
(dboard:tabdat-target-set! runs-dat #f)
;; ensure fields text boxes are used
|
>
>
>
>
>
|
>
|
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
|
(i 0)
(btn-height (dboard:tabdat-runs-btn-height runs-dat))
(btn-fontsz (dboard:tabdat-runs-btn-fontsz runs-dat))
(cell-width (dboard:tabdat-runs-cell-width runs-dat)))
;; controls (along bottom)
;; (set! controls (dboard:make-controls commondat runs-dat))
(if (args:get-arg "-runname")
(let ((runname (args:get-arg "-runname")))
(update-search commondat runs-dat "runname" runname)
#;(hash-table-set! (dboard:tabdat-searchpatts tabdat) "runname" runname)))
;; create the left most column for the run key names and the test names
(set! lftlst
(list (iup:hbox
(iup:label) ;; (iup:valuator)
(apply iup:vbox
(map (lambda (x)
(let ((res (iup:hbox
#:expand "HORIZONTAL"
(iup:label x
#:size (conc 40 btn-height)
#:fontsize btn-fontsz
#:expand "NO") ;; "HORIZONTAL")
(iup:textbox
#:size (conc 35 btn-height)
#:fontsize btn-fontsz
#:value (if (and (args:get-arg "-runname")(equal? x "runname"))
(args:get-arg "-runname") "%")
#:expand "NO" ;; "HORIZONTAL"
#:action (lambda (obj unk val)
;; each field
;; (field name is "x" var) live updates
;; the search filter as it is typed
(dboard:tabdat-target-set! runs-dat #f)
;; ensure fields text boxes are used
|
︙ | | | ︙ | |
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
|
(loop (+ runnum 1) 0 (make-vector ntests) '()))
(else
(let* ((button-key (mkstr runnum testnum))
(butn (iup:button
"" ;; button-key
#:size (conc cell-width btn-height )
#:expand "HORIZONTAL"
#:fontsize btn-fontsz
#:button-cb
(lambda (obj a pressed x y btn . rem)
;; (print "pressed= " pressed " x= " x " y= " y " rem=" rem " btn=" btn " string? " (string? btn))
(if (substring-index "3" btn)
(if (eq? pressed 1)
(let* ((toolpath (car (argv)))
|
>
|
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
|
(loop (+ runnum 1) 0 (make-vector ntests) '()))
(else
(let* ((button-key (mkstr runnum testnum))
(butn (iup:button
"" ;; button-key
#:size (conc cell-width btn-height )
#:expand "HORIZONTAL"
#:MARKUP "YES"
#:fontsize btn-fontsz
#:button-cb
(lambda (obj a pressed x y btn . rem)
;; (print "pressed= " pressed " x= " x " y= " y " rem=" rem " btn=" btn " string? " (string? btn))
(if (substring-index "3" btn)
(if (eq? pressed 1)
(let* ((toolpath (car (argv)))
|
︙ | | | ︙ | |