Megatest

Check-in [a624813a5a]
Login
Overview
Comment:Added more illustration for cgi
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.64
Files: files | file ages | folders
SHA1: a624813a5ada386bf7bf728bd416d30c58acca1f
User & Date: matt on 2017-02-26 22:07:25
Other Links: branch diff | manifest | tags
Context
2017-02-27
02:34
changed to -sync-to and added sqlite3 as target check-in: 19de5493ad user: matt tags: v1.64
2017-02-26
22:07
Added more illustration for cgi check-in: a624813a5a user: matt tags: v1.64
21:47
Very primitive example cgi page working check-in: d764a365bb user: matt tags: v1.64
Changes

Modified cgisetup/pages/index_view.scm from [9c272c0b09] to [792ee1b6e9].

13
14
15
16
17
18
19
20


21
22
23
24
    (s:body
     (s:div 'class "grid flex" 'id "top_of_page"
	    ;; add visible to columns to help visualize them e.g. "col_12 visible"
	    ;; BEGINNING OF HEADER
	    (s:div 'class "col_12"
		   (map (lambda (area)
			  (s:p "data=" (conc area)))
			(pgdb:get-tests dbh "%"))


		   index:jquery
		   index:javascript
		   ))))))








|
>
>




13
14
15
16
17
18
19
20
21
22
23
24
25
26
    (s:body
     (s:div 'class "grid flex" 'id "top_of_page"
	    ;; add visible to columns to help visualize them e.g. "col_12 visible"
	    ;; BEGINNING OF HEADER
	    (s:div 'class "col_12"
		   (map (lambda (area)
			  (s:p "data=" (conc area)))
			;; (pgdb:get-tests dbh "%")
			(pgdb:get-stats-given-target dbh "v1.63/%")
			)
		   index:jquery
		   index:javascript
		   ))))))

Modified pgdb.scm from [297e203ead] to [c1d8e3c1bf].

164
165
166
167
168
169
170







(define (pgdb:get-tests dbh target-patt)
  (dbi:get-rows
   dbh
   "SELECT t.id,t.run_id,t.test_name,t.item_path,t.state,t.status,t.host,t.cpuload,t.diskfree,t.uname,t.rundir,t.final_logf,t.run_duration,t.comment,t.event_time,t.archived,
           r.id,r.target,r.ttype_id,r.run_name,r.state,r.status,r.owner,r.event_time,r.comment
     FROM tests AS t INNER JOIN runs AS r ON t.run_id=r.id
      WHERE r.target LIKE ?;" target-patt))














>
>
>
>
>
>
>
164
165
166
167
168
169
170
171
172
173
174
175
176
177
(define (pgdb:get-tests dbh target-patt)
  (dbi:get-rows
   dbh
   "SELECT t.id,t.run_id,t.test_name,t.item_path,t.state,t.status,t.host,t.cpuload,t.diskfree,t.uname,t.rundir,t.final_logf,t.run_duration,t.comment,t.event_time,t.archived,
           r.id,r.target,r.ttype_id,r.run_name,r.state,r.status,r.owner,r.event_time,r.comment
     FROM tests AS t INNER JOIN runs AS r ON t.run_id=r.id
      WHERE r.target LIKE ?;" target-patt))

(define (pgdb:get-stats-given-target dbh target-patt)
  (dbi:get-rows
   dbh
   "SELECT COUNT(t.id),t.status,r.target FROM tests AS t INNER JOIN runs AS r ON t.run_id=r.id
        WHERE t.state='COMPLETED' AND r.target LIKE ? GROUP BY t.status,r.target;" target-patt))