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VK2DBKEWVYAC
KG5AMUMGZA53FMA35K3KYOPJTNG3BKWDFWDPVXJ6XGG2GJJRI2LAC
G4X5IUYJHZSEXAGFG5DRIJEHFBSQDQ2UTIJ4FCILIPZAUHGQ3GTQC
3U3CXCDWYL3MHNHANECWQBRDFXXH3QIR5V6WXJXERWOKVTFQMQZAC
RWFCW6ZNIE24XTEQUK5Y37K42BQER7EDGSSD4GQNFTGO5V4TY72QC
CVWQXYKMTLQSUFPTCYR4Q47IDX7TGGYPR2UKXB3NID6YMV3GRYMQC
C6ENW2KXGPPYWUJT3SRGF4QA2CM4D5AHZBJH63TGSPUC4VUNN7KQC
ADP54EI4ATQO5JCOS4D52TMCAOKXIINCFV5OOA3GYSJ4JQXQEXIAC
FGQPXZIX7EUHGILJWL6PCQQ54OYA53E6K2HUL765GKYOMK6U23QQC
6QRHXIM3XHCDLSIIBEGETDV67V6LTV55QMHC64ZPBMLTAECM5N3QC
PMNWRTGJ4GVSMSSAWSUD57B26PCRAHMZIQ5SIWJIK7A74ENKEQLAC
, enabled => trim($c->request->params->{enabled}) eq "1" ? 1 : 0
, enableemail => trim($c->request->params->{enableemail}) eq "1" ? 1 : 0
, enabled => defined $c->request->params->{enabled} ? 1 : 0
, enableemail => defined $c->request->params->{enableemail} ? 1 : 0
END;
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;
END;
END;
BLOCK maybeEditString;
IF edit %]
<input type="text" class="string [% extraClass %]" [% HTML.attributes(id => param, name => param, value => value) %] />
[% ELSE;
HTML.escape(value);
BLOCK editString;
IF edit %]
<input type="text" class="string" [% HTML.attributes(id => param, name => param, value => value) %] />
[% ELSE;
HTML.escape(value);
END;
BLOCK editString; %]
<input type="text" class="string" [% HTML.attributes(id => param, name => param, value => value) %] />
[% WRAPPER layout.tt title=(create ? "Create jobset in project $project.name" : "Editing jobset $project.name:$jobset.name") %]
[% PROCESS common.tt %]
[% BLOCK renderInputAlt %]
<button type="button" class="btn btn-warning" onclick='$(this).parents(".inputalt").remove()'><i class="icon-trash icon-white"></i></button>
<input type="text" [% HTML.attributes(value => alt.value, name => name) %]></input>
<br />
[% END %]
[% BLOCK renderInput %]
<tr class="input [% extraClass %]" [% IF id %]id="[% id %]"[% END %]>
<td>
<button type="button" class="btn btn-warning" onclick='$(this).parents(".input").remove()'><i class="icon-trash icon-white"></i></button>
<tt><input type="text" name="[% baseName %]-name" [% HTML.attributes(value => input.name) %]></input>
</td>
<td>
[% INCLUDE renderSelection curValue=input.type param="$baseName-type" options=inputTypes %]
</td>
<td class="inputalts" id="[% baseName %]">
[% FOREACH alt IN input.jobsetinputalts %]
<span class="inputalt">
[% INCLUDE renderInputAlt alt=alt name="$baseName-values" %]
</span>
[% END %]
[% IF edit %]<button type="button" class="add-inputalt btn btn-success" onclick='return false'><i class="icon-plus icon-white"></i></button>[% END %]
</td>
</tr>
[% END %]
[% BLOCK renderInputs %]
<table class="table table-striped table-condensed">
<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 %]
<tr>
<td colspan="3" style="text-align: center;"><button type="button" class="add-input btn btn-success"><i class="icon-plus icon-white"></i> Add a new input</button></td
</tr>
</tbody>
</table>
[% END %]
<form class="form-horizontal" 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">
<fieldset>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" name="enabled" [% IF jobset.enabled; 'checked="checked"'; END %]></input>Enabled
</label>
</div>
</div>
<div class="control-group">
<label class="control-label">Identifier</label>
<div class="controls">
<input type="text" class="span3" name="name" [% HTML.attributes(value => jobset.name) %]></input>
</div>
</div>
<div class="control-group">
<label class="control-label">Description</label>
<div class="controls">
<input type="text" class="span3" name="description" [% HTML.attributes(value => jobset.description) %]></input>
</div>
</div>
<div class="control-group">
<label class="control-label">Nix expression</label>
<div class="controls">
<input type="text" class="span3" name="nixexprpath" [% HTML.attributes(value => jobset.nixexprpath) %]></input>
in
<input type="text" class="span3" name="nixexprinput" [% HTML.attributes(value => jobset.nixexprinput) %]></input>
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" name="enableemail" [% IF jobset.enableemail; 'checked="checked"'; END %]></input>Email notification
</label>
</div>
</div>
<div class="control-group">
<label class="control-label">Email override</label>
<div class="controls">
<input type="text" class="span3" name="emailoverride" [% HTML.attributes(value => jobset.emailoverride) %]></input>
</div>
</div>
<div class="control-group">
<label class="control-label">Number of builds to keep</label>
<div class="controls">
<input type="number" class="span3" name="keepnr" [% HTML.attributes(value => jobset.keepnr) %]></input>
</div>
</div>
[% INCLUDE renderInputs %]
<div class="form-actions">
<button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> [%IF create %]Create[% ELSE %]Apply changes[% END %]</button>
</div>
</fieldset>
<table class="hidden">
[% INCLUDE renderInput input="" extraClass="template" id="input-template" baseName="input-template" %]
</table>
<tt class="inputalt hidden" 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>
</form>
[% END %]
<input type="checkbox" name="visible" value="visible" [% IF !project.hidden; 'checked="checked"'; END %]></input>Visible in the list of projects
<input type="checkbox" name="visible" [% IF !project.hidden; 'checked="checked"'; END %]></input>Visible in the list of projects
[% IF edit %]
<form class="form-horizontal" 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 %]
[% BLOCK renderInputAlt %]
[% IF edit %]
<button type="button" class="btn btn-warning" onclick='$(this).parents(".inputalt").remove()'><i class="icon-trash icon-white"></i></button>
[% INCLUDE maybeEditString param=param value=alt.value %]
<br />
[% ELSE %]
[% INCLUDE maybeEditString param=param value=alt.value %]
[% END %]
[% 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 %]</tt>
<tt>[% HTML.escape(input.name) %]</tt>
<h3>Inputs</h3>
<table class="tablesorter table table-striped table-condensed">
<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" style="text-align: center;"><button type="button" class="add-input btn btn-success"><i class="icon-plus icon-white"></i> Add a new input</button></td>
</tr>
[% END %]
</tbody>
</table>
<h3>Inputs</h3>
<table class="tablesorter table table-striped table-condensed">
<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 %]
</tbody>
</table>
<ul class="nav nav-tabs">
[% IF !edit %]
<li class="active"><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 %]
<li><a href="#tabs-jobs" data-toggle="tab">Jobs ([% activeJobs.size %])</a></li>
[% END %]
<li><a href="#tabs-setup" data-toggle="tab">Setup</a></li>
</ul>
<ul class="nav nav-tabs">
<li class="active"><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 %]
<li><a href="#tabs-jobs" data-toggle="tab">Jobs ([% activeJobs.size %])</a></li>
<li><a href="#tabs-setup" data-toggle="tab">Configuration</a></li>
</ul>
<div id="tabs-information" class="tab-pane active">
[% IF !edit && evals.size() > 0 %]
<h2>Most recent evaluations</h2>
[% INCLUDE renderEvals linkToAll=c.uri_for(c.controller('Jobset').action_for('evals'), [project.name, jobset.name]) %]
[% END %]
[% IF !edit && activeJobsStatus %]
<h2>Status</h2>
<table class="table table-striped table-condensed">
<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) %]
<td class="centered">
[% IF systemStatus != undef %]
<a href="[% c.uri_for('/build' j.get_column(system _ '-build') ) %]">
[% INCLUDE renderBuildStatusIcon buildstatus=systemStatus size=16 %]
</a>
[% END %]
</td>
[% END %]
</tr>
[% END %]
</tbody>
</table>
[% END %]
[% 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 %]
[% IF jobset.errormsg %]
<div id="tabs-errors" class="tab-pane">
<h2>Evaluation errors</h2>
<p>
Errors occurred at <tt>[% INCLUDE renderDateTime timestamp=jobset.errortime %]</tt>.
</p>
<pre class="multiLineMsg error">[% HTML.escape(jobset.errormsg) %]</pre>
</div>
[% END %]
[% END %]
<div id="tabs-setup" class="tab-pane [% IF edit %]active[% END %]">
<h2>Information</h2>
[% IF evals.size() > 0 %]
<h2>Most recent evaluations</h2>
[% INCLUDE renderEvals linkToAll=c.uri_for(c.controller('Jobset').action_for('evals'), [project.name, jobset.name]) %]
[% END %]
<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 %]</tt> in input
<tt>[% INCLUDE maybeEditString param="nixexprinput" value=jobset.nixexprinput %]</tt>
</td>
</tr>
<tr>
<th>Enabled:</th>
<td>
[% INCLUDE renderSelection param="enabled" curValue=jobset.enabled radiobuttons=1 options={"1" = "Yes", "0" = "No"} %]
</td>
</tr>
<tr>
<th>Enable email notification:</th>
<td>
[% INCLUDE renderSelection param="enableemail" curValue=jobset.enableemail radiobuttons=1 options={"1" = "Yes", "0" = "No"} %]
</td>
</tr>
<tr>
<th>Email override:</th>
<td>
[% INCLUDE maybeEditString param="emailoverride" value=jobset.emailoverride %]
[% IF activeJobsStatus %]
<h2>Status</h2>
<table class="table table-striped table-condensed">
<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) %]
<td class="centered">
[% IF systemStatus != undef %]
<a href="[% c.uri_for('/build' j.get_column(system _ '-build') ) %]">
[% INCLUDE renderBuildStatusIcon buildstatus=systemStatus size=16 %]
</a>
[% END %]
</tr>
<tr>
<th>Number of builds to keep:</th>
<td>
[% INCLUDE maybeEditString param="keepnr" value=jobset.keepnr %]
</td>
</tr>
[% 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>
[% END %]
</tr>
[% END %]
</tbody>
</table>
[% ELSE %]
<h2>Status</h2>
<p>
[ <a href="[% c.uri_for('/jobset' project.name jobset.name 'with-status' ) %]">Show status overview</a> ]
</p>
[% END %]
[% INCLUDE renderInputs %]
</div>
[% IF !edit %]
<div id="tabs-jobs" class="tab-pane">
[% IF jobset.errormsg %]
<div id="tabs-errors" class="tab-pane">
<h2>Evaluation errors</h2>
<p>
Errors occurred at <tt>[% INCLUDE renderDateTime timestamp=jobset.errortime %]</tt>.
</p>
<pre class="multiLineMsg error">[% HTML.escape(jobset.errormsg) %]</pre>
</div>
[% END %]
<p>This jobset currently contains the following [% activeJobs.size %] jobs:
<table class="layoutTable">
<tr>
<th>Description:</th>
<td>[% HTML.escape(jobset.description) %]</td>
</tr>
<tr>
<th>Nix expression:</th>
<td>
<tt>[% HTML.escape(jobset.nixexprpath) %]</tt> in input
<tt>[% HTML.escape(jobset.nixexprinput) %]</tt>
</td>
</tr>
<tr>
<th>Enabled:</th>
<td>[% jobset.enabled ? "Yes" : "No" %]</td>
</tr>
<tr>
<th>Enable email notification:</th>
<td>[% jobset.enableemail ? "Yes" : "No" %]</td>
</tr>
<tr>
<th>Email override:</th>
<td>[% HTML.escape(jobset.emailoverride) %]</td>
</tr>
<tr>
<th>Number of builds to keep:</th>
<td>[% jobset.keepnr %]</td>
</tr>
<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>
</table>
<blockquote>
[% IF activeJobs.size == 0 %]<em>(none)</em>[% END %]
[% FOREACH j IN activeJobs %][% INCLUDE renderJobName project=project.name jobset=jobset.name job=j %]<br/>[% END %]
</blockquote>
</p>
[% INCLUDE renderInputs %]
</div>
<blockquote>
[% IF inactiveJobs.size == 0 %]<em>(none)</em>[% END %]
[% FOREACH j IN inactiveJobs %][% INCLUDE renderJobName project=project.name jobset=jobset.name job=j %]<br/>[% END %]
</blockquote>
<p>This jobset currently contains the following [% activeJobs.size %] jobs:
</div>
[% IF edit %]
<blockquote>
[% IF inactiveJobs.size == 0 %]<em>(none)</em>[% END %]
[% FOREACH j IN inactiveJobs %][% INCLUDE renderJobName project=project.name jobset=jobset.name job=j %]<br/>[% END %]
</blockquote>
</p>
<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>
<div class="form-actions">
<button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> [%IF create %]Create[% ELSE %]Apply changes[% END %]</button>