2013-02-14 16:51:09 +00:00
[%
USE date;
USE String;
USE HTML;
inputTypes =
{ "svn" = "Subversion export"
, "svn-checkout" = "Subversion checkout"
, "bzr" = "Bazaar export"
, "bzr-checkout" = "Bazaar checkout"
, "git" = "Git checkout"
, "hg" = "Mercurial checkout"
, "string" = "String value"
, "boolean" = "Boolean"
, "path" = "Local path"
, "build" = "Build output"
, "sysbuild" = "Build output (same system)"
};
BLOCK renderDateTime;
date.format(timestamp, '%Y-%m-%d %H:%M:%S');
END;
2008-11-26 17:43:45 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderProjectName %]
2013-02-22 17:05:04 +00:00
<a [% IF inRow %]class="row-link"[% END %] href="[% c.uri_for('/project' project) %]"><tt>[% project %]</tt></a>
2013-02-14 16:51:09 +00:00
[% END;
2009-03-12 23:46:17 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderJobsetName %]
2013-02-22 17:05:04 +00:00
<a [% IF inRow %]class="row-link"[% END %] href="[% c.uri_for('/jobset' project jobset) %]"><tt>[% jobset %]</tt></a>
2013-02-14 16:51:09 +00:00
[% END;
2009-03-12 23:46:17 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderJobName %]
2013-02-22 17:11:29 +00:00
<a [% IF inRow %]class="row-link"[% END %] href="[% c.uri_for('/job' project jobset job) %]"><tt>[% job %]</tt></a>
2013-02-14 16:51:09 +00:00
[% END;
2009-03-12 23:46:17 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderFullJobsetName %]
2013-02-22 17:11:29 +00:00
<tt>[% INCLUDE renderProjectName inRow=0 %]:[% INCLUDE renderJobsetName %]</tt>
2013-02-14 16:51:09 +00:00
[% END;
2009-04-08 22:08:00 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderFullJobName %]
2013-02-22 17:11:29 +00:00
<tt>[% IF !hideProjectName; INCLUDE renderProjectName inRow=0 %]:[% END; IF !hideJobsetName; INCLUDE renderJobsetName inRow=0 %]:[% END; INCLUDE renderJobName %]</tt>
2013-02-14 16:51:09 +00:00
[% END;
2009-03-12 23:46:17 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderFullJobNameOfBuild;
INCLUDE renderFullJobName project=build.get_column("project") jobset = build.get_column("jobset") job = build.get_column("job");
END;
2009-03-13 14:49:25 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderDuration;
2013-02-20 15:47:57 +00:00
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;
2013-02-14 16:51:09 +00:00
duration % 60 %]s[%
END;
2009-03-13 16:04:49 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderBuildListHeader %]
2013-04-26 12:49:11 +00:00
<table class="table table-striped table-condensed clickable-rows">
2008-11-26 17:43:45 +00:00
<thead>
<tr>
2013-02-14 15:51:42 +00:00
[% IF !hideResultInfo %]
2008-11-26 17:43:45 +00:00
<th></th>
[% END %]
2013-02-14 15:51:42 +00:00
[% IF showSchedulingInfo %]
2012-04-12 20:10:16 +00:00
<th></th>
2013-02-14 15:51:42 +00:00
[% END %]
2008-11-26 17:43:45 +00:00
<th>#</th>
2013-02-14 15:51:42 +00:00
[% IF showSchedulingInfo %]
2010-01-07 14:25:12 +00:00
<th>P</th>
2013-02-14 15:51:42 +00:00
[% END %]
[% IF !hideJobName %]
2008-11-26 17:43:45 +00:00
<th>Job</th>
2013-02-14 15:51:42 +00:00
[% END %]
2009-03-12 23:46:17 +00:00
<th>Release Name</th>
2008-11-26 17:43:45 +00:00
<th>System</th>
<th>Timestamp</th>
2013-02-14 15:51:42 +00:00
[% IF showStatusChange %]
2009-07-09 14:48:15 +00:00
<th class="headerSortUp">Last status change</th>
2013-02-14 15:51:42 +00:00
[% END %]
[% IF showDescription %]
2010-01-07 14:25:12 +00:00
<th>Description</th>
2013-02-14 15:51:42 +00:00
[% END %]
2008-11-26 17:43:45 +00:00
</tr>
</thead>
<tbody>
2013-02-14 16:51:09 +00:00
[% END;
BLOCK renderBuildListBody;
FOREACH build IN builds; %]
2013-02-22 17:05:04 +00:00
<tr>
2013-02-14 16:51:09 +00:00
[% IF !hideResultInfo %]
<td>
[% INCLUDE renderBuildStatusIcon size=16 busy=(showSchedulingInfo ? 1 : 0) buildstatus=build.buildstatus %]
</td>
[% END %]
[% IF showSchedulingInfo %]
<td>[% IF build.busy %]<span class="label label-success">Started</span>[% ELSE %]<span class="label">Queued</span>[% END %]</td>
[% END %]
2013-02-22 17:05:04 +00:00
<td><a class="row-link" href="[% c.uri_for('/build' build.id) %]">[% build.id %]</a></td>
2013-02-14 16:51:09 +00:00
[% IF showSchedulingInfo %]
<td>[% build.priority %]</td>
[% END %]
[% IF !hideJobName %]
<td>[% INCLUDE renderFullJobNameOfBuild %]</td>
[% END %]
<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>
2013-02-14 15:51:42 +00:00
[% END %]
2013-02-14 16:51:09 +00:00
</td>
2013-02-14 15:51:42 +00:00
[% END %]
2013-02-14 16:51:09 +00:00
[% IF showDescription %]
<td>[% build.description %]</td>
[% END %]
</tr>
[% END;
2013-02-22 12:00:40 +00:00
IF linkToAll %]
<td class="centered" colspan="5"><a href="[% linkToAll %]"><em>More...</em></a></td></tr>
[% END;
2013-02-14 16:51:09 +00:00
END;
2012-04-02 14:11:22 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderBuildListFooter %]
2008-11-26 17:43:45 +00:00
</tbody>
</table>
2013-02-14 16:51:09 +00:00
[% END;
2008-11-26 23:49:51 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderBuildList;
INCLUDE renderBuildListHeader;
INCLUDE renderBuildListBody;
INCLUDE renderBuildListFooter;
END;
2012-04-02 14:11:22 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderLink %]<a href="[% uri %]">[% title %]</a>[% END;
2008-11-26 23:49:51 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderViewJobName;
IF job.description; HTML.escape(job.description); ELSE %]<tt>[% job.job %]</tt> ([% job.attrs %])[% END;
END;
2008-11-27 18:27:19 +00:00
2009-04-02 16:15:57 +00:00
2013-02-14 16:51:09 +00:00
BLOCK maybeLink;
IF uri %]<a [% HTML.attributes(href => uri, class => class) %][% IF confirmmsg %]onclick="javascript:return confirm('[% confirmmsg %]')"[% END %]>[% content %]</a>[% ELSE; content; END;
END;
2009-04-02 16:15:57 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderSelection;
IF edit;
IF radiobuttons; %]
2012-04-17 14:53:11 +00:00
<div class="controls">
[% FOREACH name IN options.keys.sort %]
<label class="radio inline">
<input type="radio" [% HTML.attributes(id => param, name => param, value => name) %]
[% IF name == curValue; "checked='1'"; END %]>
[% options.$name %]
</input>
</label>
[% END %]
</div>
[% ELSE %]
<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>
2013-02-14 16:51:09 +00:00
[% END;
ELSE;
options.$curValue;
END;
END;
2009-04-02 16:15:57 +00:00
2013-02-21 01:33:57 +00:00
BLOCK editString; %]
<input type="text" class="string" [% HTML.attributes(id => param, name => param, value => value) %] />
2013-02-21 12:42:44 +00:00
[% END;
2013-02-21 00:12:57 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderFullBuildLink;
INCLUDE renderFullJobNameOfBuild build=build %] <a href="[% c.uri_for('/build' build.id) %]">build [% build.id %]</a>[%
END;
2013-02-22 12:17:07 +00:00
BLOCK renderBuildLink; %]
<a href="[% c.uri_for('/build' build.id) %]">build [% build.id %]</a>
[% END;
2013-02-14 16:51:09 +00:00
BLOCK renderBuildStatusIcon;
finished = build != undef ? build.finished : 1;
busy = busy != undef ? busy : build.busy;
buildstatus = buildstatus != undef ? buildstatus : build.buildstatus;
IF finished;
IF buildstatus == 0 %]
2011-11-29 18:04:40 +00:00
<img src="/static/images/checkmark_[% size %].png" alt="Succeeded" />
2013-02-14 15:51:42 +00:00
[% ELSIF buildstatus == 1 %]
2011-11-29 18:04:40 +00:00
<img src="/static/images/error_[% size %].png" alt="Failed" />
2013-02-14 15:51:42 +00:00
[% ELSIF buildstatus == 2 %]
2011-11-29 18:04:40 +00:00
<img src="/static/images/dependency_[% size %].png" alt="Dependency failed" />
2013-02-14 15:51:42 +00:00
[% ELSIF buildstatus == 4 %]
2012-05-25 02:14:36 +00:00
<img src="/static/images/cancelled_[% size %].png" alt="Cancelled" />
2013-02-14 15:51:42 +00:00
[% ELSIF buildstatus == 5 %]
2011-11-29 18:04:40 +00:00
<img src="/static/images/error_[% size %].png" alt="Failed" />
2013-02-14 15:51:42 +00:00
[% ELSIF buildstatus == 6 %]
2011-11-29 18:04:40 +00:00
<img src="/static/images/error_[% size %].png" alt="Failed (with result)" />
2013-02-14 15:51:42 +00:00
[% ELSE %]
2011-11-29 18:04:40 +00:00
<img src="/static/images/error_[% size %].png" alt="Failed" />
2013-02-14 16:51:09 +00:00
[% END;
ELSIF busy %]
2011-11-29 18:04:40 +00:00
<img src="/static/images/help_[% size %].png" alt="Busy" />
2013-02-14 15:51:42 +00:00
[% ELSE %]
2011-11-29 18:04:40 +00:00
<img src="/static/images/help_[% size %].png" alt="Scheduled" />
2013-02-14 16:51:09 +00:00
[% END;
END;
2010-02-05 14:48:22 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderStatus;
IF build.finished;
buildstatus = build.buildstatus;
IF icon; INCLUDE renderBuildStatusIcon size=16; END;
IF buildstatus == 0 %]
2011-11-29 18:04:40 +00:00
<strong>Success</strong>
2012-02-16 15:56:01 +00:00
[% ELSIF buildstatus == 1 %]
2011-11-29 18:04:40 +00:00
<span class="error">Build returned a non-zero exit code</span>
2012-02-16 15:56:01 +00:00
[% ELSIF buildstatus == 2 %]
2011-11-29 18:04:40 +00:00
<span class="error">A dependency of the build failed</span>
2012-02-16 15:56:01 +00:00
[% ELSIF buildstatus == 4 %]
2011-11-29 18:04:40 +00:00
<span class="error">Cancelled by user</span>
2012-02-16 15:56:01 +00:00
[% ELSIF buildstatus == 5 %]
2011-11-29 18:04:40 +00:00
<span class="error">Build inhibited because a dependency previously failed to build</span>
2012-02-16 15:56:01 +00:00
[% ELSIF buildstatus == 6 %]
2011-11-29 18:04:40 +00:00
<span class="error">Build failed (with result)</span>
[% ELSE %]
<span class="error">Build failed</span>
(see <a href="#nix-error">below</a>)
2013-02-14 16:51:09 +00:00
[% END;
ELSIF build.busy %]
2011-11-29 18:04:40 +00:00
<strong>Build in progress</strong>
2013-02-14 16:51:09 +00:00
since [% INCLUDE renderDateTime timestamp = build.starttime;
ELSE %]
2011-11-29 18:04:40 +00:00
<strong>Scheduled to be built</strong>
2013-02-14 16:51:09 +00:00
[% END;
END;
2010-02-05 14:48:22 +00:00
2010-02-22 13:21:34 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderInputValue;
IF input.type == "build" || input.type == "sysbuild";
INCLUDE renderFullBuildLink build=input.dependency;
ELSIF input.type == "string" || input.type == "boolean" %]
<tt>"[% input.value %]"</tt>
[% ELSE %]
<tt>[% input.uri %][% IF input.revision %] (r[% input.revision %])[% END %]</tt>
[% END;
END;
2011-01-14 08:11:21 +00:00
2010-02-25 15:32:56 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderShortInputValue;
IF input.type == "build" || input.type == "sysbuild" %]
<a href="[% c.uri_for('/build' input.dependency.id) %]">[% input.dependency.id %]</a>
[% ELSIF input.type == "string" || input.type == "boolean" %]
<tt>"[% input.value %]"</tt>
[% ELSE %]
<tt>[% input.uri %][% IF input.revision %] (r[% input.revision %])[% END %]</tt>
[% END %]
[% END;
BLOCK renderDiffUri;
nouri = 1;
FOREACH m IN mappers;
base = m.baseuri;
url = bi1.uri;
path = url.replace(base, '');
IF url.match(base) %]
<a target="_new" href="[% m.uri.replace('_path_', path).replace('_1_', bi1.revision).replace('_2_', bi2.revision) %]">[% contents %]</a>
[% nouri = 0;
END;
END;
IF nouri;
res = bi1.uri.split(' ');
url = res.0;
branch = res.1;
IF bi1.type == "hg" || bi1.type == "git" %]
2013-02-14 17:03:12 +00:00
<a target="_new" href="[% HTML.escape("/api/scmdiff?uri=$url&rev1=$bi1.revision&rev2=$bi2.revision&type=$bi1.type&branch=$branch") %]">[% contents %]</a>
2013-02-14 16:51:09 +00:00
[% ELSE;
contents;
END;
END;
END;
2013-03-05 15:19:33 +00:00
BLOCK renderInputs; %]
2013-04-26 12:49:11 +00:00
<table class="table table-striped table-condensed">
2013-03-05 15:19:33 +00:00
<thead>
<tr><th>Name</th><th>Type</th><th>Value</th><th>Revision</th><th>Store path</th></tr>
</thead>
<tbody>
[% FOREACH input IN inputs %]
<tr>
<td><tt>[% input.name %]</tt></td>
2013-04-26 11:24:57 +00:00
<td>[% type = input.type; inputTypes.$type %]</td>
2013-03-05 15:19:33 +00:00
<td>
[% IF input.type == "build" || input.type == "sysbuild" %]
[% INCLUDE renderFullBuildLink build=input.dependency %]
[% ELSIF input.type == "string" || input.type == "boolean" %]
<tt>"[% input.value %]"</tt>
[% ELSE %]
<tt>[% input.uri %]</tt>
[% END %]
</td>
<td>[% IF input.revision %][% input.revision %][% END %]</td>
<td><tt>[% input.path %]</tt></td>
</tr>
[% END %]
</tbody>
</table>
[% END;
2013-02-14 16:51:09 +00:00
BLOCK renderInputDiff; %]
<table class="table table-striped table-condensed">
2010-02-25 13:17:11 +00:00
[% IF !nestedDiff %]
2013-02-14 16:51:09 +00:00
<tr><th>Input</th><th>Changes</th></tr>
[% END;
IF !nestLevel;
nestLevel = 0;
END;
IF nestLevel <= 3;
2013-03-05 15:19:33 +00:00
FOREACH bi1 IN inputs1;
2013-02-14 16:51:09 +00:00
deletedInput = 1;
2013-03-05 15:19:33 +00:00
FOREACH bi2 IN inputs2;
2013-02-14 16:51:09 +00:00
IF bi1.name == bi2.name;
IF bi1.type == bi2.type;
IF bi1.value != bi2.value || bi1.uri != bi2.uri %]
<tr><td><b>[% bi1.name %]</b></td><td><tt>[% INCLUDE renderShortInputValue input=bi1 %]</tt> to <tt>[% INCLUDE renderShortInputValue input=bi2 %]</tt></td></tr>
[% ELSIF bi1.uri == bi2.uri && bi1.revision != bi2.revision %]
[% IF bi1.type == "git" %]
<tr><td>
<b>[% bi1.name %]</b></td><td><tt>[% INCLUDE renderDiffUri contents=(bi1.revision.substr(0, 6) _ ' to ' _ bi2.revision.substr(0, 6)) %]</tt>
</td></tr>
2013-01-22 13:41:02 +00:00
[% ELSE %]
2013-02-14 16:51:09 +00:00
<tr><td>
<b>[% bi1.name %]</b></td><td><tt>[% INCLUDE renderDiffUri contents=(bi1.revision _ ' to ' _ bi2.revision) %]</tt>
</td></tr>
2010-02-22 13:21:34 +00:00
[% END %]
2013-02-14 16:51:09 +00:00
[% ELSIF bi1.dependency.id != bi2.dependency.id || bi1.path != bi2.path %]
<tr><td>
<b>[% bi1.name %]</b></td><td><tt>[% INCLUDE renderShortInputValue input=bi1 %]</tt> to <tt>[% INCLUDE renderShortInputValue input=bi2 %]</tt>
<br/>
<br/>
2013-03-05 15:19:33 +00:00
[% INCLUDE renderInputDiff inputs1=bi1.dependency.inputs inputs2=bi2.dependency.inputs nestedDiff=1 nestLevel=nestLevel+1 %]
2013-02-14 16:51:09 +00:00
</td></tr>
[% END %]
[% ELSE %]
<tr><td><b>[% bi1.name %]</b></td><td>Changed input type from '[% type = bi1.type; inputTypes.$type %]' to '[% type = bi2.type; inputTypes.$type %]'</td></tr>
[% END;
deletedInput = 0;
END;
END;
IF deletedInput == 1 %]
<tr><td><b>[% bi1.name %]</b></td><td>Input not present in this build.</td></tr>
[% END;
END;
END %]
</table>
[% END;
2013-01-22 13:41:02 +00:00
2010-02-22 13:21:34 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderPager %]
2013-04-26 12:44:43 +00:00
<ul class="pager">
<li [% IF page == 1 %]class="disabled"[% END %]><a href="[% "$baseUri?page=1" %]">« First</a></li>
<li [% IF page == 1 %]class="disabled"[% END %]><a href="[% "$baseUri?page="; (page - 1) %]">‹ Previous</a></li>
<li [% IF page * resultsPerPage >= total %]class="disabled"[% END %]><a href="[% "$baseUri?page="; (page + 1) %]">Next ›</a></li>
<li [% IF page * resultsPerPage >= total %]class="disabled"[% END %]><a href="[% "$baseUri?page="; (total - 1) div resultsPerPage + 1 %]">Last »</a></li>
</ul>
2013-02-14 16:51:09 +00:00
[% END;
2011-01-14 08:11:21 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderShortEvalInput;
IF input.type == "svn" || input.type == "svn-checkout" || input.type == "bzr" || input.type == "bzr-checkout" %]
2013-02-14 15:51:42 +00:00
r[% input.revision %]
[% ELSIF input.type == "git" %]
2012-05-25 02:14:36 +00:00
<tt>[% input.revision.substr(0, 7) %]</tt>
2013-02-14 15:51:42 +00:00
[% ELSIF input.type == "build" || input.type == "sysbuild" %]
2013-02-26 17:55:59 +00:00
<a href="[% c.uri_for('/build' input.get_column('dependency')) %]">[% input.get_column('dependency') %]</a>
2013-02-14 15:51:42 +00:00
[% ELSE %]
<tt>[% input.revision %]</tt>
2013-02-14 16:51:09 +00:00
[% END;
END;
2012-04-15 20:06:42 +00:00
2012-04-13 09:26:37 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderEvals %]
2013-04-26 12:49:11 +00:00
<table class="table table-condensed table-striped clickable-rows">
2013-02-14 16:51:09 +00:00
<thead>
<tr>
2013-02-21 17:49:57 +00:00
[% IF !jobset && !build %]
2013-02-21 16:27:17 +00:00
<th>Jobset</th>
[% END %]
2013-02-14 16:51:09 +00:00
<th>#</th>
2013-02-21 16:27:17 +00:00
<th style="width: 10em">Date</th>
2013-02-14 16:51:09 +00:00
<th>Input changes</th>
2013-02-21 16:27:17 +00:00
<th colspan='2' style="width: 25em">Success</th>
2013-02-14 16:51:09 +00:00
</tr>
</thead>
<tbody>
2013-02-14 17:03:12 +00:00
[% FOREACH e IN evals;
2013-02-14 16:51:09 +00:00
eval = e.eval;
2013-02-14 15:51:42 +00:00
link = c.uri_for(c.controller('JobsetEval').action_for('view'), [eval.id]) %]
2013-02-22 17:05:04 +00:00
<tr>
2013-02-21 17:49:57 +00:00
[% IF !jobset && !build %]
2013-02-21 16:27:17 +00:00
<td>[% INCLUDE renderFullJobsetName project=eval.get_column('project') jobset=eval.get_column('jobset') %]</td>
[% END %]
2013-02-22 17:05:04 +00:00
<td><a class="row-link" href="[% link %]">[% eval.id %]</a></td>
2013-02-14 17:03:12 +00:00
<td>[% INCLUDE renderDateTime timestamp = eval.timestamp %]</td>
2013-02-14 16:51:09 +00:00
<td>
[% IF e.changedInputs.size > 0;
sep='';
FOREACH input IN e.changedInputs;
sep; %] [% input.name %] → [% INCLUDE renderShortEvalInput input=input;
2013-02-21 16:27:17 +00:00
sep=', ';
2013-02-14 16:51:09 +00:00
END;
ELSE %]
-
[% END %]
</td>
<td align='right'>
<span class="label label-success">[% e.nrSucceeded %]</span>
<span class="label label-important">[% e.nrFailed %]</span>
[% IF e.nrScheduled > 0 %]
<span class="label">[% e.nrScheduled %]</span>
[% END %]
</td>
<td align='right'>
[% IF e.diff > 0 %]
<span class='label label-success'><strong>+[% e.diff %]</strong></span>
[% ELSIF e.diff < 0 && e.nrScheduled == 0 %]
<span class='label label-important'><strong>[% e.diff %]</strong></span>
[% END %]
</td>
</tr>
[% END;
IF linkToAll %]
2013-02-22 12:00:40 +00:00
<tr><td class="centered" colspan="5"><a href="[% linkToAll %]"><em>More...</em></a></td></tr>
2013-02-14 16:51:09 +00:00
[% END %]
</tbody>
</table>
[% END;
2013-02-14 14:53:34 +00:00
2013-02-14 16:51:09 +00:00
BLOCK renderLogLinks %]
2013-02-22 17:05:04 +00:00
(<a [% IF inRow %]class="row-link"[% END %] href="[% url %]">log</a>, <a href="[% "$url/raw" %]">raw</a>, <a href="[% "$url/tail-reload" %]">tail</a>)
2013-02-22 12:36:15 +00:00
[% END;
BLOCK makeLazyTab %]
<div id="[% tabName %]" class="tab-pane">
<center><img src="/static/images/ajax-loader.gif" alt="Loading..." /></center>
</div>
<script>
$(function() {
$('.nav-tabs').bind('show', function(e) {
var pattern = /#.+/gi;
var id = e.target.toString().match(pattern)[0];
if (id == "#[% tabName %]") {
2013-02-22 13:17:14 +00:00
$('#[% tabName %]').load("[% uri %]", function(response, status, xhr) {
if (status == "error") {
$('#[% tabName %]').html("<div class='alert alert-error'>Error loading tab: " + xhr.status + " " + xhr.statusText + "</div>");
}
});
2013-02-22 12:36:15 +00:00
}
});
});
</script>
[% END;
2013-04-26 15:12:43 +00:00
BLOCK makePopover %]
<div class="btn btn-info pull-right hydra-popover" data-toggle="popover" data-placement="left" data-html="true" [% HTML.attributes('data-content' => content) %]>
[% title %]
</div>
[% END;
2013-02-22 12:36:15 +00:00
%]