Documentation Source Text

Check-in [1f66b2f1a9]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Show a table of outcomes in the dashboard.tcl app.
Timelines: family | ancestors | descendants | both | test-dashboard
Files: files | file ages | folders
SHA3-256: 1f66b2f1a95fa9a602369a9fa7507a17e1acca3381a12d5aa0dd92e546599d13
User & Date: drh 2019-08-05 11:51:36
Context
2019-08-07
16:43
Updates to the dashboard.tcl app and its client-side library. First working code. check-in: c773092c19 user: drh tags: test-dashboard
2019-08-05
11:51
Show a table of outcomes in the dashboard.tcl app. check-in: 1f66b2f1a9 user: drh tags: test-dashboard
2019-08-02
17:49
In the checklist application, improve the submenu and simplify the login processing. check-in: 20a5bb3601 user: drh tags: test-dashboard
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to misc/dashboard.tcl.

    74     74   
    75     75   # Show a list of test outcomes
    76     76   #
    77     77   proc wapp-page-olist {} {
    78     78     open-database
    79     79     set cnt [db one {SELECT count(*) FROM outcome}]
    80     80     common-header "Test Outcomes" olist
           81  +  wapp-subst {<ul>\n}
           82  +  set last_srchash {}
           83  +  set inner_close {}
           84  +  db eval {SELECT status, testName, platform.name AS pname, srchash, srcdate,
           85  +                  datetime(srcdate) AS sdate,
           86  +                  datetime(outcome.mtime,'unixepoch') AS odate
           87  +             FROM outcome, platform
           88  +            WHERE outcome.mtime>CAST(strftime('%s','now','-1 month') AS INT)
           89  +              AND platform.platformId=outcome.platformId
           90  +            ORDER BY srcdate DESC, outcome.mtime DESC} {
           91  +     if {$srchash!=$last_srchash} {
           92  +       wapp-trim {
           93  +         %unsafe($inner_close)
           94  +         <li><a href='https://sqlite.org/src/timeline?c=%html($srchash)'>
           95  +         %html%($sdate)% %html%([string range $srchash 0 16])%</a>
           96  +         <ol>
           97  +       }
           98  +       set inner_close </ol></li>
           99  +       set last_srchash $srchash
          100  +     }
          101  +     set clr black
          102  +     switch $status {
          103  +       fail {set clr red}
          104  +       running {set clr gray}
          105  +       ok -
          106  +       pass {set clr green}
          107  +     }
          108  +     wapp-trim {
          109  +       <li><span style='color:%html($clr);'>
          110  +       %html($status - $testName at $pname on $odate)</span></li>
          111  +     }
          112  +  }
    81    113     wapp-trim {
    82         -    <p>Number of tests: %html($cnt)</p>
          114  +    %unsafe($inner_close)
          115  +    </ul>
    83    116     }
    84    117     common-footer
    85    118   }
    86    119   
    87    120   # Make sure the Fossil user has the listed capability.
    88    121   # Return 0 on success.  If the capability is missing,
    89    122   # redirect to the login page and return 1.
................................................................................
   148    181     if {!$seen} {
   149    182       common-header "Platform Not Found"
   150    183       wapp-subst {<h1>No such platform: %html($id)</h1>\n}
   151    184       common-footer
   152    185       return
   153    186     }
   154    187     common-header "Details For Platform $name"
          188  +  set u [wapp-param BASE_URL]
   155    189     wapp-trim {
   156    190       <table class="label-value">
   157    191       <tr><th>Name:</td><td>%html($name)</td>
   158    192       <tr><th>OS-Type:</td><td>%html($ostype)</td>
   159    193       <tr><th>OS:</td><td>%html($os)</td>
   160    194       <tr><th>Location:</td><td>%html($location)</td>
   161    195       <tr><th>Description:</td><td>%html($description)</td>
   162    196       <tr><th>Owner:</td><td>%html($owner)</td>
   163    197       <tr><th>Date:</td><td>%html($ctime)</td>
   164         -    <tr><th>Key:</td><td>%html($platformId)</td>
          198  +    <tr><th><tt>dashconfig</tt>:</td><td>%html($u $platformId)</td>
   165    199       <table>
   166    200     }
   167    201     common-footer
   168    202   }
   169    203   
   170    204   # Add a new platform entry
   171    205   #