@@ -2232,10 +2232,12 @@ ;; each run is a component ;; all runs stored in runslib library (let* ((tabdat (dboard:common-get-tabdat commondat tab-num: tab-num)) (canvas-margin 10) (start-row 0) ;; each run starts in this row + (run-start-row 0) + (max-row 0) ;; the max row seen for this run (row-height 10) (runs-dat (rmt:get-runs-by-patt (dboard:tabdat-keys tabdat) "%" #f #f #f #f)) (runs-header (vector-ref runs-dat 0)) ;; 0 is header, 1 is list of records (runs-hash (let ((ht (make-hash-table))) (for-each (lambda (run) @@ -2323,15 +2325,17 @@ run-duration (current-seconds)))) ;; a least lously guess (maptime (lambda (tsecs)(* timescale (+ tsecs timeoffset))))) ;; (print "timescale: " timescale " timeoffset: " timeoffset " sizex: " sizex " originx: " originx) (vg:add-comp-to-lib runslib run-full-name runcomp) - (set! start-row (+ start-row 1)) - (let ((x 10) - (y (- sizey (* start-row row-height)))) - (vg:add-objs-to-comp runcomp (vg:make-text x y run-full-name font: "Helvetica -10")) - (dashboard:add-bar rowhash start-row x (+ x 100))) + (set! run-start-row (+ max-row 2)) + (set! start-row run-start-row) + ;; this is the run title. move this into the box + ;; (let ((x 10) + ;; (y (- sizey (* start-row row-height)))) + ;; (vg:add-objs-to-comp runcomp (vg:make-text x y run-full-name font: "Helvetica -10")) + ;; (dashboard:add-bar rowhash start-row x (+ x 100))) (set! start-row (+ start-row 1)) ;; get tests in list sorted by event time ascending (for-each (lambda (testdat) (let* ((event-time (maptime (db:test-get-event_time testdat))) @@ -2343,12 +2347,12 @@ (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) - (let loop ((rownum start-row)) ;; (+ start-row 1))) - (set! start-row (max rownum start-row)) ;; track the max row used + (let loop ((rownum run-start-row)) ;; (+ start-row 1))) + (set! max-row (max rownum max-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))) (uly (+ lly row-height))) (dashboard:add-bar rowhash rownum event-time end-time) @@ -2363,26 +2367,30 @@ ;; font: "Helvetica -10") )))) ;; (print "test-name: " test-name " event-time: " event-time " run-duration: " run-duration) )) testsdat) + ;; placeholder box + (set! max-row (+ max-row 1)) + (let ((y (- sizey (* max-row row-height)))) + (vg:add-objs-to-comp runcomp (vg:make-rect 0 y 0 y))) ;; instantiate the component - (let* ((extents (vg:components-get-extents drawing runcomp)) - (llx (list-ref extents 0)) - (lly (list-ref extents 1)) - (ulx (list-ref extents 2)) - (uly (list-ref extents 3)) + (let* ((extents (vg:components-get-extents drawing runcomp)) ;; move the following into mapping functions in vg.scm - (deltax (- llx ulx)) - (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 run-full-name 0 0))))) - ;; scalex: scalex scaley: 1))))) + ;; (deltax (- llx ulx)) + ;; (scalex (if (> deltax 0)(/ sizex deltax) 1)) + ;; (sllx (* scalex llx)) + ;; (offx (- sllx originx)) + (new-xtnts (apply vg:grow-rect 5 5 extents)) + (llx (list-ref new-xtnts 0)) + (lly (list-ref new-xtnts 1)) + (ulx (list-ref new-xtnts 2)) + (uly (list-ref new-xtnts 3)) + ) ;; (vg:components-get-extents d1 c1))) + (vg:add-objs-to-comp runcomp (vg:make-rect llx lly ulx uly text: run-full-name)) + (vg:instantiate drawing "runslib" run-full-name run-full-name 0 0)) + (set! max-row (+ max-row 1))))) allruns) (vg:drawing-cnv-set! (dboard:tabdat-drawing tabdat)(dboard:tabdat-cnv tabdat)) ;; cnv-obj) (canvas-clear! (dboard:tabdat-cnv tabdat)) ;; -obj) (print "Number of objs: " (length (vg:draw (dboard:tabdat-drawing tabdat) #t))) (dboard:tabdat-view-changed-set! tabdat #f)