forked from lix-project/hydra
/queue-summary: Show number of queued builds by system type
This commit is contained in:
parent
aba2356932
commit
6fc4dc4e27
|
@ -109,6 +109,10 @@ sub queue_summary :Local :Path('queue-summary') :Args(0) {
|
||||||
"select project, jobset, count(*) as queued, min(timestamp) as oldest, max(timestamp) as newest from Builds " .
|
"select project, jobset, count(*) as queued, min(timestamp) as oldest, max(timestamp) as newest from Builds " .
|
||||||
"where finished = 0 group by project, jobset order by queued desc",
|
"where finished = 0 group by project, jobset order by queued desc",
|
||||||
{ Slice => {} });
|
{ Slice => {} });
|
||||||
|
|
||||||
|
$c->stash->{systems} = dbh($c)->selectall_arrayref(
|
||||||
|
"select system, count(*) as c from Builds where finished = 0 group by system order by c desc",
|
||||||
|
{ Slice => {} });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,23 @@
|
||||||
</tdata>
|
</tdata>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
<table class="table table-striped table-condensed">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>System type</th>
|
||||||
|
<th># Queued</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tdata>
|
||||||
|
[% FOREACH s IN systems %]
|
||||||
|
<tr>
|
||||||
|
<td><tt>[% HTML.escape(s.system) %]</tt></td>
|
||||||
|
<td>[% s.c %]</td>
|
||||||
|
</tr>
|
||||||
|
[% END %]
|
||||||
|
</tdata>
|
||||||
|
</table>
|
||||||
|
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
||||||
[% END %]
|
[% END %]
|
||||||
|
|
Loading…
Reference in a new issue