2009-04-02 16:15:57 +00:00
|
|
|
|
[% WRAPPER layout.tt title=(edit ? (create ? "New Jobset in Project ‘$project.name’" : "Editing Jobset ‘$project.name:$jobset.name’") : "Jobset ‘$project.name:$jobset.name’") %]
|
|
|
|
|
[% PROCESS common.tt %]
|
|
|
|
|
|
|
|
|
|
[% IF edit %]
|
|
|
|
|
<form action="[% IF create %][% c.uri_for('/project' project.name 'create-jobset/submit') %][% ELSE %][% c.uri_for('/jobset' project.name jobset.name 'submit') %][% END %]" method="post">
|
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[% IF create %]
|
|
|
|
|
<h1>New Jobset in Project <tt>[% project.name %]</tt></h1>
|
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[% BLOCK renderInputAlt %]
|
|
|
|
|
[% IF edit %]
|
|
|
|
|
<button type="button" onclick='$(this).parents(".inputalt").remove()'><img src="/static/images/failure.gif" alt="Delete value" /></button>
|
|
|
|
|
[% INCLUDE maybeEditString param=param value=alt.value %]
|
|
|
|
|
<br />
|
|
|
|
|
[% ELSE %]
|
|
|
|
|
[% INCLUDE maybeEditString param=param value=alt.value %]
|
|
|
|
|
[% END %]
|
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[% BLOCK renderInput %]
|
|
|
|
|
|
|
|
|
|
<tr class="input [% extraClass %]" [% IF id %]id="[% id %]"[% END %]>
|
|
|
|
|
<td>
|
|
|
|
|
[% IF edit %]<button type="button" onclick='$(this).parents(".input").remove()'><img src="/static/images/failure.gif" alt="Delete input" /></button>[% END -%]
|
|
|
|
|
<tt>[% INCLUDE maybeEditString param="$baseName-name" value=input.name extraClass="shortString" %]</tt>
|
|
|
|
|
</td>
|
|
|
|
|
<td>
|
|
|
|
|
[% INCLUDE renderSelection curValue=input.type param="$baseName-type" options=inputTypes %]
|
|
|
|
|
</td>
|
|
|
|
|
<td class="inputalts" id="[% baseName %]">
|
|
|
|
|
[% FOREACH alt IN input.jobsetinputalts -%]
|
|
|
|
|
<tt class="inputalt">
|
|
|
|
|
[% IF input.type == "string" && !edit %]
|
|
|
|
|
"[% HTML.escape(alt.value) %]"
|
|
|
|
|
[% ELSE %]
|
|
|
|
|
[% INCLUDE renderInputAlt alt=alt param="$baseName-values" %]
|
|
|
|
|
[% END %]
|
|
|
|
|
</tt>
|
|
|
|
|
[% END %]
|
|
|
|
|
[% IF edit %]<button type="button" onclick='return false' class="add-inputalt">+</button>[% END %]
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
|
|
|
2010-02-05 14:48:22 +00:00
|
|
|
|
[% BLOCK renderInputs %]
|
|
|
|
|
<h3>Inputs</h3>
|
|
|
|
|
|
2012-04-12 18:12:07 +00:00
|
|
|
|
<table class="tablesorter table table-striped table-condensed">
|
2010-02-05 14:48:22 +00:00
|
|
|
|
<thead>
|
|
|
|
|
<tr><th>Input name</th><th>Type</th><th>Values</th></tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody class="inputs">
|
|
|
|
|
[% FOREACH input IN jobset.jobsetinputs -%]
|
|
|
|
|
[% INCLUDE renderInput input=input baseName="input-$input.name" %]
|
|
|
|
|
[% END %]
|
|
|
|
|
[% IF edit %]
|
|
|
|
|
<tr>
|
|
|
|
|
<td colspan="3"><button type="button" class="add-input">Add a new input</button></td>
|
|
|
|
|
</tr>
|
|
|
|
|
[% END %]
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
2009-04-02 16:15:57 +00:00
|
|
|
|
|
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
|
|
|
2012-04-12 18:12:07 +00:00
|
|
|
|
<ul id="tab" class="nav nav-tabs">
|
2010-02-05 14:48:22 +00:00
|
|
|
|
[% IF !edit -%]
|
2012-04-12 18:12:07 +00:00
|
|
|
|
<li><a href="#tabs-information" data-toggle="tab">Jobset</a></li>
|
2012-04-15 16:17:19 +00:00
|
|
|
|
[% IF jobset.errormsg -%]<li><a href="#tabs-errors" data-toggle="tab"><img src="/static/images/error_16.png" /> Evaluation errors</a></li>[% END %]
|
2012-04-12 18:12:07 +00:00
|
|
|
|
<li><a href="#tabs-jobs" data-toggle="tab">Jobs ([% activeJobs.size %])</a></li>
|
2010-02-05 14:48:22 +00:00
|
|
|
|
[% END %]
|
2012-04-12 18:12:07 +00:00
|
|
|
|
<li><a href="#tabs-setup" data-toggle="tab">Setup</a></li>
|
2010-02-05 14:48:22 +00:00
|
|
|
|
</ul>
|
2012-04-12 18:12:07 +00:00
|
|
|
|
<div id="generic-tabs" class="tab-content">
|
|
|
|
|
<div id="tabs-information" class="tab-pane active">
|
2012-04-15 18:47:22 +00:00
|
|
|
|
[% IF !edit && evals.size() > 0 -%]
|
2012-04-13 09:47:05 +00:00
|
|
|
|
<h2>Most recent evaluations</h2>
|
2012-04-15 18:47:22 +00:00
|
|
|
|
[% INCLUDE renderEvals nrShown=evals.size() - 1 linkToAll=c.uri_for(c.controller('Jobset').action_for('evals'), [project.name, jobset.name]) %]
|
2012-04-13 09:47:05 +00:00
|
|
|
|
[% END %]
|
2010-02-05 14:48:22 +00:00
|
|
|
|
[% IF !edit && activeJobsStatus -%]
|
|
|
|
|
<h2>Status</h2>
|
2012-04-12 18:12:07 +00:00
|
|
|
|
<table class="table table-striped table-condensed">
|
2010-02-05 14:48:22 +00:00
|
|
|
|
<thead><tr><th>Job</th>[% FOREACH s IN systems %]<th>[% s.system %]</th>[% END %]</tr></thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
[% odd = 0 %]
|
|
|
|
|
[% FOREACH j IN activeJobsStatus %]
|
|
|
|
|
<tr class="[% IF odd %] odd [% END; odd = !odd -%]">
|
|
|
|
|
<td>[% INCLUDE renderJobName project=project.name jobset = jobset.name job = j.get_column('job') %]</td>
|
|
|
|
|
[% FOREACH s IN systems %]
|
|
|
|
|
[% system = s.system %]
|
|
|
|
|
[% systemStatus = j.get_column(system) %]
|
2010-02-24 15:06:20 +00:00
|
|
|
|
<td class="centered">
|
2010-02-05 14:48:22 +00:00
|
|
|
|
[% IF systemStatus != undef %]
|
|
|
|
|
<a href="[% c.uri_for('/build' j.get_column(system _ '-build') ) %]">
|
2011-11-16 18:29:40 +00:00
|
|
|
|
[% INCLUDE renderBuildStatusIcon buildstatus=systemStatus size=16 %]
|
2010-02-05 14:48:22 +00:00
|
|
|
|
</a>
|
|
|
|
|
[% END %]
|
|
|
|
|
</td>
|
|
|
|
|
[% END %]
|
|
|
|
|
</tr>
|
|
|
|
|
[% END %]
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
[% END %]
|
2010-02-09 13:43:53 +00:00
|
|
|
|
[% IF !edit && !activeJobsStatus -%]
|
|
|
|
|
<h2>Status</h2>
|
|
|
|
|
<p>
|
|
|
|
|
[ <a href="[% c.uri_for('/jobset' project.name jobset.name 'with-status' ) %]">Show status overview</a> ]
|
|
|
|
|
</p>
|
|
|
|
|
[% END %]
|
2010-02-05 14:48:22 +00:00
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
[% IF !edit -%]
|
|
|
|
|
|
|
|
|
|
[% IF jobset.errormsg -%]
|
2012-04-12 18:12:07 +00:00
|
|
|
|
<div id="tabs-errors" class="tab-pane">
|
2012-04-15 16:48:29 +00:00
|
|
|
|
<h2>Evaluation errors</h2>
|
2010-02-05 14:48:22 +00:00
|
|
|
|
<pre class="multiLineMsg error">[% HTML.escape(jobset.errormsg) %]</pre>
|
|
|
|
|
</div>
|
|
|
|
|
[% END %]
|
|
|
|
|
[% END %]
|
2012-04-12 18:12:07 +00:00
|
|
|
|
<div id="tabs-setup" class="tab-pane [% IF edit %]active[% END %]">
|
2010-04-23 11:20:40 +00:00
|
|
|
|
<h2>Information</h2>
|
|
|
|
|
|
2010-02-05 14:48:22 +00:00
|
|
|
|
<table class="layoutTable">
|
|
|
|
|
[% IF edit %]
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Identifier:</th>
|
|
|
|
|
<td>[% INCLUDE maybeEditString param="name" value=jobset.name %]</td>
|
|
|
|
|
</tr>
|
|
|
|
|
[% END %]
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Description:</th>
|
|
|
|
|
<td>[% INCLUDE maybeEditString param="description" value=jobset.description %]</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Nix expression:</th>
|
|
|
|
|
<td>
|
|
|
|
|
<tt>[% INCLUDE maybeEditString param="nixexprpath" value=jobset.nixexprpath extraClass="shortString" %]</tt> in input
|
|
|
|
|
<tt>[% INCLUDE maybeEditString param="nixexprinput" value=jobset.nixexprinput extraClass="shortString" %]</tt>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Enabled:</th>
|
|
|
|
|
<td>
|
|
|
|
|
[% INCLUDE renderSelection param="enabled" curValue=jobset.enabled options={"1" = "Yes", "0" = "No"} %]
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Enable email notification:</th>
|
|
|
|
|
<td>
|
|
|
|
|
[% INCLUDE renderSelection param="enableemail" curValue=jobset.enableemail options={"1" = "Yes", "0" = "No"} %]
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
2010-08-10 06:48:45 +00:00
|
|
|
|
<tr>
|
|
|
|
|
<th>Email override:</th>
|
|
|
|
|
<td>
|
|
|
|
|
[% INCLUDE maybeEditString param="emailoverride" value=jobset.emailoverride %]
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Number of builds to keep:</th>
|
|
|
|
|
<td>
|
|
|
|
|
[% INCLUDE maybeEditString param="keepnr" value=jobset.keepnr %]
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
2010-02-05 14:48:22 +00:00
|
|
|
|
[% IF !edit %]
|
|
|
|
|
<tr>
|
|
|
|
|
<th>Last checked:</th>
|
|
|
|
|
<td>
|
|
|
|
|
[% IF jobset.lastcheckedtime %]
|
|
|
|
|
[% INCLUDE renderDateTime timestamp = jobset.lastcheckedtime -%][% IF jobset.errormsg -%]<em>, with errors!</em>
|
|
|
|
|
[% ELSE %], <em>no errors</em>
|
|
|
|
|
[% END %]
|
|
|
|
|
[% ELSE %]
|
|
|
|
|
<em>never</em>
|
|
|
|
|
[% END %]
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
[% END %]
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[% INCLUDE renderInputs %]
|
|
|
|
|
</div>
|
|
|
|
|
[% IF !edit -%]
|
2012-04-12 18:12:07 +00:00
|
|
|
|
<div id="tabs-jobs" class="tab-pane">
|
2010-02-05 14:48:22 +00:00
|
|
|
|
|
|
|
|
|
<h2>Jobs</h2>
|
|
|
|
|
|
|
|
|
|
<p>This jobset currently contains the following [% activeJobs.size %] jobs:
|
|
|
|
|
|
|
|
|
|
<blockquote>
|
|
|
|
|
[% IF activeJobs.size == 0 %]<em>(none)</em>[% END %]
|
2010-02-09 13:47:20 +00:00
|
|
|
|
[% FOREACH j IN activeJobs %] [% INCLUDE renderJobName project=project.name jobset=jobset.name job=j %] [% END %]
|
2010-02-05 14:48:22 +00:00
|
|
|
|
</blockquote>
|
|
|
|
|
</p>
|
2010-02-09 13:47:20 +00:00
|
|
|
|
|
2010-02-05 14:48:22 +00:00
|
|
|
|
<p>This jobset used to contain the following [% inactiveJobs.size %] jobs:
|
|
|
|
|
|
|
|
|
|
<blockquote>
|
|
|
|
|
[% IF inactiveJobs.size == 0 %]<em>(none)</em>[% END %]
|
2010-02-09 13:47:20 +00:00
|
|
|
|
[% FOREACH j IN inactiveJobs %] [% INCLUDE renderJobName project=project.name jobset=jobset.name job=j %] [% END %]
|
2010-02-05 14:48:22 +00:00
|
|
|
|
</blockquote>
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
2012-04-12 18:12:07 +00:00
|
|
|
|
jQuery(document).ready(function ($) {
|
|
|
|
|
$('#tab').tab('show');
|
|
|
|
|
});
|
2010-02-05 14:48:22 +00:00
|
|
|
|
</script>
|
|
|
|
|
|
2009-04-02 16:15:57 +00:00
|
|
|
|
[% IF edit %]
|
|
|
|
|
|
|
|
|
|
<table class="template"> <!-- dummy wrapper needed because “hidden” trs are visible anyway -->
|
|
|
|
|
[% INCLUDE renderInput input="" extraClass="template" id="input-template" baseName="input-template" %]
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<tt class="inputalt template" id="inputalt-template">
|
|
|
|
|
[% INCLUDE renderInputAlt alt=alt %]
|
|
|
|
|
</tt>
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(document).ready(function() {
|
|
|
|
|
var id = 0;
|
|
|
|
|
|
|
|
|
|
$(".add-input").click(function() {
|
|
|
|
|
var newid = "input-" + id++;
|
|
|
|
|
var x = $("#input-template").clone(true).attr("id", "").insertBefore($(this).parents("tr")).show();
|
|
|
|
|
$("#input-template-name", x).attr("name", newid + "-name");
|
|
|
|
|
$("#input-template-type", x).attr("name", newid + "-type");
|
|
|
|
|
$("#input-template", x).attr("id", newid);
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$(".add-inputalt").click(function() {
|
|
|
|
|
var x = $("#inputalt-template").clone(true).insertBefore($(this)).attr("id", "").show();
|
|
|
|
|
$("input", x).attr("name", x.parents(".inputalts").attr("id") + "-values");
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<p><button type="submit"><img src="/static/images/success.gif" />[%IF create %]Create[% ELSE %]Apply changes[% END %]</button></p>
|
|
|
|
|
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
[% END %]
|