Megatest

Check-in [2bf1a8a2da]
Login
Overview
Comment:Dynamic updating of target listboxes mostly working
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | runcontrol
Files: files | file ages | folders
SHA1: 2bf1a8a2da2659c040bfd989b72dc08b345c4e04
User & Date: matt on 2013-04-21 00:46:46
Other Links: branch diff | manifest | tags
Context
2013-04-21
01:24
Target selector done check-in: 5a56443663 user: matt tags: runcontrol
00:46
Dynamic updating of target listboxes mostly working check-in: 2bf1a8a2da user: matt tags: runcontrol
2013-04-20
22:42
Basic target updating on run control in place check-in: 4df25afb3e user: matt tags: runcontrol
Changes

Modified dashboard.scm from [c67eed6952] to [9c22af910c].

477
478
479
480
481
482
483
484



















485
486
487
488
489
490
491
492

493
494
495
496
497
498
499
500
501
502
503
504

505
506
507
508
509
510
511
512
513
514


515
516
517
518
519
520
521
	 (runconf-targs (common:get-runconfig-targets))
	 (db-target-dat (open-run-close db:get-targets #f))
	 (header        (vector-ref db-target-dat 0))
	 (db-targets    (vector-ref db-target-dat 1))
	 (tests         (make-hash-table))
	 (action        "-runtests")
	 (cmdln         "")
	 (runlogs       (make-hash-table)))



















    ;; refer to *keys*, *dbkeys* for keys
    (print "db-targets: " db-targets)
    (iup:vbox
     (iup:hbox
       ;; Target and action
      (iup:vbox
        ;; Target selectors
        (apply iup:hbox

	       (let loop ((key     (car header))
			  (remkeys (cdr header))
			  (refvals '())
			  (indx    0)
			  (lbs     '()))
		 (let* ((lb (iup:listbox 
			     key 
			     #:size "x15" 
			     #:fontsize "10"
			     #:expand "YES"
			     ;; #:dropdown "YES"
			     #:editbox "YES"

			     ))
			;; loop though all the targets and build the list for this dropdown
			(selected-value (dashboard:populate-target-dropdown lb refvals db-targets)))
		    (if (null? remkeys)
			(append lbs (list lb))
			(loop (car remkeys)
			      (cdr remkeys)
			      (append refvals (list selected-value))
			      (+ indx 1)
			      (append lbs (list lb))))))))))))



(trace dashboard:populate-target-dropdown
       common:list-is-sublist)

;;       ;; key1 key2 key3 ...
;;       ;; target entry (wild cards allowed)
;;       







|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>








>
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
>
>







477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
	 (runconf-targs (common:get-runconfig-targets))
	 (db-target-dat (open-run-close db:get-targets #f))
	 (header        (vector-ref db-target-dat 0))
	 (db-targets    (vector-ref db-target-dat 1))
	 (tests         (make-hash-table))
	 (action        "-runtests")
	 (cmdln         "")
	 (runlogs       (make-hash-table))
	 (key-listboxes #f)
	 (update-target (lambda (a b c d)
			  (let* ((db-target-dat (open-run-close db:get-targets #f))
				 (db-targets    (vector-ref db-target-dat 1)))
			    (let loop ((key     (car header))
				       (remkeys (cdr header))
				       (refvals '())
				       (indx    0)
				       (lbs     '()))
			      (let* ((lb (list-ref key-listboxes indx))
				     ;; loop though all the targets and build the list for this dropdown
				     (selected-value (dashboard:populate-target-dropdown lb refvals db-targets)))
				(if (null? remkeys)
				    (append lbs (list lb))
				    (loop (car remkeys)
					  (cdr remkeys)
					  (append refvals (list selected-value))
					  (+ indx 1)
					  (append lbs (list lb))))))))))
    ;; refer to *keys*, *dbkeys* for keys
    (print "db-targets: " db-targets)
    (iup:vbox
     (iup:hbox
       ;; Target and action
      (iup:vbox
        ;; Target selectors
        (apply iup:hbox
	       (let ((key-lb
		      (let loop ((key     (car header))
				 (remkeys (cdr header))
				 (refvals '())
				 (indx    0)
				 (lbs     '()))
			(let* ((lb (iup:listbox 
				    key 
				    #:size "x15" 
				    #:fontsize "10"
				    #:expand "YES"
				    ;; #:dropdown "YES"
				    #:editbox "YES"
				    #:action update-target
				    ))
			       ;; loop though all the targets and build the list for this dropdown
			       (selected-value (dashboard:populate-target-dropdown lb refvals db-targets)))
			  (if (null? remkeys)
			      (append lbs (list lb))
			      (loop (car remkeys)
				    (cdr remkeys)
				    (append refvals (list selected-value))
				    (+ indx 1)
				    (append lbs (list lb))))))))
		 (set! key-listboxes key-lb)
		 key-lb)))))))

(trace dashboard:populate-target-dropdown
       common:list-is-sublist)

;;       ;; key1 key2 key3 ...
;;       ;; target entry (wild cards allowed)
;;