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.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | test-dashboard
Files: files | file ages | folders
SHA3-256: 1f66b2f1a95fa9a602369a9fa7507a17e1acca3381a12d5aa0dd92e546599d13
User & Date: drh 2019-08-05 11:51:36.753
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
Unified Diff Ignore Whitespace Patch
Changes to misc/dashboard.tcl.
74
75
76
77
78
79
80











81
















82






83
84
85
86
87
88
89

# Show a list of test outcomes
#
proc wapp-page-olist {} {
  open-database
  set cnt [db one {SELECT count(*) FROM outcome}]
  common-header "Test Outcomes" olist











  wapp-trim {
















    <p>Number of tests: %html($cnt)</p>






  }
  common-footer
}

# Make sure the Fossil user has the listed capability.
# Return 0 on success.  If the capability is missing,
# redirect to the login page and return 1.







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







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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122

# Show a list of test outcomes
#
proc wapp-page-olist {} {
  open-database
  set cnt [db one {SELECT count(*) FROM outcome}]
  common-header "Test Outcomes" olist
  wapp-subst {<ul>\n}
  set last_srchash {}
  set inner_close {}
  db eval {SELECT status, testName, platform.name AS pname, srchash, srcdate,
                  datetime(srcdate) AS sdate,
                  datetime(outcome.mtime,'unixepoch') AS odate
             FROM outcome, platform
            WHERE outcome.mtime>CAST(strftime('%s','now','-1 month') AS INT)
              AND platform.platformId=outcome.platformId
            ORDER BY srcdate DESC, outcome.mtime DESC} {
     if {$srchash!=$last_srchash} {
       wapp-trim {
         %unsafe($inner_close)
         <li><a href='https://sqlite.org/src/timeline?c=%html($srchash)'>
         %html%($sdate)% %html%([string range $srchash 0 16])%</a>
         <ol>
       }
       set inner_close </ol></li>
       set last_srchash $srchash
     }
     set clr black
     switch $status {
       fail {set clr red}
       running {set clr gray}
       ok -
       pass {set clr green}
     }
     wapp-trim {
       <li><span style='color:%html($clr);'>
       %html($status - $testName at $pname on $odate)</span></li>
     }
  }
  wapp-trim {
    %unsafe($inner_close)
    </ul>
  }
  common-footer
}

# Make sure the Fossil user has the listed capability.
# Return 0 on success.  If the capability is missing,
# redirect to the login page and return 1.
148
149
150
151
152
153
154

155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
  if {!$seen} {
    common-header "Platform Not Found"
    wapp-subst {<h1>No such platform: %html($id)</h1>\n}
    common-footer
    return
  }
  common-header "Details For Platform $name"

  wapp-trim {
    <table class="label-value">
    <tr><th>Name:</td><td>%html($name)</td>
    <tr><th>OS-Type:</td><td>%html($ostype)</td>
    <tr><th>OS:</td><td>%html($os)</td>
    <tr><th>Location:</td><td>%html($location)</td>
    <tr><th>Description:</td><td>%html($description)</td>
    <tr><th>Owner:</td><td>%html($owner)</td>
    <tr><th>Date:</td><td>%html($ctime)</td>
    <tr><th>Key:</td><td>%html($platformId)</td>
    <table>
  }
  common-footer
}

# Add a new platform entry
#







>









|







181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
  if {!$seen} {
    common-header "Platform Not Found"
    wapp-subst {<h1>No such platform: %html($id)</h1>\n}
    common-footer
    return
  }
  common-header "Details For Platform $name"
  set u [wapp-param BASE_URL]
  wapp-trim {
    <table class="label-value">
    <tr><th>Name:</td><td>%html($name)</td>
    <tr><th>OS-Type:</td><td>%html($ostype)</td>
    <tr><th>OS:</td><td>%html($os)</td>
    <tr><th>Location:</td><td>%html($location)</td>
    <tr><th>Description:</td><td>%html($description)</td>
    <tr><th>Owner:</td><td>%html($owner)</td>
    <tr><th>Date:</td><td>%html($ctime)</td>
    <tr><th><tt>dashconfig</tt>:</td><td>%html($u $platformId)</td>
    <table>
  }
  common-footer
}

# Add a new platform entry
#