Status page: Show running builds rather than build steps

The active build steps list was redundant, because the "Machine
status" page also shows them. So instead show active builds.
This commit is contained in:
Eelco Dolstra 2014-09-25 20:17:33 +02:00
parent 23a9fea26c
commit 2054759fdf
4 changed files with 14 additions and 26 deletions

View file

@ -99,10 +99,7 @@ sub status_GET {
my ($self, $c) = @_;
$self->status_ok(
$c,
entity => [ $c->model('DB::BuildSteps')->search(
{ 'me.busy' => 1, 'build.finished' => 0, 'build.busy' => 1 },
{ order_by => [ 'machine' ], join => [ 'build' ] }
) ]
entity => [$c->model('DB::Builds')->search({finished => 0, busy => 1}, { order_by => ["priority DESC", "id"]})]
);
}

View file

@ -1,9 +1,9 @@
[% WRAPPER layout.tt title="Queue" %]
[% PROCESS common.tt %]
[% IF queue.size == 0 %]
[% IF resource.size == 0 %]
<p>The queue is empty.</p>
<div class="alert alert-info">There are no pending builds.</div>
[% ELSE %]

View file

@ -1,23 +1,14 @@
[% WRAPPER layout.tt title="Active build steps" %]
[% WRAPPER layout.tt title="Running builds" %]
[% PROCESS common.tt %]
<table class="table table-striped table-condensed clickable-rows">
<thead>
<tr><th>Machine</th><th>Job</th><th>Type</th><th>Build</th><th>Step</th><th>What</th><th>Since</th></tr>
</thead>
<tbody>
[% FOREACH step IN resource %]
<tr>
<td><tt>[% IF step.machine; step.machine.match('@(.*)').0; ELSE; 'localhost'; END %]</tt></td>
<td><tt>[% INCLUDE renderFullJobName project = step.build.project.name jobset = step.build.jobset.name job = step.build.job.name %]</tt></td>
<td><tt>[% step.system %]</tt></td>
<td><a href="[% c.uri_for('/build' step.build.id) %]">[% step.build.id %]</a></td>
<td><a class="row-link" href="[% c.uri_for('/build' step.build.id 'nixlog' step.stepnr 'tail-reload') %]">[% step.stepnr %]</a></td>
<td><tt>[% step.drvpath.match('-(.*)').0 %]</tt></td>
<td style="width: 10em">[% INCLUDE renderDuration duration = curTime - step.starttime %] </td>
</tr>
[% END %]
</tbody>
</table>
[% IF resource.size == 0 %]
<div class="alert alert-info">There are no running builds.</div>
[% ELSE %]
[% INCLUDE renderBuildList builds=resource showSchedulingInfo=1 hideResultInfo=1 %]
[% END %]
[% END %]

View file

@ -21,7 +21,7 @@
title = "Queue ("_ nrRunningBuilds _"/"_ nrQueuedBuilds _")" %]
[% INCLUDE menuItem
uri = c.uri_for(c.controller('Root').action_for('status'))
title = "Active build steps" %]
title = "Running builds" %]
[% INCLUDE menuItem
uri = c.uri_for(c.controller('Root').action_for('machines'))
title = "Machine status" %]