Megatest

Diff
Login

Differences From Artifact [563dea2bd2]:

To Artifact [f142c4ac47]:


346
347
348
349
350
351
352
353
354
355
356









357
358

359
360
361
362
363
364
365
346
347
348
349
350
351
352




353
354
355
356
357
358
359
360
361
362

363
364
365
366
367
368
369
370







-
-
-
-
+
+
+
+
+
+
+
+
+

-
+







			  (iup:hbox 
			   (iup:button "View Log"    #:action viewlog #:size "120x")
			   (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 
									     (format #f fmtstr "Stepname" "Start" "End"    "Status" "Time")
									     (format #f fmtstr "========" "=====" "======" "======" "=========="))
376
377
378
379
380
381
382
383

384
385
386
387
388
389
390
381
382
383
384
385
386
387

388
389
390
391
392
393
394
395







-
+







										 (sort (hash-table-values comprsteps)
										       (lambda (a b)
											 (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
			   (refreshdat) ;; update from the db here
					;(thread-suspend! other-thread)