Megatest

Check-in [49eeb8afc8]
Login
Overview
Comment:Sped up the left labels a bit
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | refactor-dashboard
Files: files | file ages | folders
SHA1: 49eeb8afc8ea135f765624137a41f8bbb21b5c1f
User & Date: mrwellan on 2011-06-26 16:00:17
Other Links: branch diff | manifest | tags
Context
2011-06-26
23:37
refactor of dashboard completed, now for a redesign :) Closed-Leaf check-in: c6b6fec4f4 user: mrwellan tags: refactor-dashboard
16:00
Sped up the left labels a bit check-in: 49eeb8afc8 user: mrwellan tags: refactor-dashboard
14:45
more-refactoring-eh check-in: 0a77e08281 user: mrwellan tags: refactor-dashboard
Changes

Modified dashboard-tests.scm from [93db9f7715] to [53ef169052].

238
239
240
241
242
243
244
245
246

247

248
249
250
251
252
253
254
255
	     (iup:vbox ; #:expand "YES"
               ;; The run and test info
	       (iup:hbox  ; #:expand "YES"
		(run-info-panel keydat testdat runname)
		(test-info-panel testdat store-label widgets))
	       (host-info-panel testdat store-label)
	       ;; The controls
	       (iup:frame #:title "Actions" ; #:expand "HORIZONTAL"
			  (iup:hbox ; #:expand "HORIZONTAL" ;; the actions box

			   (iup:button "View Log"    #:action viewlog #:expand "YES")

			   (iup:button "Start Xterm" #:action xterm  #:expand "YES")))
	       (set-fields-panel test-id testdat))))
      (iup:show self)
      ;; Now start keeping the gui updated from the db
      (let loop ((i 0))
	(thread-sleep! 0.1)
	(refreshdat) ;; update from the db here
	;(thread-suspend! other-thread)







|
|
>
|
>
|







238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
	     (iup:vbox ; #:expand "YES"
               ;; The run and test info
	       (iup:hbox  ; #:expand "YES"
		(run-info-panel keydat testdat runname)
		(test-info-panel testdat store-label widgets))
	       (host-info-panel testdat store-label)
	       ;; The controls
	       (iup:frame #:title "Actions"
			  (iup:hbox
			   (iup:vbox
			    (iup:button "View Log"    #:action viewlog #:expand "HORIZONTAL"))
			   (iup:vbox
			    (iup:button "Start Xterm" #:action xterm  #:expand "YES"))))
	       (set-fields-panel test-id testdat))))
      (iup:show self)
      ;; Now start keeping the gui updated from the db
      (let loop ((i 0))
	(thread-sleep! 0.1)
	(refreshdat) ;; update from the db here
	;(thread-suspend! other-thread)

Modified dashboard.scm from [bb1818123a] to [912915ad20].

130
131
132
133
134
135
136
137
138
139
140
141
142

143
144
145
146
147
148
149
150








151
152
153
154
155
156
157
	      runs)
    (set! *header*  header)
    (set! *allruns* result)
    maxtests))

(define (update-labels uidat)
  (let* ((rown    0)
	 (lftcol (vector-ref uidat 0))
	 (maxn   (- (vector-length lftcol) 1)))
    (let loop ((i 0))
      (iup:attribute-set! (vector-ref lftcol i) "TITLE" "")
      (if (< i maxn)
	  (loop (+ i 1))))

    (for-each (lambda (name)
		(if (<= rown maxn)
		    (let ((labl (vector-ref lftcol rown)))
		      (iup:attribute-set! labl "TITLE" name)))
		(set! rown (+ 1 rown)))
	      (if (> (length *alltestnamelst*) *start-test-offset*)
		  (drop *alltestnamelst* *start-test-offset*)
		  '())))) ;; *alltestnamelst*))))









(define (get-color-for-state-status state status)
  (case (string->symbol state)
    ((COMPLETED)
     (if (equal? status "PASS")
	 "70 249 73"
	 (if (equal? status "WARN")







|
|
<
<
|
<
>



|



|
>
>
>
>
>
>
>
>







130
131
132
133
134
135
136
137
138


139

140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
	      runs)
    (set! *header*  header)
    (set! *allruns* result)
    maxtests))

(define (update-labels uidat)
  (let* ((rown    0)
	 (lftcol  (vector-ref uidat 0))
	 (numcols (vector-length lftcol))


	 (maxn    (- numcols 1))

	 (allvals (make-vector numcols "")))
    (for-each (lambda (name)
		(if (<= rown maxn)
		    (let ((labl (vector-ref lftcol rown)))
		      (vector-set! allvals rown name)))
		(set! rown (+ 1 rown)))
	      (if (> (length *alltestnamelst*) *start-test-offset*)
		  (drop *alltestnamelst* *start-test-offset*)
		  '()))
    (let loop ((i 0))
      (let* ((lbl    (vector-ref lftcol i))
	     (oldval (iup:attribute lbl "TITLE"))
	     (newval (vector-ref allvals i)))
	(if (not (equal? oldval newval))
	    (iup:attribute-set! lbl "TITLE" newval))
	(if (< i maxn)
	    (loop (+ i 1)))))))

(define (get-color-for-state-status state status)
  (case (string->symbol state)
    ((COMPLETED)
     (if (equal? status "PASS")
	 "70 249 73"
	 (if (equal? status "WARN")