Index: dashboard.scm ================================================================== --- dashboard.scm +++ dashboard.scm @@ -435,19 +435,19 @@ #f ;; 'shortlist ;; qrytype (if (dboard:tabdat-filters-changed tabdat) 0 last-update) ;; last-update *dashboard-mode*)) ;; use dashboard mode - (tests (dashboard:merge-changed-tests prev-tests tmptests (dboard:tabdat-hide-not-hide tabdat)))) + (tests (dashboard:merge-changed-tests prev-tests tmptests (dboard:tabdat-hide-not-hide tabdat) prev-tests))) (vector-set! prev-dat 3 (- (current-seconds) 2)) ;; go back two seconds in time to ensure all changes are captured. ;; (debug:print 0 *default-log-port* "(dboard:get-tests-for-run-duplicate: filters-changed=" (dboard:tabdat-filters-changed tabdat) " last-update=" last-update " got " (length tmptests) " test records for run " run-id) tests)) ;; tmptests - new tests data ;; prev-tests - old tests data ;; -(define (dashboard:merge-changed-tests tests tmptests use-new) +(define (dashboard:merge-changed-tests tests tmptests use-new prev-tests) (let ((newdat (filter (lambda (x) (not (equal? (db:test-get-state x) "DELETED"))) ;; remove deleted tests but do it after merging (delete-duplicates (if use-new ;; (dboard:tabdat-filters-changed tabdat) tmptests @@ -1941,13 +1941,17 @@ (rows-used (make-hash-table)) ;; keep track of what parts of the rows are used here row1 = (obj1 obj2 ...) (row-height 4) (run-start (apply min (map db:test-get-event_time testsdat))) (run-end (apply max (map (lambda (t)(+ (db:test-get-event_time t)(db:test-get-run_duration t))) testsdat))) (timeoffset (- (+ originx canvas-margin) run-start)) - (timescale (/ (- sizex (* 2 canvas-margin)) (- run-end run-start))) + (run-duration (- run-end run-start)) + (timescale (/ (- sizex (* 2 canvas-margin)) + (if (> run-duration 0) + run-duration + (current-seconds)))) ;; a least lously guess (maptime (lambda (tsecs)(* timescale (+ tsecs timeoffset))))) - (print "timescale: " timescale " timeoffset: " timeoffset " sizex: " sizex " originx: " originx) + ;; (print "timescale: " timescale " timeoffset: " timeoffset " sizex: " sizex " originx: " originx) (vg:add-comp-to-lib runslib run-full-name runcomp) ;; get tests in list sorted by event time ascending (for-each (lambda (testdat) (let* ((event-time (maptime (db:test-get-event_time testdat))) @@ -1957,12 +1961,12 @@ (item-path (db:test-get-item-path testdat)) (state (db:test-get-state testdat)) (status (db:test-get-status testdat)) (test-fullname (conc test-name "/" item-path)) (name-color (gutils:get-color-for-state-status state status))) - (print "event_time: " (db:test-get-event_time testdat) " mapped event_time: " event-time) - (print "run-duration: " (db:test-get-run_duration testdat) " mapped run_duration: " run-duration) + ;; (print "event_time: " (db:test-get-event_time testdat) " mapped event_time: " event-time) + ;; (print "run-duration: " (db:test-get-run_duration testdat) " mapped run_duration: " run-duration) (let loop ((rownum start-row)) ;; (+ start-row 1))) (set! start-row (max rownum start-row)) ;; track the max row used (if (dashboard:row-collision rowhash rownum event-time end-time) (loop (+ rownum 1)) (let* ((lly (- sizey (* rownum row-height))) @@ -1981,17 +1985,17 @@ (lly (list-ref extents 1)) (ulx (list-ref extents 2)) (uly (list-ref extents 3)) ;; move the following into mapping functions in vg.scm (deltax (- llx ulx)) - (scalex (/ sizex deltax)) + (scalex (if (> deltax 0)(/ sizex deltax) 1)) (sllx (* scalex llx)) (offx (- sllx originx))) (print "llx: " llx " lly: " lly "ulx: " ulx " uly: " uly " deltax: " deltax " scalex: " scalex " sllx: " sllx " offx: " offx) (print " run-full-name: " run-full-name) ;; (vg:instantiate drawing "runslib" run-full-name "wrongname" offx 0))))) - (vg:instantiate drawing "runslib" run-full-name "wrongname" 0 0))))) + (vg:instantiate drawing "runslib" run-full-name run-full-name 0 0))))) ;; scalex: scalex scaley: 1))))) allruns) (vg:drawing-cnv-set! (dboard:tabdat-drawing tabdat)(dboard:tabdat-cnv tabdat)) ;; cnv-obj) (canvas-clear! (dboard:tabdat-cnv tabdat)) ;; -obj) (print "All objs: " (vg:draw (dboard:tabdat-drawing tabdat) #t)) Index: vg.scm ================================================================== --- vg.scm +++ vg.scm @@ -242,11 +242,15 @@ ;;====================================================================== ;; color ;;====================================================================== (define (vg:rgb->number r g b #!key (a 0)) - (u32vector-ref (blob->u32vector (u8vector->blob (list->u8vector (list a r g b)))) 0)) + (bitwise-ior + (arithmetic-shift a 24) + (arithmetic-shift r 16) + (arithmetic-shift g 8) + b)) (define (vg:iup-color->number iup-color) (apply vg:rgb->number (map string->number (string-split iup-color)))) ;;======================================================================