Megatest

Diff
Login

Differences From Artifact [61d4d838fb]:

To Artifact [bd9e7cef68]:


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
;;======================================================================

;; TO-DO
;;  1. Make "data" hash-table hierarchial store of all displayed data
;;  2. Update synchash to understand "get-runs", "get-tests" etc.
;;  3. Add extraction of filters to synchash calls
;;
(define (run-update data filters)



  (synchash:client-get db:get-runs  "get-runs"  data filters)



  (synchash:client-get db:get-tests "get-tests" data filters))

(define (newdashboard)
  (let* ((data    (make-hash-table))
	 (filters (make-hash-table))
	 (keys    (cdb:remote-run db:get-keys #f))


	 (keyvals (map (lambda (k)(list (vector-ref k 0) "%")) keys)))


    (iup:show (main-panel))
    ;; (set! uidat (make-dashboard-buttons *num-runs* *num-tests* *dbkeys*))
    (iup:callback-set! *tim*
		       "ACTION_CB"
		       (lambda (x)
			 (run-update rundata keyvals)))))

(newdashboard)    
(iup:main-loop)







|
>
>
>
|
>
>
>
|


<
|
|
>
>
|
>
>

<



|



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
401
402
403
;;======================================================================

;; TO-DO
;;  1. Make "data" hash-table hierarchial store of all displayed data
;;  2. Update synchash to understand "get-runs", "get-tests" etc.
;;  3. Add extraction of filters to synchash calls
;;
(define (run-update data runname keypatts testpatt states statuses)
  (let ((run-ids '()))
    ;; count and offset => #f so not used
    ;; the synchash calls modify the "data" hash
    (synchash:client-get 'db:get-runs  "get-runs" (length keypatts) data runname #f #f keypatts)
    ;; Now can calculate the run-ids
    (let* ((run-hash (hash-table-ref/default data "get-runs" #f))
	   (run-ids (if run-hash (filter number? (hash-table-keys run-hash)) '())))
      (synchash:client-get 'db:get-tests-for-runs "get-tests-for-runs" 0 data run-ids testpatt states statuses))))

(define (newdashboard)

  (let* ((data     (make-hash-table))
	 (keys     (cdb:remote-run db:get-keys #f))
	 (runname  "%")
	 (testpatt "%")
	 (keypatts (map (lambda (k)(list (vector-ref k 0) "%")) keys))
	 (states   '())
	 (statuses '()))
    (iup:show (main-panel))

    (iup:callback-set! *tim*
		       "ACTION_CB"
		       (lambda (x)
			 (run-update data runname keypatts testpatt states statuses)))))

(newdashboard)    
(iup:main-loop)