Skip to content

Commit a3248a5

Browse files
committed
refine table display; drop invalid from vega diagram (irrelevant)
1 parent be2f791 commit a3248a5

File tree

5 files changed

+28
-22
lines changed

5 files changed

+28
-22
lines changed

public/css/cortex.css

+5
Original file line numberDiff line numberDiff line change
@@ -252,4 +252,9 @@ input:checked + .slider:before {
252252
table.history-report {
253253
font-size: 12px;
254254
margin-top: 125px;
255+
}
256+
257+
span.history-footnote {
258+
font-size: 12px;
259+
text-align: left;
255260
}

src/backend/reports.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use diesel::dsl::sql;
22
use diesel::pg::PgConnection;
33
use diesel::*;
4-
use std::collections::HashMap;
54
use regex::Regex;
5+
use std::collections::HashMap;
66

77
use crate::helpers::TaskStatus;
88
use crate::models::{Corpus, Service, Task};

src/models/historical_runs.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,7 @@ impl RunMetadataStack {
116116
let mut runs_meta_vega = Vec::new();
117117
for run in runs_meta.iter() {
118118
let total = run.field_f32("total");
119-
for field in &[
120-
"invalid",
121-
"fatal",
122-
"error",
123-
"warning",
124-
"no_problem",
125-
"in_progress",
126-
] {
119+
for field in &["fatal", "error", "warning", "no_problem", "in_progress"] {
127120
runs_meta_vega.push(RunMetadataStack {
128121
severity: field.to_string(),
129122
severity_numeric: TaskStatus::from_key(field).unwrap().raw(),

templates/history.html.tera

+19-11
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
<table class="table table-striped history-report">
2222
<thead>
2323
<tr>
24-
<th class="right">Total</th>
25-
<th class="right">Invalid</th>
26-
<th class="right">Fatal</th>
27-
<th class="right">Error</th>
28-
<th class="right">Warning</th>
2924
<th class="right">No problem</th>
25+
<th class="right">Warning</th>
26+
<th class="right">Error</th>
27+
<th class="right">Fatal</th>
3028
<th class="right">In progress</th>
29+
<th class="right">Total</th>
30+
<th class="right">Invalid</th>
3131
<th class="center">Start time</th>
3232
<th class="center">End time</th>
3333
<th class="left">Owner</th>
@@ -37,21 +37,29 @@
3737
<tbody>
3838
{% for run in history %}
3939
<tr>
40-
<td class="right">{{run.total}}</td>
41-
<td class="right">{{run.invalid}}</td>
42-
<td class="right">{{run.fatal}}</td>
43-
<td class="right">{{run.error}}</td>
44-
<td class="right">{{run.warning}}</td>
4540
<td class="right">{{run.no_problem}}</td>
41+
<td class="right">{{run.warning}}</td>
42+
<td class="right">{{run.error}}</td>
43+
<td class="right">{{run.fatal}}</td>
4644
<td class="right">{{run.in_progress}}</td>
45+
<td class="right">{{run.total}}</td>
46+
<td class="right">{{run.invalid}}</td>
4747
<td class="center">{{run.start_time}}</td>
48-
<td class="center">{{run.end_time}}</td>
48+
<td class="center">{% if run.end_time %} {{run.end_time}} {% else %} <em>ongoing</em> {% endif %}</td>
4949
<td class="left">{{run.owner}}</td>
5050
<td class="left">{{run.description}}</td>
5151
</tr>
5252
{% endfor %}
5353
</tbody>
5454
</table>
55+
<div class="text-left"">
56+
<span class=" history-footnote">Note: <strong>invalid</strong> counts are not included in <strong>total</strong>,
57+
and do not
58+
play part in any ratios.</span><br>
59+
<span class="history-footnote">Note: <strong>in_progress</strong> counts are included, and are non-zero when a
60+
new rerun was started before the reported run was completed.
61+
</span><br>
62+
</div>
5563
</div>
5664
</div>
5765
</div>

templates/vega-history.html.tera

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
"color": {
3838
"field": "severity", "type": "nominal",
3939
"scale": {
40-
"domain": ["invalid", "fatal", "error", "warning", "no_problem", "in_progress"],
41-
"range": ["#D3D3D3", "#dc3545", "#FFA500", "#FFFACD", "#28a745", "#eaf7ff"]
40+
"domain": ["fatal", "error", "warning", "no_problem", "in_progress"],
41+
"range": ["#dc3545", "#FFA500", "#FFFACD", "#28a745", "#eaf7ff"]
4242
}
4343
},
4444
"order": { "field": "severity_numeric", "type": "quantitative", "sort": "ascending" }

0 commit comments

Comments
 (0)