Formatting tweaks

This commit is contained in:
Eelco Dolstra 2013-02-20 16:47:57 +01:00
parent 7da2398f27
commit f544c63607
2 changed files with 28 additions and 29 deletions

View file

@ -54,9 +54,9 @@ END;
BLOCK renderDuration; BLOCK renderDuration;
IF duration >= 24 * 60 * 60; duration div (24 * 60 * 60) %]d[% END; IF duration >= 24 * 60 * 60; duration div (24 * 60 * 60) %]d [% END;
IF duration >= 60 * 60; duration div (60 * 60) % 24 %]h[% END; IF duration >= 60 * 60; duration div (60 * 60) % 24 %]h [% END;
IF duration >= 60; duration div 60 % 60 %]m[% END; IF duration >= 60; duration div 60 % 60 %]m [% END;
duration % 60 %]s[% duration % 60 %]s[%
END; END;

View file

@ -2,38 +2,37 @@
[% PROCESS common.tt %] [% PROCESS common.tt %]
<table class="table table-condensed table-striped"> <table class="table table-condensed table-striped">
[% FOREACH m IN machines %] [% FOREACH m IN machines %]
<thead> <thead>
<tr> <tr>
<th colspan="5"> <th colspan="5">
[% IF m.enabled == 1 %] [% IF m.enabled == 1 %]
<a class="btn btn-success btn-mini" href="[% c.uri_for('/admin/machine' m.hostname 'disable' ) %]">Running</a> <a class="btn btn-success btn-mini" href="[% c.uri_for('/admin/machine' m.hostname 'disable' ) %]">Running</a>
[% ELSE %] [% ELSE %]
<a class="btn btn-danger btn-mini" href="[% c.uri_for('/admin/machine' m.hostname 'enable' ) %]">Stopped</a> <a class="btn btn-danger btn-mini" href="[% c.uri_for('/admin/machine' m.hostname 'enable' ) %]">Stopped</a>
[% END %] [% END %] <tt>[% m.hostname %]</tt> (<tt>[% comma=0; FOREACH ms IN m.buildmachinesystemtypes %][% IF comma; %], [% ELSE; comma = 1; END; ms.system; END %])</tt>
[% m.hostname %] <tt>[% FOREACH ms IN m.buildmachinesystemtypes %] [% ms.system %][% END %]</tt> </th>
</th> </tr>
</tr>
</thead> </thead>
<tbody> <tbody>
[% idle = 1 %] [% idle = 1 %]
[% FOREACH step IN steps %] [% FOREACH step IN steps %]
[% IF step.machine.match('@(.*)').0 == m.hostname %] [% IF step.machine.match('@(.*)').0 == m.hostname %]
[% idle = 0 %] [% idle = 0 %]
<tr> <tr>
<td><tt>[% INCLUDE renderFullJobName project = step.build.project.name jobset = step.build.jobset.name job = step.build.job.name %]</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><tt>[% step.system %]</tt></td>
<td><a href="[% c.uri_for('/build' step.build.id) %]">[% step.build.id %]</a></td> <td><a href="[% c.uri_for('/build' step.build.id) %]">[% step.build.id %]</a></td>
<td><tt>[% step.drvpath.match('-(.*)').0 %]</tt></td> <td><tt>[% step.drvpath.match('-(.*)').0 %]</tt></td>
<td class='right'>[% INCLUDE renderDuration duration = curTime - step.starttime %] </td> <td class='right'>[% INCLUDE renderDuration duration = curTime - step.starttime %] </td>
</tr> </tr>
[% END %] [% END %]
[% END %] [% END %]
[% IF idle == 1 %] [% IF idle == 1 %]
<tr><td colspan="5">Idle since [% INCLUDE renderDuration duration = curTime - m.get_column('idle') %]</td></tr> <tr><td colspan="5">Idle since [% INCLUDE renderDuration duration = curTime - m.get_column('idle') %]</td></tr>
[% END %] [% END %]
</tbody> </tbody>
[% END %] [% END %]
</table> </table>