-
Notifications
You must be signed in to change notification settings - Fork 1
/
overview.html
99 lines (96 loc) · 2.67 KB
/
overview.html
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
<!DOCTYPE html>
<html>
<head>
<title>Test Runs Overview</title>
<script src="https://code.jquery.com/jquery-3.7.1.min.js"
integrity="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo=" crossorigin="anonymous"></script>
<script type="text/javascript">
function reload() { location.reload(); }
function cancelTest(id, headers) { $.ajax({ type: "DELETE", url: "/test/" + id, headers: headers, success: reload }); }
function resume(headers) { $.ajax({ type: "POST", url: "/status/resume", headers: headers, success: reload }); }
</script>
<style>
.collapsible {
color: rgb(0, 0, 238);
cursor: pointer;
padding: 0.25rem;
width: fit-content;
border: none;
text-align: left;
outline: none;
}
.active, .collapsible:hover {
color: rgb(85, 26, 139);
}
.content {
padding: 0 0.5rem;
display: none;
overflow: hidden;
}
</style>
</head>
<body>
<h1>Test Runner</h1>
<p><strong>Status</strong>: {{status}}{{#action}} <input id="action" type="button" value="{{label}}"
onclick="{{onClick}}" />{{/action}}</p>
<h2>Queued Tests</h2>
{{^queued}}
<p>No queued tests found.</p>
{{/queued}}
<ul>
{{#queued}}
<li>{{name}} (queued at: {{timestamp}}, category: {{category}})</li>
{{/queued}}
</ul>
<h2>Running Test</h2>
{{^current}}
<p>No test running.</p>
{{/current}}
{{#current}}
<p>
<strong>Test</strong>: {{name}}</br>
<strong>Started at</strong>: {{timestamp}}, see <a href="{{link}}" target="_blank">{{text}}</a></br>
<strong>Category</strong>: {{category}}
</p>
{{/current}}
<h2>Completed Tests</h2>
{{^tests}}
<p>No completed tests found.</p>
{{/tests}}
{{#tests}}
<h3 class="collapsible">{{category}}</h3>
<div class="content">
{{#group}}
<h4 class="collapsible">Test: {{name}}</h4>
<div class="content">
<ul>
{{#group}}
<li>
Test run started at {{timestamp}}: {{status}}, see <a href="{{link}}" target="_blank">{{text}}</a>
{{#stats}}
<span> <a href="{{stats}}" target="_blank">stats</a></span>
{{/stats}}
</li>
{{/group}}
</ul>
</div>
{{/group}}
</div>
{{/tests}}
<script>
var coll = document.getElementsByClassName("collapsible");
var i;
for (i = 0; i < coll.length; i++) {
coll[i].addEventListener("click", function() {
this.classList.toggle("active");
var content = this.nextElementSibling;
if (content.style.display === "block") {
content.style.display = "none";
} else {
content.style.display = "block";
}
});
}
</script>
</body>
</html>