Overview
Comment: | updates for paging |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.64-envdebug |
Files: | files | file ages | folders |
SHA1: |
69de53020b4238018753906ffa97c478 |
User & Date: | pjhatwal on 2017-04-07 11:58:28 |
Other Links: | branch diff | manifest | tags |
Context
2017-04-10
| ||
19:08 | added tabbed view check-in: 1a6243bbfb user: pjhatwal tags: v1.64-envdebug | |
2017-04-07
| ||
11:58 | updates for paging check-in: 69de53020b user: pjhatwal tags: v1.64-envdebug | |
2017-04-06
| ||
11:20 | Capturing merge of misc-changes-please-integrate into v1.64-envdebug check-in: e62592f0fe user: mrwellan tags: v1.64-envdebug | |
Changes
Modified cgisetup/models/pgdb.scm from [add2d5c9c3] to [9e0fc9a7e5].
︙ | |||
195 196 197 198 199 200 201 202 203 204 205 206 207 208 | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | + | "SELECT r.target,COUNT(*) AS total, SUM(CASE WHEN t.status='PASS' THEN 1 ELSE 0 END) AS pass, SUM(CASE WHEN t.status='FAIL' THEN 1 ELSE 0 END) AS fail, SUM(CASE WHEN t.status IN ('PASS','FAIL') THEN 0 ELSE 1 END) AS other 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 r.target;" target-patt)) (define (pgdb:get-latest-run-stats-given-target dbh ttype-id 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 ttype_id=? AND r.target LIKE ? GROUP BY r.target,t.status;" "SELECT r.target,COUNT(*) AS total, |
︙ | |||
225 226 227 228 229 230 231 | 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | - - - - + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + | SUM(CASE WHEN t.status='FAIL' THEN 1 ELSE 0 END) AS fail, SUM(CASE WHEN t.status IN ('PASS','FAIL') THEN 0 ELSE 1 END) AS other FROM tests AS t INNER JOIN runs AS r ON t.run_id=r.id WHERE t.state like '%' AND ttype_id=? AND r.target LIKE ? GROUP BY r.run_name;" ttype-id target-patt )) |
︙ | |||
377 378 379 380 381 382 383 | 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 | + + + + + + + + + + | (let* ((data (make-hash-table))) (for-each (lambda (run) (let* ((run-name (vector-ref run 0))) (hash-table-set! data run-name run))) runs) data)) (define (pgdb:get-pg-lst tab2-pages) (let loop ((i 1) (lst `())) (cond ((> i tab2-pages ) lst) (else (loop (+ i 1) (append lst (list i))))))) |
Modified cgisetup/pages/home_ctrl.scm from [e5b104a203] to [41e384af97].
︙ | |||
13 14 15 16 17 18 19 | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | - + - + + + + + | (define (home-action action) (case (string->symbol action) ((filter) (let ((target-type (s:get-input 'target-type)) (target-filter (s:get-input 'tfilter)) (target (s:get-input 'target)) |
Modified cgisetup/pages/home_view.scm from [4f70880903] to [974b5d0835].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 | + + + + + + + - + + + + + + - + + + + + - + + + + + + + + + - + - + - + + + + + + + | ;;====================================================================== ;; Copyright 2017, Matthew Welland. ;; ;; This program is made available under the GNU GPL version 2.0 or ;; greater. See the accompanying file COPYING for details. ;; ;; This program is distributed WITHOUT ANY WARRANTY; without even the ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ;; PURPOSE. ;;====================================================================== (define (pages:home session db shared) (let* ((dbh (s:db)) (tab2-limit 15) (tab2-page (if (or (equal? (s:get-param "page") "") (equal? (s:get-param "page") #f)) 1 (string->number (s:get-param "page")))) (tab2-offset (- (* tab2-limit tab2-page) tab2-limit)) (ttypes (pgdb:get-target-types dbh)) (selected (string->number (or (s:get "target-type") "-1"))) (target-slice (pgdb:get-distict-target-slice dbh)) (selected-slice (if (s:get "tslice") |
︙ |
Modified cgisetup/pages/index.scm from [5f74568a94] to [33603d85dd].
1 2 3 4 5 6 7 8 9 10 11 12 13 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | + - - + + | ;;====================================================================== ;; Copyright 2017, Matthew Welland. ;; ;; This program is made available under the GNU GPL version 2.0 or ;; greater. See the accompanying file COPYING for details. ;; ;; This program is distributed WITHOUT ANY WARRANTY; without even the ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ;; PURPOSE. ;;====================================================================== (use regex) ;; (load "models/pgdb.scm") |