hydra/src/root/common.tt

198 lines
5.6 KiB
Plaintext
Raw Normal View History

[% USE date %]
[% USE HTML %]
2008-11-17 23:59:20 +00:00
[% inputTypes =
{ "svn" = "Subversion checkout"
, "cvs" = "CVS checkout"
2009-11-17 15:16:41 +00:00
, "git" = "Git checkout"
2008-11-17 23:59:20 +00:00
, "tarball" = "Download of a tarball"
, "string" = "String value"
2008-11-25 18:34:24 +00:00
, "boolean" = "Boolean"
2008-11-17 23:59:20 +00:00
, "path" = "Local path"
, "build" = "Build output"
}
%]
[% BLOCK renderDateTime %]
[% date.format(timestamp, '%Y-%m-%d %H:%M:%S') -%]
[% END %]
[% BLOCK renderProjectName -%]
<a href="[% c.uri_for('/project' project) %]"><tt>[% project %]</tt></a>[% END -%]
[% BLOCK renderJobsetName -%]
<a href="[% c.uri_for('/jobset' project jobset) %]"><tt>[% jobset %]</tt></a>[% END -%]
[% BLOCK renderJobName -%]
<a href="[% c.uri_for('/job' project jobset job) %]"><tt>[% job %]</tt></a>[% END -%]
[% BLOCK renderFullJobsetName %]
<tt>
[% INCLUDE renderProjectName %]:[% INCLUDE renderJobsetName %]
</tt>
[% END %]
[% BLOCK renderFullJobName %]
<tt>
[% INCLUDE renderProjectName %]:[% INCLUDE renderJobsetName %]:[% INCLUDE renderJobName %]
</tt>
[% END %]
2009-03-13 14:49:25 +00:00
[% BLOCK renderFullJobNameOfBuild %]
[% INCLUDE renderFullJobName project=build.get_column("project") jobset = build.get_column("jobset") job = build.get_column("job") %]
2009-03-13 14:49:25 +00:00
[% END %]
2009-03-13 16:04:49 +00:00
[% BLOCK renderDuration -%]
[% 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 %][% duration div 60 % 60 %]m[% END %]
[% duration % 60 %]s
[% END %]
[% BLOCK renderBuildList %]
2008-11-27 09:59:29 +00:00
<table class="buildList tablesorter">
<thead>
<tr>
[% IF !hideResultInfo %]
<th></th>
[% END %]
<th>#</th>
[% IF showSchedulingInfo %]
<th>P</th>
[% END %]
<th>Job</th>
<th>Release Name</th>
<th>System</th>
<th>Timestamp</th>
[% IF showStatusChange %]
<th class="headerSortUp">Last status change</th>
[% END %]
[% IF showDescription %]
<th>Description</th>
[% END %]
</tr>
</thead>
<tbody>
2009-03-04 15:41:37 +00:00
[% odd = 0 %]
[% FOREACH build IN builds -%]
2009-03-04 15:41:37 +00:00
<tr class="clickable
[% IF showSchedulingInfo -%]
[% IF build.schedulingInfo.busy %]runningBuild[% ELSIF build.schedulingInfo.disabled == 1 || build.project.enabled == 0 %]disabledBuild[% END %]
2009-03-04 15:41:37 +00:00
[% ELSE -%]
[% IF odd %] odd [% END; odd = !odd -%]
2008-11-30 18:55:03 +00:00
[% END %]"
2008-11-27 09:59:29 +00:00
onclick="window.location = '[% c.uri_for('/build' build.id) %]'">
[% IF !hideResultInfo %]
<td>
[% IF build.get_column('buildstatus') == 0 %]
2009-03-04 15:25:35 +00:00
<img src="/static/images/success.gif" alt="Succeeded" />
[% ELSE %]
2009-03-04 15:25:35 +00:00
<img src="/static/images/failure.gif" alt="Failed" />
[% END %]
</td>
[% END %]
<td><a href="[% c.uri_for('/build' build.id) %]">[% build.id %]</a></td>
[% IF showSchedulingInfo %]
<td>[% build.schedulingInfo.priority %]</td>
[% END %]
<td>
[% INCLUDE renderFullJobNameOfBuild %]
</td>
2009-03-23 15:19:34 +00:00
<td>[% !showSchedulingInfo and build.get_column('releasename') ? build.get_column('releasename') : build.nixname %]</td>
<td><tt>[% build.system %]</tt></td>
<td>[% date.format(build.timestamp, '%Y-%m-%d %H:%M:%S') %]</td>
[% IF showStatusChange %]
<td>
[% IF build.get_column('statusChangeTime') %]
<a href="[% c.uri_for('/build' build.get_column('statusChangeId')) %]">
[% date.format(build.get_column('statusChangeTime'), '%Y-%m-%d %H:%M:%S') %]
</a>
[% ELSE %]
<em>never</em>
[% END %]
</td>
[% END %]
[% IF showDescription %]
<td>[% build.description %]</td>
[% END -%]
</tr>
[% END -%]
</tbody>
</table>
[% END %]
[% BLOCK renderLink %]<a href="[% uri %]">[% title %]</a>[% END %]
[% BLOCK showBuildStats %]
<table class="layoutTable">
<tr>
<th>Finished builds:</th>
<td>[% finishedBuilds %]</td>
</tr>
<tr>
2009-03-04 15:25:35 +00:00
<th><img src="/static/images/success.gif" alt="Succeeded" /> Succeeded builds:</th>
<td>[% succeededBuilds %]</td>
</tr>
<tr>
2009-03-04 15:25:35 +00:00
<th><img src="/static/images/failure.gif" alt="Failed" /> Failed builds:</th>
<td>[% finishedBuilds - succeededBuilds %]</td>
</tr>
<tr>
<th>Total build time:</th>
2009-03-13 16:04:49 +00:00
<td>[% INCLUDE renderDuration duration = totalBuildTime %]</td>
</tr>
<tr>
<th>Scheduled builds:</th>
<td>[% scheduledBuilds %]</td>
</tr>
<tr>
<th>Currently executing builds:</th>
<td>[% busyBuilds %]</td>
</tr>
</table>
2008-11-27 18:27:19 +00:00
[% END %]
2009-10-20 12:26:39 +00:00
[% BLOCK renderViewJobName -%]
2008-11-27 18:27:19 +00:00
[% IF job.description; HTML.escape(job.description); ELSE %]<tt>[% job.job %]</tt> ([% job.attrs %])[% END -%]
[% END -%]
[% BLOCK maybeLink -%]
[% IF uri %]<a [% HTML.attributes(href => uri) %]>[% content %]</a>[% ELSE; content; END -%]
[% END -%]
[% BLOCK renderSelection %]
[% IF edit %]
<select [% HTML.attributes(id => param, name => param) %]>
[% FOREACH name IN options.keys.sort %]
<option [% HTML.attributes(value => name) %] [% IF name == curValue; "selected='selected'"; END %]>[% options.$name %]</option>
[% END %]
</select>
[% ELSE %]
[% options.$curValue %]
[% END %]
[% END %]
[% BLOCK maybeEditString;
IF edit -%]
<input type="text" class="string [% extraClass %]" [% HTML.attributes(id => param, name => param, value => value) %] />
[% ELSE;
HTML.escape(value);
END -%]
[% END -%]