Add page showing latest build steps

This commit is contained in:
Eelco Dolstra
2015-07-10 15:08:34 +02:00
parent 0da08df4eb
commit b09f7e0989
8 changed files with 83 additions and 2 deletions

View File

@ -45,7 +45,7 @@
INCLUDE renderDuration duration = curTime - step.starttime;
END %]
</td>
<td>[% step.machine.split('@').1 || step.machine %]</td>
<td>[% INCLUDE renderMachineName machine=step.machine %]</td>
<td>
[% IF step.busy == 1 %]
<strong>Building</strong>

View File

@ -643,4 +643,9 @@ BLOCK createChart %]
[% END;
BLOCK renderMachineName;
machine ? stripSSHUser(machine).match('^([^\.]*)').0 : "localhost";
END;
%]

39
src/root/steps.tt Normal file
View File

@ -0,0 +1,39 @@
[% WRAPPER layout.tt title="Latest steps" %]
[% PROCESS common.tt %]
<p>Showing steps [% (page - 1) * resultsPerPage + 1 %] - [% (page - 1)
* resultsPerPage + steps.size %] of about [% total %] in
order of descending finish time.</p>
<table class="table table-striped table-condensed clickable-rows">
<thead>
<tr>
<th></th>
<th>What</th>
<th>Job</th>
<th>Build</th>
<th>Step</th>
<th>When</th>
<th>Duration</th>
<th>Machine</th>
</tr>
</thead>
<tbody>
[% FOREACH step IN steps %]
<tr>
<td>[% INCLUDE renderBuildStatusIcon buildstatus=step.status size=16 %]</td>
<td><tt>[% step.drvpath.match('-(.*).drv').0 %]</tt></td>
<td><tt>[% INCLUDE renderFullJobNameOfBuild build=step.build %]</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>[% INCLUDE renderRelativeDate timestamp=step.stoptime %]</td>
<td style="width: 10em">[% INCLUDE renderDuration duration = step.stoptime - step.starttime %] </td>
<td><tt>[% INCLUDE renderMachineName machine=step.machine %]</tt></td>
</tr>
[% END %]
</tbody>
</table>
[% INCLUDE renderPager %]
[% END %]

View File

@ -31,6 +31,9 @@
[% INCLUDE menuItem
uri = c.uri_for(c.controller('Root').action_for('all'))
title = "Latest builds" %]
[% INCLUDE menuItem
uri = c.uri_for(c.controller('Root').action_for('steps'))
title = "Latest steps" %]
[% END %]
[% IF project %]