Get rid of unnecessary [%- and -%] tags

This commit is contained in:
Eelco Dolstra 2013-02-14 16:51:42 +01:00
parent 82daf4f8ca
commit 2fa1a7efa7
15 changed files with 171 additions and 171 deletions

View file

@ -207,13 +207,13 @@
<h2 id="nix-error">Nix error output</h2> <h2 id="nix-error">Nix error output</h2>
<pre class="buildlog">[% HTML.escape(build.errormsg) -%]</pre> <pre class="buildlog">[% HTML.escape(build.errormsg) %]</pre>
[% END %] [% END %]
[% END %] [% END %]
[% IF logtext %] [% IF logtext %]
<h2>Log</h2> <h2>Log</h2>
<pre class="buildlog">[% HTML.escape(logtext) -%]</pre> <pre class="buildlog">[% HTML.escape(logtext) %]</pre>
[% END %] [% END %]
</div> </div>
<div id="tabs-information" class="tab-pane"> <div id="tabs-information" class="tab-pane">
@ -320,7 +320,7 @@
<tr><th>Name</th><th>Type</th><th>Value</th><th>Revision</th><th>Store path</th></tr> <tr><th>Name</th><th>Type</th><th>Value</th><th>Revision</th><th>Store path</th></tr>
</thead> </thead>
<tbody> <tbody>
[% FOREACH input IN build.inputs -%] [% FOREACH input IN build.inputs %]
<tr> <tr>
<td><tt>[% input.name %]</tt></td> <td><tt>[% input.name %]</tt></td>
<td><tt>[% type = input.type; inputTypes.$type %]</tt></td> <td><tt>[% type = input.type; inputTypes.$type %]</tt></td>
@ -336,7 +336,7 @@
<td>[% IF input.revision %][% input.revision %][% END %]</td> <td>[% IF input.revision %][% input.revision %][% END %]</td>
<td><tt>[% input.path %]</tt></td> <td><tt>[% input.path %]</tt></td>
</tr> </tr>
[% END -%] [% END %]
</tbody> </tbody>
</table> </table>
@ -375,14 +375,14 @@
<tr><th>Build</th><th>Input name</th><th>System</th><th>Timestamp</th></tr> <tr><th>Build</th><th>Input name</th><th>System</th><th>Timestamp</th></tr>
</thead> </thead>
<tbody> <tbody>
[% FOREACH input IN build.dependents -%] [% FOREACH input IN build.dependents %]
<tr> <tr>
<td>[% INCLUDE renderFullBuildLink build=input.build %]</td> <td>[% INCLUDE renderFullBuildLink build=input.build %]</td>
<td><tt>[% input.name %]</tt></td> <td><tt>[% input.name %]</tt></td>
<td><tt>[% input.build.system %]</tt></td> <td><tt>[% input.build.system %]</tt></td>
<td>[% INCLUDE renderDateTime timestamp = input.build.timestamp %]</td> <td>[% INCLUDE renderDateTime timestamp = input.build.timestamp %]</td>
</tr> </tr>
[% END -%] [% END %]
</tbody> </tbody>
</table> </table>
</div> </div>

View file

@ -59,11 +59,11 @@ install the package simply by clicking on the packages below.</p>
<td><a href="[% uri %]"><tt>[% build.get_column('releasename') || build.nixname %]</tt></a></td> <td><a href="[% uri %]"><tt>[% build.get_column('releasename') || build.nixname %]</tt></a></td>
<td><tt>[% build.system %]</tt></td> <td><tt>[% build.system %]</tt></td>
<td> <td>
[% IF build.homepage -%] [% IF build.homepage %]
<a [% HTML.attributes(href => build.homepage) %]>[% HTML.escape(build.description) %]</a> <a [% HTML.attributes(href => build.homepage) %]>[% HTML.escape(build.description) %]</a>
[% ELSE -%] [% ELSE %]
[% HTML.escape(build.description) -%] [% HTML.escape(build.description) %]
[% END -%] [% END %]
[% IF pkg.outName != 'out' %] [[% pkg.outName %]][% END %] [% IF pkg.outName != 'out' %] [[% pkg.outName %]][% END %]
</td> </td>
</tr> </tr>

View file

@ -26,7 +26,7 @@
<tr><th>Name</th><th>Type</th><th>Value</th></tr> <tr><th>Name</th><th>Type</th><th>Value</th></tr>
</thead> </thead>
<tbody> <tbody>
[% FOREACH input IN build.inputs -%] [% FOREACH input IN build.inputs %]
<tr> <tr>
<td><tt>[% input.name %]<input type="hidden" [% HTML.attributes(name => "input-$input.name-name" value => input.name) %] /></tt></td> <td><tt>[% input.name %]<input type="hidden" [% HTML.attributes(name => "input-$input.name-name" value => input.name) %] /></tt></td>
<td> <td>
@ -42,7 +42,7 @@
[% END %] /></tt> [% END %] /></tt>
</td> </td>
</tr> </tr>
[% END -%] [% END %]
</tbody> </tbody>
</table> </table>

View file

@ -1,9 +1,9 @@
[%- USE date -%] [% USE date %]
[%- USE String -%] [% USE String %]
[%- USE HTML -%] [% USE HTML %]
[%- inputTypes = [% inputTypes =
{ "svn" = "Subversion export" { "svn" = "Subversion export"
, "svn-checkout" = "Subversion checkout" , "svn-checkout" = "Subversion checkout"
, "bzr" = "Bazaar export" , "bzr" = "Bazaar export"
@ -16,42 +16,42 @@
, "build" = "Build output" , "build" = "Build output"
, "sysbuild" = "Build output (same system)" , "sysbuild" = "Build output (same system)"
} }
-%] %]
[%- BLOCK renderDateTime -%] [% BLOCK renderDateTime %]
[% date.format(timestamp, '%Y-%m-%d %H:%M:%S') -%] [% date.format(timestamp, '%Y-%m-%d %H:%M:%S') %]
[%- END -%] [% END %]
[%- BLOCK renderProjectName -%] [% BLOCK renderProjectName %]
<a href="[% c.uri_for('/project' project) %]"><tt>[% project %]</tt></a>[% END -%] <a href="[% c.uri_for('/project' project) %]"><tt>[% project %]</tt></a>[% END %]
[%- BLOCK renderJobsetName -%] [% BLOCK renderJobsetName %]
<a href="[% c.uri_for('/jobset' project jobset) %]"><tt>[% jobset %]</tt></a>[% END -%] <a href="[% c.uri_for('/jobset' project jobset) %]"><tt>[% jobset %]</tt></a>[% END %]
[%- BLOCK renderJobName -%] [% BLOCK renderJobName %]
<a href="[% c.uri_for('/job' project jobset job) %]"><tt>[% job %]</tt></a>[% END -%] <a href="[% c.uri_for('/job' project jobset job) %]"><tt>[% job %]</tt></a>[% END %]
[%- BLOCK renderFullJobsetName -%] [% BLOCK renderFullJobsetName %]
<tt>[% INCLUDE renderProjectName %]:[% INCLUDE renderJobsetName %]</tt> <tt>[% INCLUDE renderProjectName %]:[% INCLUDE renderJobsetName %]</tt>
[%- END -%] [% END %]
[%- BLOCK renderFullJobName -%] [% BLOCK renderFullJobName %]
<tt>[% IF !hideProjectName; INCLUDE renderProjectName %]:[% END; IF !hideJobsetName; INCLUDE renderJobsetName %]:[% END; INCLUDE renderJobName %]</tt> <tt>[% IF !hideProjectName; INCLUDE renderProjectName %]:[% END; IF !hideJobsetName; INCLUDE renderJobsetName %]:[% END; INCLUDE renderJobName %]</tt>
[%- END %] [% END %]
[%- BLOCK renderFullJobNameOfBuild -%] [% BLOCK renderFullJobNameOfBuild %]
[% INCLUDE renderFullJobName project=build.get_column("project") jobset = build.get_column("jobset") job = build.get_column("job") %] [% INCLUDE renderFullJobName project=build.get_column("project") jobset = build.get_column("jobset") job = build.get_column("job") %]
[% END %] [% 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 %]
@ -59,98 +59,98 @@
[% END %] [% END %]
[%- BLOCK renderBuildListHeader -%] [% BLOCK renderBuildListHeader %]
<table class="buildList table table-striped table-condensed [% IF !unsortable %]tablesorter[% END %] [% IF !showSchedulingInfo %] clean[% END %]"> <table class="buildList table table-striped table-condensed [% IF !unsortable %]tablesorter[% END %] [% IF !showSchedulingInfo %] clean[% END %]">
<thead> <thead>
<tr> <tr>
[%- IF !hideResultInfo -%] [% IF !hideResultInfo %]
<th></th> <th></th>
[% END %] [% END %]
[%- IF showSchedulingInfo -%] [% IF showSchedulingInfo %]
<th></th> <th></th>
[%- END -%] [% END %]
<th>#</th> <th>#</th>
[%- IF showSchedulingInfo -%] [% IF showSchedulingInfo %]
<th>P</th> <th>P</th>
[%- END -%] [% END %]
[%- IF !hideJobName -%] [% IF !hideJobName %]
<th>Job</th> <th>Job</th>
[%- END -%] [% END %]
<th>Release Name</th> <th>Release Name</th>
<th>System</th> <th>System</th>
<th>Timestamp</th> <th>Timestamp</th>
[%- IF showStatusChange -%] [% IF showStatusChange %]
<th class="headerSortUp">Last status change</th> <th class="headerSortUp">Last status change</th>
[%- END -%] [% END %]
[%- IF showDescription -%] [% IF showDescription %]
<th>Description</th> <th>Description</th>
[%- END -%] [% END %]
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
[%- END -%] [% END %]
[%- BLOCK renderBuildListBody -%] [% BLOCK renderBuildListBody %]
[%- odd = 0 -%] [% odd = 0 %]
[%- FOREACH build IN builds -%] [% FOREACH build IN builds %]
<tr class="clickable <tr class="clickable
[%- IF showSchedulingInfo -%] [% IF showSchedulingInfo %]
[%- IF build.busy %]runningBuild[% ELSIF build.disabled == 1 || build.get_column('enabled') == 0 %]disabledBuild[% END -%] [% IF build.busy %]runningBuild[% ELSIF build.disabled == 1 || build.get_column('enabled') == 0 %]disabledBuild[% END %]
[%- ELSE -%] [% ELSE %]
[%- IF odd %] odd [% END; odd = !odd -%] [% IF odd %] odd [% END; odd = !odd %]
[%- END %]" [% END %]"
onclick="if(event.which == 2) return true; window.location = '[% c.uri_for('/build' build.id) %]'"> onclick="if(event.which == 2) return true; window.location = '[% c.uri_for('/build' build.id) %]'">
[%- IF !hideResultInfo -%] [% IF !hideResultInfo %]
<td> <td>
[%- INCLUDE renderBuildStatusIcon size=16 busy=(showSchedulingInfo ? 1 : 0) buildstatus=build.buildstatus -%] [% INCLUDE renderBuildStatusIcon size=16 busy=(showSchedulingInfo ? 1 : 0) buildstatus=build.buildstatus %]
</td> </td>
[%- END -%] [% END %]
[% IF showSchedulingInfo %] [% IF showSchedulingInfo %]
<td>[%- IF build.busy %]<span class="label label-success">Started</span>[% ELSE %]<span class="label">Queued</span>[% END %]</td> <td>[% IF build.busy %]<span class="label label-success">Started</span>[% ELSE %]<span class="label">Queued</span>[% END %]</td>
[% END %] [% END %]
<td><a href="[% c.uri_for('/build' build.id) %]">[% build.id %]</a></td> <td><a href="[% c.uri_for('/build' build.id) %]">[% build.id %]</a></td>
[%- IF showSchedulingInfo -%] [% IF showSchedulingInfo %]
<td>[% build.priority %]</td> <td>[% build.priority %]</td>
[%- END -%] [% END %]
[%- IF !hideJobName -%] [% IF !hideJobName %]
<td>[%- INCLUDE renderFullJobNameOfBuild -%]</td> <td>[% INCLUDE renderFullJobNameOfBuild %]</td>
[%- END -%] [% END %]
<td>[% !showSchedulingInfo and build.get_column('releasename') ? build.get_column('releasename') : build.nixname %]</td> <td>[% !showSchedulingInfo and build.get_column('releasename') ? build.get_column('releasename') : build.nixname %]</td>
<td><tt>[% build.system %]</tt></td> <td><tt>[% build.system %]</tt></td>
<td>[% date.format(build.timestamp, '%Y-%m-%d %H:%M:%S') %]</td> <td>[% date.format(build.timestamp, '%Y-%m-%d %H:%M:%S') %]</td>
[%- IF showStatusChange -%] [% IF showStatusChange %]
<td> <td>
[%- IF build.get_column('statusChangeTime') -%] [% IF build.get_column('statusChangeTime') %]
<a href="[% c.uri_for('/build' build.get_column('statusChangeId')) %]"> <a href="[% c.uri_for('/build' build.get_column('statusChangeId')) %]">
[% date.format(build.get_column('statusChangeTime'), '%Y-%m-%d %H:%M:%S') %] [% date.format(build.get_column('statusChangeTime'), '%Y-%m-%d %H:%M:%S') %]
</a> </a>
[%- ELSE -%] [% ELSE %]
<em>never</em> <em>never</em>
[%- END -%] [% END %]
</td> </td>
[%- END -%] [% END %]
[%- IF showDescription -%] [% IF showDescription %]
<td>[% build.description %]</td> <td>[% build.description %]</td>
[%- END -%] [% END %]
</tr> </tr>
[%- END -%] [% END %]
[%- END -%] [% END %]
[%- BLOCK renderBuildListFooter -%] [% BLOCK renderBuildListFooter %]
</tbody> </tbody>
</table> </table>
[%- END -%] [% END %]
[%- BLOCK renderBuildList -%] [% BLOCK renderBuildList %]
[%- INCLUDE renderBuildListHeader -%] [% INCLUDE renderBuildListHeader %]
[%- INCLUDE renderBuildListBody -%] [% INCLUDE renderBuildListBody %]
[%- INCLUDE renderBuildListFooter -%] [% INCLUDE renderBuildListFooter %]
[%- END -%] [% END %]
[%- BLOCK renderLink -%]<a href="[% uri %]">[% title %]</a>[%- END -%] [% BLOCK renderLink %]<a href="[% uri %]">[% title %]</a>[% END %]
[%- BLOCK showBuildStats -%] [% BLOCK showBuildStats %]
<table class="layoutTable"> <table class="layoutTable">
<tr> <tr>
@ -179,21 +179,21 @@
</tr> </tr>
</table> </table>
[%- END -%] [% END %]
[% BLOCK renderViewJobName -%] [% BLOCK renderViewJobName %]
[% IF job.description; HTML.escape(job.description); ELSE %]<tt>[% job.job %]</tt> ([% job.attrs %])[% END -%] [% IF job.description; HTML.escape(job.description); ELSE %]<tt>[% job.job %]</tt> ([% job.attrs %])[% END %]
[% END -%] [% END %]
[% BLOCK maybeLink -%] [% BLOCK maybeLink %]
[% IF uri %]<a [% HTML.attributes(href => uri, class => class) %][% IF confirmmsg %]onclick="javascript:return confirm('[% confirmmsg %]')"[% END %]>[% content %]</a>[% ELSE; content; END -%] [% IF uri %]<a [% HTML.attributes(href => uri, class => class) %][% IF confirmmsg %]onclick="javascript:return confirm('[% confirmmsg %]')"[% END %]>[% content %]</a>[% ELSE; content; END %]
[% END -%] [% END %]
[% BLOCK maybeButton -%] [% BLOCK maybeButton %]
[% IF uri %]<a class="btn btn-mini" [% HTML.attributes(href => uri) %][% IF confirmmsg %]onclick="javascript:return confirm('[% confirmmsg %]')"[% END %]>[% content %]</a>[% ELSE; content; END -%] [% IF uri %]<a class="btn btn-mini" [% HTML.attributes(href => uri) %][% IF confirmmsg %]onclick="javascript:return confirm('[% confirmmsg %]')"[% END %]>[% content %]</a>[% ELSE; content; END %]
[% END -%] [% END %]
[% BLOCK renderSelection %] [% BLOCK renderSelection %]
[% IF edit %] [% IF edit %]
@ -222,43 +222,43 @@
[% BLOCK maybeEditString; [% BLOCK maybeEditString;
IF edit -%] IF edit %]
<input type="text" class="string [% extraClass %]" [% HTML.attributes(id => param, name => param, value => value) %] /> <input type="text" class="string [% extraClass %]" [% HTML.attributes(id => param, name => param, value => value) %] />
[% ELSE; [% ELSE;
HTML.escape(value); HTML.escape(value);
END -%] END %]
[% END -%]
[% BLOCK renderFullBuildLink %]
[% INCLUDE renderFullJobNameOfBuild build=build %] <a href="[% c.uri_for('/build' build.id) %]">build [% build.id %]</a>[% -%]
[% END %] [% END %]
[%- BLOCK renderBuildStatusIcon -%] [% BLOCK renderFullBuildLink %]
[%- finished = build != undef ? build.finished : 1 -%] [% INCLUDE renderFullJobNameOfBuild build=build %] <a href="[% c.uri_for('/build' build.id) %]">build [% build.id %]</a>[% %]
[%- busy = busy != undef ? busy : build.busy -%] [% END %]
[%- buildstatus = buildstatus != undef ? buildstatus : build.buildstatus -%]
[%- IF finished -%] [% BLOCK renderBuildStatusIcon %]
[%- IF buildstatus == 0 -%] [% finished = build != undef ? build.finished : 1 %]
[% busy = busy != undef ? busy : build.busy %]
[% buildstatus = buildstatus != undef ? buildstatus : build.buildstatus %]
[% IF finished %]
[% IF buildstatus == 0 %]
<img src="/static/images/checkmark_[% size %].png" alt="Succeeded" /> <img src="/static/images/checkmark_[% size %].png" alt="Succeeded" />
[%- ELSIF buildstatus == 1 -%] [% ELSIF buildstatus == 1 %]
<img src="/static/images/error_[% size %].png" alt="Failed" /> <img src="/static/images/error_[% size %].png" alt="Failed" />
[%- ELSIF buildstatus == 2 -%] [% ELSIF buildstatus == 2 %]
<img src="/static/images/dependency_[% size %].png" alt="Dependency failed" /> <img src="/static/images/dependency_[% size %].png" alt="Dependency failed" />
[%- ELSIF buildstatus == 4 -%] [% ELSIF buildstatus == 4 %]
<img src="/static/images/cancelled_[% size %].png" alt="Cancelled" /> <img src="/static/images/cancelled_[% size %].png" alt="Cancelled" />
[%- ELSIF buildstatus == 5 -%] [% ELSIF buildstatus == 5 %]
<img src="/static/images/error_[% size %].png" alt="Failed" /> <img src="/static/images/error_[% size %].png" alt="Failed" />
[%- ELSIF buildstatus == 6 -%] [% ELSIF buildstatus == 6 %]
<img src="/static/images/error_[% size %].png" alt="Failed (with result)" /> <img src="/static/images/error_[% size %].png" alt="Failed (with result)" />
[%- ELSE -%] [% ELSE %]
<img src="/static/images/error_[% size %].png" alt="Failed" /> <img src="/static/images/error_[% size %].png" alt="Failed" />
[%- END -%] [% END %]
[%- ELSIF busy -%] [% ELSIF busy %]
<img src="/static/images/help_[% size %].png" alt="Busy" /> <img src="/static/images/help_[% size %].png" alt="Busy" />
[%- ELSE -%] [% ELSE %]
<img src="/static/images/help_[% size %].png" alt="Scheduled" /> <img src="/static/images/help_[% size %].png" alt="Scheduled" />
[%- END -%] [% END %]
[%- END -%] [% END %]
[% BLOCK renderStatus %] [% BLOCK renderStatus %]
[% IF build.finished %] [% IF build.finished %]
@ -286,7 +286,7 @@
[% ELSE %] [% ELSE %]
<strong>Scheduled to be built</strong> <strong>Scheduled to be built</strong>
[% END %] [% END %]
[% END -%] [% END %]
[% BLOCK renderInputValue %] [% BLOCK renderInputValue %]
[% IF input.type == "build" || input.type == "sysbuild" %] [% IF input.type == "build" || input.type == "sysbuild" %]
@ -415,17 +415,17 @@
[% END %] [% END %]
[% BLOCK renderShortEvalInput -%] [% BLOCK renderShortEvalInput %]
[%- IF input.type == "svn" || input.type == "svn-checkout" || input.type == "bzr" || input.type == "bzr-checkout" -%] [% IF input.type == "svn" || input.type == "svn-checkout" || input.type == "bzr" || input.type == "bzr-checkout" %]
r[%- input.revision -%] r[% input.revision %]
[%- ELSIF input.type == "git" -%] [% ELSIF input.type == "git" %]
<tt>[% input.revision.substr(0, 7) %]</tt> <tt>[% input.revision.substr(0, 7) %]</tt>
[%- ELSIF input.type == "build" || input.type == "sysbuild" -%] [% ELSIF input.type == "build" || input.type == "sysbuild" %]
<tt>[% input.dependency.id %]</tt> <tt>[% input.dependency.id %]</tt>
[%- ELSE -%] [% ELSE %]
<tt>[%- input.revision -%]</tt> <tt>[% input.revision %]</tt>
[%- END -%] [% END %]
[%- END %] [% END %]
[% BLOCK renderEvals %] [% BLOCK renderEvals %]
@ -439,19 +439,19 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
[%- FOREACH e IN evals; eval = e.eval; [% FOREACH e IN evals; eval = e.eval;
link = c.uri_for(c.controller('JobsetEval').action_for('view'), [eval.id]) -%] link = c.uri_for(c.controller('JobsetEval').action_for('view'), [eval.id]) %]
<tr class="clickable" onclick="window.location = '[% link %]'"> <tr class="clickable" onclick="window.location = '[% link %]'">
<td><a href="[% link %]">[% eval.id %]</a>&nbsp;</td> <td><a href="[% link %]">[% eval.id %]</a>&nbsp;</td>
<td>[% INCLUDE renderDateTime timestamp = eval.timestamp %]&nbsp;</td> <td>[% INCLUDE renderDateTime timestamp = eval.timestamp %]&nbsp;</td>
<td> <td>
[%- IF e.changedInputs.size > 0 -%] [% IF e.changedInputs.size > 0 %]
[%- sep=''; FOREACH input IN e.changedInputs -%] [% sep=''; FOREACH input IN e.changedInputs %]
[%- sep %] [% input.name %] → [% INCLUDE renderShortEvalInput input=input %] [% sep %] [% input.name %] → [% INCLUDE renderShortEvalInput input=input %]
[%- sep=','; END -%] [% sep=','; END %]
[%- ELSE -%] [% ELSE %]
- -
[%- END -%] [% END %]
</td> </td>
<td align='right'> <td align='right'>
<span class="label label-success">[% e.nrSucceeded %]</span> <span class="label label-success">[% e.nrSucceeded %]</span>
@ -461,17 +461,17 @@
[% END %] [% END %]
</td> </td>
<td align='right'> <td align='right'>
[%- IF e.diff > 0 -%] [% IF e.diff > 0 %]
<span class='label label-success'><strong>+[% e.diff %]</strong></span> <span class='label label-success'><strong>+[% e.diff %]</strong></span>
[%- ELSIF e.diff < 0 && e.nrScheduled == 0 -%] [% ELSIF e.diff < 0 && e.nrScheduled == 0 %]
<span class='label label-important'><strong>[% e.diff %]</strong></span> <span class='label label-important'><strong>[% e.diff %]</strong></span>
[%- END -%] [% END %]
</td> </td>
</tr> </tr>
[%- END -%] [% END %]
[%- IF linkToAll -%] [% IF linkToAll %]
<tr><td class="centered" colspan=54"><a href="[% linkToAll %]"><em>More...</em></a></td></tr> <tr><td class="centered" colspan=54"><a href="[% linkToAll %]"><em>More...</em></a></td></tr>
[%- END -%] [% END %]
</tbody> </tbody>
</table> </table>
[% END %] [% END %]

View file

@ -5,8 +5,8 @@
</li> </li>
[% END %] [% END %]
[% BLOCK makeLink -%] [% BLOCK makeLink %]
[% INCLUDE makeLinkWrapped content="" -%] [% INCLUDE makeLinkWrapped content="" %]
[% END %] [% END %]
[% BLOCK makeSubMenu %] [% BLOCK makeSubMenu %]

View file

@ -3,15 +3,15 @@
<div class="page-header"><h1>Jobset <tt>[% project.name %]:[% jobset.name %]</tt> evaluation [% eval.id %]</h1></div> <div class="page-header"><h1>Jobset <tt>[% project.name %]:[% jobset.name %]</tt> evaluation [% eval.id %]</h1></div>
[%- IF otherEval -%] [% IF otherEval %]
<p>Comparisons are relative to [% INCLUDE renderFullJobsetName <p>Comparisons are relative to [% INCLUDE renderFullJobsetName
project=otherEval.jobset.project.name jobset=otherEval.jobset.name %] project=otherEval.jobset.project.name jobset=otherEval.jobset.name %]
evaluation <a href="[% evaluation <a href="[%
c.uri_for(c.controller('JobsetEval').action_for('view'), c.uri_for(c.controller('JobsetEval').action_for('view'),
[otherEval.id]) %]">[% otherEval.id %]</a>.</p> [otherEval.id]) %]">[% otherEval.id %]</a>.</p>
[%- END -%] [% END %]
[%- BLOCK renderSome -%] [% BLOCK renderSome %]
[% size = builds.size; max = full ? size : 30; %] [% size = builds.size; max = full ? size : 30; %]
[% INCLUDE renderBuildListBody builds=builds.slice(0, (size > max ? max : size) - 1) [% INCLUDE renderBuildListBody builds=builds.slice(0, (size > max ? max : size) - 1)
hideProjectName=1 hideJobsetName=1 %] hideProjectName=1 hideJobsetName=1 %]
@ -35,13 +35,13 @@ c.uri_for(c.controller('JobsetEval').action_for('view'),
[% IF removed.size > 0 %] [% IF removed.size > 0 %]
<tr><th class="subheader" colspan="6"><strong>Removed</strong> jobs</th></tr> <tr><th class="subheader" colspan="6"><strong>Removed</strong> jobs</th></tr>
[% size = removed.size; max = full ? size : 30; %] [% size = removed.size; max = full ? size : 30; %]
[%- FOREACH j IN removed.slice(0,(size > max ? max : size) - 1) -%] [% FOREACH j IN removed.slice(0,(size > max ? max : size) - 1) %]
<tr> <tr>
<td colspan="2"></td> <td colspan="2"></td>
<td colspan="2">[% INCLUDE renderJobName project=project.name jobset=jobset.name job=j.job %]</td> <td colspan="2">[% INCLUDE renderJobName project=project.name jobset=jobset.name job=j.job %]</td>
<td colspan="2"><tt>[% j.system %]</tt></td> <td colspan="2"><tt>[% j.system %]</tt></td>
</tr> </tr>
[%- END -%] [% END %]
[% IF size > max; params = c.req.params; params.full = 1 %] [% IF size > max; params = c.req.params; params.full = 1 %]
<tr><td class="centered" colspan="6"><a href="[% c.uri_for(c.controller('JobsetEval').action_for('view'), [eval.id], params) %]"><em>([% size - max %] more jobs omitted)</em></a></td></tr> <tr><td class="centered" colspan="6"><a href="[% c.uri_for(c.controller('JobsetEval').action_for('view'), [eval.id], params) %]"><em>([% size - max %] more jobs omitted)</em></a></td></tr>
[% END %] [% END %]

View file

@ -26,14 +26,14 @@
<tr class="input [% extraClass %]" [% IF id %]id="[% id %]"[% END %]> <tr class="input [% extraClass %]" [% IF id %]id="[% id %]"[% END %]>
<td> <td>
[% IF edit %]<button type="button" class="btn btn-warning" onclick='$(this).parents(".input").remove()'><i class="icon-trash icon-white"></i></button>[% END -%] [% IF edit %]<button type="button" class="btn btn-warning" onclick='$(this).parents(".input").remove()'><i class="icon-trash icon-white"></i></button>[% END %]
<tt>[% INCLUDE maybeEditString param="$baseName-name" value=input.name extraClass="shortString" %]</tt> <tt>[% INCLUDE maybeEditString param="$baseName-name" value=input.name extraClass="shortString" %]</tt>
</td> </td>
<td> <td>
[% INCLUDE renderSelection curValue=input.type param="$baseName-type" options=inputTypes %] [% INCLUDE renderSelection curValue=input.type param="$baseName-type" options=inputTypes %]
</td> </td>
<td class="inputalts" id="[% baseName %]"> <td class="inputalts" id="[% baseName %]">
[% FOREACH alt IN input.jobsetinputalts -%] [% FOREACH alt IN input.jobsetinputalts %]
<tt class="inputalt"> <tt class="inputalt">
[% IF input.type == "string" && !edit %] [% IF input.type == "string" && !edit %]
"[% HTML.escape(alt.value) %]" "[% HTML.escape(alt.value) %]"
@ -57,7 +57,7 @@
<tr><th>Input name</th><th>Type</th><th>Values</th></tr> <tr><th>Input name</th><th>Type</th><th>Values</th></tr>
</thead> </thead>
<tbody class="inputs"> <tbody class="inputs">
[% FOREACH input IN jobset.jobsetinputs -%] [% FOREACH input IN jobset.jobsetinputs %]
[% INCLUDE renderInput input=input baseName="input-$input.name" %] [% INCLUDE renderInput input=input baseName="input-$input.name" %]
[% END %] [% END %]
[% IF edit %] [% IF edit %]
@ -72,9 +72,9 @@
<ul id="tab" class="nav nav-tabs"> <ul id="tab" class="nav nav-tabs">
[% IF !edit -%] [% IF !edit %]
<li><a href="#tabs-information" data-toggle="tab">Jobset</a></li> <li><a href="#tabs-information" data-toggle="tab">Jobset</a></li>
[% IF jobset.errormsg -%]<li><a href="#tabs-errors" data-toggle="tab"><img src="/static/images/error_16.png" /> Evaluation errors</a></li>[% END %] [% IF jobset.errormsg %]<li><a href="#tabs-errors" data-toggle="tab"><img src="/static/images/error_16.png" /> Evaluation errors</a></li>[% END %]
<li><a href="#tabs-jobs" data-toggle="tab">Jobs ([% activeJobs.size %])</a></li> <li><a href="#tabs-jobs" data-toggle="tab">Jobs ([% activeJobs.size %])</a></li>
[% END %] [% END %]
<li><a href="#tabs-setup" data-toggle="tab">Setup</a></li> <li><a href="#tabs-setup" data-toggle="tab">Setup</a></li>
@ -82,18 +82,18 @@
<div id="generic-tabs" class="tab-content"> <div id="generic-tabs" class="tab-content">
<div id="tabs-information" class="tab-pane active"> <div id="tabs-information" class="tab-pane active">
[% IF !edit && evals.size() > 0 -%] [% IF !edit && evals.size() > 0 %]
<h2>Most recent evaluations</h2> <h2>Most recent evaluations</h2>
[% INCLUDE renderEvals linkToAll=c.uri_for(c.controller('Jobset').action_for('evals'), [project.name, jobset.name]) %] [% INCLUDE renderEvals linkToAll=c.uri_for(c.controller('Jobset').action_for('evals'), [project.name, jobset.name]) %]
[% END %] [% END %]
[% IF !edit && activeJobsStatus -%] [% IF !edit && activeJobsStatus %]
<h2>Status</h2> <h2>Status</h2>
<table class="table table-striped table-condensed"> <table class="table table-striped table-condensed">
<thead><tr><th>Job</th>[% FOREACH s IN systems %]<th>[% s.system %]</th>[% END %]</tr></thead> <thead><tr><th>Job</th>[% FOREACH s IN systems %]<th>[% s.system %]</th>[% END %]</tr></thead>
<tbody> <tbody>
[% odd = 0 %] [% odd = 0 %]
[% FOREACH j IN activeJobsStatus %] [% FOREACH j IN activeJobsStatus %]
<tr class="[% IF odd %] odd [% END; odd = !odd -%]"> <tr class="[% IF odd %] odd [% END; odd = !odd %]">
<td>[% INCLUDE renderJobName project=project.name jobset = jobset.name job = j.get_column('job') %]</td> <td>[% INCLUDE renderJobName project=project.name jobset = jobset.name job = j.get_column('job') %]</td>
[% FOREACH s IN systems %] [% FOREACH s IN systems %]
[% system = s.system %] [% system = s.system %]
@ -111,7 +111,7 @@
</tbody> </tbody>
</table> </table>
[% END %] [% END %]
[% IF !edit && !activeJobsStatus -%] [% IF !edit && !activeJobsStatus %]
<h2>Status</h2> <h2>Status</h2>
<p> <p>
[ <a href="[% c.uri_for('/jobset' project.name jobset.name 'with-status' ) %]">Show status overview</a> ] [ <a href="[% c.uri_for('/jobset' project.name jobset.name 'with-status' ) %]">Show status overview</a> ]
@ -119,9 +119,9 @@
[% END %] [% END %]
</div> </div>
[% IF !edit -%] [% IF !edit %]
[% IF jobset.errormsg -%] [% IF jobset.errormsg %]
<div id="tabs-errors" class="tab-pane"> <div id="tabs-errors" class="tab-pane">
<h2>Evaluation errors</h2> <h2>Evaluation errors</h2>
<p> <p>
@ -181,7 +181,7 @@
<th>Last checked:</th> <th>Last checked:</th>
<td> <td>
[% IF jobset.lastcheckedtime %] [% IF jobset.lastcheckedtime %]
[% INCLUDE renderDateTime timestamp = jobset.lastcheckedtime -%][% IF jobset.errormsg -%]<em>, with errors!</em> [% INCLUDE renderDateTime timestamp = jobset.lastcheckedtime %][% IF jobset.errormsg %]<em>, with errors!</em>
[% ELSE %], <em>no errors</em> [% ELSE %], <em>no errors</em>
[% END %] [% END %]
[% ELSE %] [% ELSE %]
@ -195,7 +195,7 @@
[% INCLUDE renderInputs %] [% INCLUDE renderInputs %]
</div> </div>
[% IF !edit -%] [% IF !edit %]
<div id="tabs-jobs" class="tab-pane"> <div id="tabs-jobs" class="tab-pane">
<h2>Jobs</h2> <h2>Jobs</h2>

View file

@ -1,5 +1,5 @@
[% USE date -%] [% USE date %]
[% USE HTML -%] [% USE HTML %]
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
[% PROCESS common.tt %] [% PROCESS common.tt %]

View file

@ -11,7 +11,7 @@
</p> </p>
<div class="buildlog"> <div class="buildlog">
[% logtext -%] [% logtext %]
</div> </div>
[% END %] [% END %]

View file

@ -19,7 +19,7 @@
[% END %] [% END %]
<pre class="taillog" id="contents"> <pre class="taillog" id="contents">
[% HTML.escape(contents) -%] [% HTML.escape(contents) %]
</pre> </pre>
[% END %] [% END %]

View file

@ -8,7 +8,7 @@
<div class="page-header"><h1>[% title %]</h1></div> <div class="page-header"><h1>[% title %]</h1></div>
<div class="buildlog"> <div class="buildlog">
[% contents -%] [% contents %]
</div> </div>
[% END %] [% END %]

View file

@ -1,10 +1,10 @@
[% USE mibs=format("%.2f") %] [% USE mibs=format("%.2f") %]
[% BLOCK renderProductList -%] [% BLOCK renderProductList %]
<table class="productList layoutTable"> <table class="productList layoutTable">
[% FOREACH product IN build.buildproducts -%] [% FOREACH product IN build.buildproducts %]
[% uri = "${c.uri_for('/build' build.id 'download' product.productnr)}" [% uri = "${c.uri_for('/build' build.id 'download' product.productnr)}"
_ (product.name ? "/" _ product.name : "") _ (product.name ? "/" _ product.name : "")
@ -214,7 +214,7 @@
[% END %] [% END %]
[% END -%] [% END %]
</table> </table>

View file

@ -41,7 +41,7 @@ Timeline_urlPrefix="http://simile.mit.edu/timeline/api/";
"title": "Now" "title": "Now"
} }
[% FOREACH build IN builds -%] [% FOREACH build IN builds %]
, { "start": "[% date.format(build.get_column("starttime"), '%Y-%m-%dT%H:%M:%S') %]", , { "start": "[% date.format(build.get_column("starttime"), '%Y-%m-%dT%H:%M:%S') %]",
"end": "[% date.format(build.get_column("stoptime"), '%Y-%m-%dT%H:%M:%S') %]", "end": "[% date.format(build.get_column("stoptime"), '%Y-%m-%dT%H:%M:%S') %]",
"isDuration": "true", "isDuration": "true",

View file

@ -5,8 +5,8 @@
</li> </li>
[% END %] [% END %]
[% BLOCK makeLink -%] [% BLOCK makeLink %]
[% INCLUDE makeLinkWrapped content="" -%] [% INCLUDE makeLinkWrapped content="" %]
[% END %] [% END %]
[% BLOCK makeSubMenu %] [% BLOCK makeSubMenu %]
@ -26,8 +26,8 @@
</li> </li>
[% END %] [% END %]
[% BLOCK makeLink -%] [% BLOCK makeLink %]
[% INCLUDE makeLinkWrapped content="" -%] [% INCLUDE makeLinkWrapped content="" %]
[% END %] [% END %]

View file

@ -1,4 +1,4 @@
[% releaseName = (result.releasename || "(No name)") -%] [% releaseName = (result.releasename || "(No name)") %]
[% WRAPPER layout.tt title="View $releaseName" %] [% WRAPPER layout.tt title="View $releaseName" %]
[% PROCESS common.tt %] [% PROCESS common.tt %]
[% PROCESS "product-list.tt" %] [% PROCESS "product-list.tt" %]