/queue-summary: Show number of queued builds by system type

This commit is contained in:
Eelco Dolstra 2016-03-22 17:03:26 +01:00
parent aba2356932
commit 6fc4dc4e27
2 changed files with 21 additions and 0 deletions

View file

@ -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 => {} });
} }

View file

@ -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 %]