Skip to content

Commit e87ebc4

Browse files
author
Bastien Abadie
committed
Use default values in routing for zero coverage
1 parent 9284072 commit e87ebc4

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

frontend/src/base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ <h2>
103103
</script>
104104

105105
<script id="menu_browser" type="x-tmpl-mustache">
106-
<a href="#view=zero&third_party=on&cpp=on&js=on=java=on&rust=on">View the zero coverage report</a>
106+
<a href="#view=zero">View the zero coverage report</a>
107107
&bull;
108108
<input type="text" name="revision" placeholder="Mercurial revision" value="{{revision}}"></input>
109109
&bull;

frontend/src/route.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ export function readRoute() {
2020
if (!out.path) {
2121
out.path = '';
2222
}
23+
if (out.view && out.view == 'zero') {
24+
for (let key of ['third_party', 'cpp', 'js', 'java', 'rust']) {
25+
if (!out[key]) {
26+
out[key]= 'on';
27+
}
28+
}
29+
}
30+
2331
return out;
2432
}
2533

frontend/src/zero_coverage_report.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const ZERO_COVERAGE_FILTERS = {
1212
};
1313
const ZERO_COVERAGE_PUSHES = {
1414
'all': 'All',
15-
'one_year': '0 &lt; 1 year',
16-
'two_years': '1 &lt; 2 years',
15+
'one_year': '0 < 1 year',
16+
'two_years': '1 < 2 years',
1717
'older_than_two_years': 'Older than 2 years',
1818
}
1919

0 commit comments

Comments
 (0)