Index: dashboard-tests.scm ================================================================== --- dashboard-tests.scm +++ dashboard-tests.scm @@ -348,16 +348,21 @@ (iup:button "Start Xterm" #:action xterm #:size "120x") (iup:button "Close" #:action (lambda (x)(exit)) #:size "120x"))) (set-fields-panel test-id testdat) (iup:frame #:title "Test Steps" - (let ((stepsdat (iup:label "Test steps ........................................." - #:expand "YES" - #:size "200x150" - #:alignment "ALEFT:ATOP"))) + (let ((stepsdat ;;(iup:label "Test steps ........................................." + ;; #:expand "YES" + ;; #:size "200x150" + ;; #:alignment "ALEFT:ATOP"))) + (iup:textbox #:action (lambda (obj char val) + #f) + #:expand "YES" + #:multiline "YES" + #:font "Courier New, -10"))) (hash-table-set! widgets "Test Steps" (lambda (testdat) - (let* ((currval (iup:attribute stepsdat "TITLE")) + (let* ((currval (iup:attribute stepsdat "VALUE")) ;; "TITLE")) (fmtstr "~25a~10a~10a~15a~20a") (comprsteps (db:get-steps-table db test-id)) (newval (string-intersperse (append (list @@ -378,11 +383,11 @@ (if (and (number? a)(number? b)) (< (vector-ref a 1)(vector-ref b 1)) #t))))) "\n"))) (if (not (equal? currval newval)) - (iup:attribute-set! stepsdat "TITLE" newval))))) + (iup:attribute-set! stepsdat "VALUE" newval ))))) ;; "TITLE" newval))))) stepsdat))))) (iup:show self) (iup:callback-set! *tim* "ACTION_CB" (lambda (x) ;; Now start keeping the gui updated from the db Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -647,10 +647,18 @@ db "SELECT id,test_id,stepname,state,status,event_time FROM test_steps WHERE test_id=? ORDER BY id ASC;" ;; event_time DESC,id ASC; test-id) (reverse res))) +;; +(define (make-db:steps-table)(make-vector 5)) +(define-inline (db:steps-table-get-stepname vec) (vector-ref vec 0)) +(define-inline (db:steps-table-get-start vec) (vector-ref vec 1)) +(define-inline (db:steps-table-get-end vec) (vector-ref vec 2)) +(define-inline (db:steps-table-get-status vec) (vector-ref vec 3)) +(define-inline (db:steps-table-get-runtime vec) (vector-ref vec 4)) + ;; get a pretty table to summarize steps ;; (define (db:get-steps-table db test-id) (let ((steps (db:get-steps-for-test db test-id))) ;; organise the steps for better readability Index: server.scm ================================================================== --- server.scm +++ server.scm @@ -45,14 +45,6 @@ (define (server:client-setup db) (let* ((hostinfo (db:get-var db "SERVER")) (hostdat (if hostinfo (string-split hostinfo ":"))) (host (if hostinfo (car hostdat))) (port (if (and hostinfo (> (length hostdat) 1))(cadr hostdat) #f))) - - (rpc:publish-procedure! - 'query - host - (lambda (sql callback) - (print "Executing query '" sql "' ...") - (sqlite3:for-each-row - callback - db sql)))) + (set! *runremote* (vector host port))))