-
Notifications
You must be signed in to change notification settings - Fork 205
/
overview.html.ep
244 lines (241 loc) · 13.2 KB
/
overview.html.ep
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
% use DateTime;
% layout 'bootstrap';
% title 'Test summary';
% use OpenQA::Jobs::Constants;
% use List::Util qw(sum);
% content_for 'ready_function' => begin
window.overviewParallelChildrenCollapsableResultsSel = '<%= $parallel_children_collapsable_results_sel %>';
setupOverview();
% end
% if ($limit_exceeded) {
<div class="alert alert-warning" id="max-jobs-limit" role="alert">
<i class="fa fa-exclamation-circle"></i> Only <%= $limit_exceeded %> results included, please narrow down your search parameters.
</div>
% }
<div>
<h2>Test result overview</h2>
<div id="summary" class="card <%= ($aggregated->{failed} + $aggregated->{not_complete}) ? 'border-danger' : 'border-success' %>">
<div class="card-header">
Overall Summary of
% if (@$summary_parts) {
<strong><% for my $part (@$summary_parts) { %><%= $part %><% } %></strong>
% }
% else {
multiple distri/version
% }
% if ($build) {
build <%= $build %>
% }
<div class="time-params">
% if ($until) {
from <abbr class="timeago" title="<%= $until %>Z"><%= $until %>Z</abbr>,
<a href="<%= url_with->query({t => undef}) %>">show latest jobs</a>
% }
% else {
showing latest jobs,
<a href="<%= url_with->query({t => format_time(DateTime->now)}) %>">overview fixed to the current time</a>
%}
</div>
</div>
<div class="card-body">
% my $allow_commenting = @$job_ids && current_user;
% if ($allow_commenting) {
<button type="button" class="btn btn-secondary btn-circle btn-sm trigger-edit-button" onclick="showAddCommentsDialog()" title="Add comments">
<i class="fa fa-comment" aria-hidden="true"></i>
</button>
% }
% my @badges = qw(success secondary warning danger info primary light light);
% my @labels = qw(Passed Incomplete Soft-Failed Failed Scheduled Running Aborted None);
% my $index = 0;
% for my $category (qw(passed not_complete softfailed failed scheduled running aborted none)) {
% my ($label, $badge) = ($labels[$index], $badges[$index++]);
% next unless my $count = delete $aggregated->{$category};
<%= $label %>: <span class="badge text-bg-<%= $badge %>"><%= $count %></span>
% }
% if (my $unknown_count = sum values %$aggregated) {
Unknown: <span class="badge text-bg-light"><%= $unknown_count %></span>
% }
</div>
</div>
<div class="card" id="filter-panel">
<div class="card-header"><strong>Filter</strong>
<%= help_popover('Help for the <em>test overview</em>' => '
<p>This page shows an overview of job results in a matrix
view. Only the latest job for each scenario is shown. The
view can be configured based on query parameters which can
be set within this filter box.</p>
<p><b>Caveat:</b> Based on the parameters the resulting
job query might consider jobs as latest which do not
represent the complete picture for a corresponding
"latest" build so be careful with a more advanced
selection of checkboxes with the interpretation of the
results.</p>
<p>Additional tweaking of the query is possible by leaving
out query parameters completely or specifying them
multiple times equivalent to an logical "or" search.</p>',
'https://open.qa/docs/#_allow_group_overview_query_by_result_gh531' => 'the documentation')
%>
<span>no filter present, click to toggle filter form</span>
</div>
<div class="card-body">
<form action="#" method="get" id="filter-form">
<div class="mb-3" id="filter-results">
<strong>Job result</strong>
% for my $result (OpenQA::Jobs::Constants::RESULTS) {
<label class="form-label"><input value="<%= $result %>" name="result" type="checkbox" id="filter-<%= $result %>"> <%= ucfirst $result =~ s/_/ /r %></label>
% }
</div>
<div class="mb-3" id="filter-states">
<strong>Job state</strong>
% for my $state (OpenQA::Jobs::Constants::STATES) {
<label class="form-label"><input value="<%= $state %>" name="state" type="checkbox" id="filter-<%= $state %>"> <%= ucfirst $state =~ s/_/ /r %></label>
% }
</div>
<div class="row" id="filter-arch-flavor">
<div class="col-5">
<div class="mb-3">
<strong>Architecture</strong>
<input type="text" class="form-control" name="arch" placeholder="any" id="filter-arch">
</div>
</div>
<div class="col-5">
<div class="mb-3">
<strong>Flavor</strong>
<input type="text" class="form-control" name="flavor" placeholder="any" id="filter-flavor">
</div>
</div>
</div>
<div class="row" id="filter-machine-test">
<div class="col-5">
<div class="mb-3">
<strong>Machines</strong>
<input type="text" class="form-control" name="machine" placeholder="any" id="filter-machine">
</div>
</div>
<div class="col-5">
<div class="mb-3">
<strong>Test</strong>
<input type="text" class="form-control" name="test" placeholder="any" id="filter-test">
</div>
</div>
</div>
<div class="row" id="filter-modules">
<div class="col-4">
<div class="mb-3">
<label class="form-label" for="modules"><strong>Module name</strong></label>
<%= help_popover('Help for the <em>Module name</em> filter' => '
<p>Shows jobs that contain the specified modules</p>') %>
<input name="modules" type="text" id="modules"
placeholder="modules, comma separated, e.g. mod1,mod2"
class="form-control">
</div>
</div>
<div class="col-4">
<div class="mb-3">
<label class="form-label" for="filter-module-re"><strong>Module code</strong></label>
<%= help_popover('Help for the <em>Module code</em> filter' => '
<p>Shows jobs that contain the modules found by grep command over module source code</p>') %>
<input type="text" class="form-control" name="module_re" placeholder="regular expression" id="filter-module-re">
</div>
</div>
<div class="col-2">
<div class="mb-3">
<label class="form-label" for="modules_result"><strong>Module result</strong></label>
<%= help_popover('Help for the <em>Module result</em> filter' => '<p>Show jobs with selected result.</p>') %>
<select name="modules_result" id="modules_result" data-placeholder="any" class="chosen-select" multiple>
% for my $modules_result (OpenQA::Jobs::Constants::MODULE_RESULTS) {
<option><%= $modules_result %></option>
% }
</select>
</div>
</div>
</div>
<div class="row" id="filter-job-groups">
<div class="col-5">
<div class="mb-3">
<label class="form-label" for="group-glob"><strong>Include job groups</strong></label>
<%= help_popover('Help for the <em>Include job group</em> filter' => '
<p>Shows jobs from job groups matching these globs</p>') %>
<input name="group_glob" type="text" id="group-glob"
placeholder="globs, comma separated, e.g. *kernel*,*Tumbleweed*"
class="form-control">
</div>
</div>
<div class="col-5">
<div class="mb-3">
<label class="form-label" for="not-group-glob"><strong>Exclude job groups</strong></label>
<%= help_popover('Help for the <em>Exclude job groups</em> filter' => '
<p>Do not show jobs matching these globs</p>') %>
<input type="text" class="form-control" name="not_group_glob"
placeholder="globs, comma separated, e.g. *development*,*test*" id="not-group-glob">
</div>
</div>
</div>
<div class="row">
<div class="col-5">
<div class="mb-3">
<label class="form-label" for="comment-text-filter"><strong>Comment text</strong></label>
<%= help_popover('Help for the <em>Comment text</em> filter' => '
<p>Show only jobs with comments containing the specified term</p>') %>
<input type="text" class="form-control" name="comment"
placeholder="comment text" id="comment-text-filter">
</div>
</div>
<div class="col-5">
<div class="mb-3">
<strong>Misc</strong>
<input value="1" name="todo" type="checkbox" id="filter-todo">
<label class="form-label" for="filter-todo">TODO</label>
%= help_popover_todo
</div>
</div>
</div>
<button type="submit" class="btn btn-primary">Apply</button>
</form>
</div>
</div>
%= include 'layouts/info'
% for my $distri (sort keys %$results) {
% my $type_prefix_distri = $only_distri ? '' : "Distri: $distri / ";
% my $version_results = $results->{$distri};
% my $only_version = scalar keys %$version_results == 1;
% for my $version (sort keys %$version_results) {
% my $type_prefix = $type_prefix_distri . ($only_version && $only_distri ? '' : " Version: $version / ");
% my $type_archs = $archs->{$distri}{$version};
% for my $type (sort keys %$type_archs) {
% my $type_result = $version_results->{$version}{$type};
<h3><%= $type_prefix %>Flavor: <%= $type %></h3>
%= include 'test/overview_result_table', type => $type, type_results => $type_result, type_archs => $type_archs->{$type}
% }
% }
% }
</div>
% if ($allow_commenting) {
<div class="modal fade" id="add-comments-modal">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<form action="<%= url_for('apiv1_post_comments')->query(job_id => $job_ids) %>" method="post" onsubmit="addComments(this); return false;">
<div class="modal-header">
<h4 class="modal-title">Add comment on all currently shown jobs</h4>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body">
%= include 'comments/add_comment_form_groups', group_comment => 0, nosubmit => 1
</div>
<div class="modal-footer">
<div id="add-comments-progress-indication">
<div class="flex-fill"><i class="fa fa-cog fa-spin fa-fw"></i> Saving…</div>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
<div id="add-comments-controls">
<button type="submit" class="btn btn-danger">
<i class="fa fa-comment"></i> Submit comment on all <%= scalar @$job_ids %> jobs
</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Discard</button>
</div>
</div>
</form>
</div>
</div>
</div>
% }