2008-11-10 13:33:12 +00:00
|
|
|
[% WRAPPER layout.tt title="Hydra Overview" %]
|
2008-11-13 14:54:50 +00:00
|
|
|
[% USE HTML %]
|
2008-11-10 13:33:12 +00:00
|
|
|
|
|
|
|
|
2008-11-13 14:54:50 +00:00
|
|
|
[% BLOCK maybeEditString %]
|
|
|
|
[% IF edit %]
|
2008-11-17 11:44:51 +00:00
|
|
|
<input type="text" class="string [% extraClass %]" [% HTML.attributes(id => param, name => param, value => value) %] />
|
2008-11-13 14:54:50 +00:00
|
|
|
[% ELSE %]
|
|
|
|
[% HTML.escape(value) %]
|
|
|
|
[% END %]
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
|
2008-11-17 11:44:51 +00:00
|
|
|
[% BLOCK renderInputType %]
|
|
|
|
[% SWITCH type %]
|
|
|
|
[% CASE "svn" %]Subversion checkout
|
|
|
|
[% CASE "cvs" %]CVS checkout
|
|
|
|
[% CASE "tarball" %]Download of a tarball
|
|
|
|
[% CASE "string" %]String value
|
|
|
|
[% CASE "path" %]Local path
|
|
|
|
[% END %]
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
|
|
|
|
[% BLOCK renderInputTypeOption %]
|
|
|
|
<option value="[% type %]" [% IF value == type %]selected="selected"[%END %]>[% INCLUDE renderInputType %]</option>
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
|
2008-11-17 15:31:19 +00:00
|
|
|
[% BLOCK renderInput %]
|
|
|
|
|
|
|
|
<tr class="input [% extraClass %]" id="[% id %]">
|
|
|
|
[% IF edit %]
|
|
|
|
<td>
|
|
|
|
[% IF edit %]<a href="javascript:" onclick='$(this).parents(".input").remove()'>[X]</a>[% END -%]
|
|
|
|
</td>
|
|
|
|
[% END %]
|
|
|
|
<td>
|
|
|
|
<tt>[% INCLUDE maybeEditString param="$baseName-name" value=input.name extraClass="shortString" %]</tt>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
[% IF edit %]
|
|
|
|
<select id="[% "$baseName-type" %]" name="[% "$baseName-type" %]">
|
|
|
|
[% INCLUDE renderInputTypeOption value=input.type type="svn" %]
|
|
|
|
[% INCLUDE renderInputTypeOption value=input.type type="cvs" %]
|
|
|
|
[% INCLUDE renderInputTypeOption value=input.type type="tarball" %]
|
|
|
|
[% INCLUDE renderInputTypeOption value=input.type type="string" %]
|
|
|
|
[% INCLUDE renderInputTypeOption value=input.type type="path" %]
|
|
|
|
</select>
|
|
|
|
[% ELSE %]
|
|
|
|
[% INCLUDE renderInputType type=input.type %]
|
|
|
|
[% END %]
|
|
|
|
</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 maybeEditString param="$baseName-values" value=alt.value %]
|
|
|
|
[% IF edit %]<a href="javascript:" onclick='$(this).parents(".inputalt").remove()'>[X]</a>[% END %]
|
|
|
|
[% END %]
|
|
|
|
</tt>
|
|
|
|
[% END %]
|
|
|
|
[% IF edit %]<a href="javascript:" class="add-inputalt">[+]</a>[% END %]
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
|
2008-11-13 17:55:40 +00:00
|
|
|
[% BLOCK renderJobset %]
|
2008-11-10 13:33:12 +00:00
|
|
|
|
2008-11-17 15:31:19 +00:00
|
|
|
<div class="jobset[% IF edit %] jobset-edit[% END %]" id="[% "jobset-$baseName" %]">
|
2008-11-13 09:48:10 +00:00
|
|
|
|
2008-11-13 18:16:57 +00:00
|
|
|
<h3>[% IF jobset %]Jobset <tt>[% jobset.name %]</tt>[% ELSE %]New jobset[% END %]</h3>
|
2008-11-10 13:33:12 +00:00
|
|
|
|
2008-11-12 11:09:21 +00:00
|
|
|
<h4>Information</h4>
|
|
|
|
|
|
|
|
<table>
|
2008-11-13 18:16:57 +00:00
|
|
|
[% IF edit %]
|
|
|
|
<tr>
|
|
|
|
<th>Identifier:</th>
|
|
|
|
<td>[% INCLUDE maybeEditString param="jobset-$baseName-name" value=jobset.name %]</td>
|
|
|
|
</tr>
|
|
|
|
[% END %]
|
2008-11-12 11:09:21 +00:00
|
|
|
<tr>
|
|
|
|
<th>Description:</th>
|
2008-11-13 17:55:40 +00:00
|
|
|
<td>[% INCLUDE maybeEditString param="jobset-$baseName-description" value=jobset.description %]</td>
|
2008-11-12 11:09:21 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>Nix expression:</th>
|
2008-11-13 17:55:40 +00:00
|
|
|
<td>
|
2008-11-17 11:44:51 +00:00
|
|
|
<tt>[% INCLUDE maybeEditString param="jobset-$baseName-nixexprpath" value=jobset.nixexprpath extraClass="shortString" %]</tt> in input
|
|
|
|
<tt>[% INCLUDE maybeEditString param="jobset-$baseName-nixexprinput" value=jobset.nixexprinput extraClass="shortString" %]</tt>
|
2008-11-13 17:55:40 +00:00
|
|
|
</td>
|
2008-11-12 11:09:21 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<h4>Inputs</h4>
|
2008-11-10 13:33:12 +00:00
|
|
|
|
2008-11-17 13:36:58 +00:00
|
|
|
[% IF edit %]
|
2008-11-17 15:31:19 +00:00
|
|
|
<p><button class="add-input">Add a new input</button></p>
|
2008-11-17 13:36:58 +00:00
|
|
|
[% END %]
|
|
|
|
|
2008-11-10 13:33:12 +00:00
|
|
|
<table class="tablesorter">
|
|
|
|
<thead>
|
2008-11-17 13:36:58 +00:00
|
|
|
<tr>[% IF edit %]<th></th>[% END %]<th>Input name</th><th>Type</th><th>Values</th></tr>
|
2008-11-10 13:33:12 +00:00
|
|
|
</thead>
|
2008-11-17 15:31:19 +00:00
|
|
|
<tbody class="inputs">
|
2008-11-10 13:33:12 +00:00
|
|
|
[% FOREACH input IN jobset.jobsetinputs -%]
|
2008-11-17 15:31:19 +00:00
|
|
|
[% INCLUDE renderInput input=input baseName="jobset-$baseName-input-$input.name" %]
|
2008-11-10 13:33:12 +00:00
|
|
|
[% END %]
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
2008-11-13 17:55:40 +00:00
|
|
|
[% IF edit %]
|
2008-11-17 13:36:58 +00:00
|
|
|
<hr />
|
|
|
|
<p><button onclick='$(this).parents(".jobset").remove()'>Delete this jobset</button></p>
|
2008-11-13 17:55:40 +00:00
|
|
|
[% END %]
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
|
|
|
|
[% IF edit %]
|
|
|
|
<form action="[% IF create %][% c.uri_for('/createproject/submit') %][% ELSE %][% c.uri_for('/project' curProject.name 'submit') %][% END %]" method="post">
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
|
|
|
|
[% IF create %]
|
|
|
|
<h1>New Project</h1>
|
|
|
|
[% ELSE %]
|
|
|
|
<h1>Project <tt>[% curProject.name %]</tt></h1>
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
|
|
|
|
<h2>General information</h2>
|
|
|
|
|
|
|
|
<table>
|
|
|
|
[% IF edit %]
|
|
|
|
<tr>
|
|
|
|
<th>Identifier:</th>
|
|
|
|
<td><tt>[% INCLUDE maybeEditString param="name" value=curProject.name %]</tt></td>
|
|
|
|
</tr>
|
|
|
|
[% END %]
|
|
|
|
<tr>
|
|
|
|
<th>Display name:</th>
|
|
|
|
<td>[% INCLUDE maybeEditString param="displayname" value=curProject.displayname %]</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>Description:</th>
|
|
|
|
<td>[% INCLUDE maybeEditString param="description" value=curProject.description %]</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
|
|
<h2>Jobsets</h2>
|
|
|
|
|
|
|
|
[% IF curProject.jobsets && curProject.jobsets.size > 0 || edit %]
|
|
|
|
|
|
|
|
[% IF edit %]
|
|
|
|
<p><button id="add-jobset">Add a new jobset</button></p>
|
|
|
|
|
|
|
|
<div id="jobset-template" class="template">
|
|
|
|
[% INCLUDE renderJobset jobset="" baseName="template" %]
|
|
|
|
</div>
|
2008-11-17 13:36:58 +00:00
|
|
|
|
2008-11-17 15:31:19 +00:00
|
|
|
<table class="template"> <!-- dummy wrapper needed because “hidden” trs are visible anyway -->
|
|
|
|
[% INCLUDE renderInput input="" extraClass="template" id="input-template" baseName="input-template" %]
|
|
|
|
</table>
|
|
|
|
|
2008-11-17 13:36:58 +00:00
|
|
|
<tt id="inputalt-template" class="inputalt template">
|
|
|
|
<input type="text" class="string" />
|
|
|
|
<a href="javascript:" onclick='$(this).parents(".inputalt").remove()'>[X]</a>
|
|
|
|
</tt>
|
2008-11-13 17:55:40 +00:00
|
|
|
|
|
|
|
<script>
|
2008-11-17 13:36:58 +00:00
|
|
|
$(document).ready(function() {
|
|
|
|
var id = 0;
|
|
|
|
|
|
|
|
$("#add-jobset").click(function() {
|
|
|
|
var newid = "jobset-" + id++;
|
2008-11-17 15:31:19 +00:00
|
|
|
var x = $("#jobset-template").clone(true).attr("id", newid).insertAfter($("#jobset-template")).slideDown("fast");
|
|
|
|
$("#jobset-template", x).attr("id", newid);
|
|
|
|
$("#jobset-template-name", x).attr("name", newid + "-name");
|
|
|
|
$("#jobset-template-description", x).attr("name", newid + "-description");
|
|
|
|
$("#jobset-template-nixexprpath", x).attr("name", newid + "-nixexprpath");
|
|
|
|
$("#jobset-template-nixexprinput", x).attr("name", newid + "-nixexprinput");
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
|
|
|
|
$(".add-input").click(function() {
|
|
|
|
var jobset = $(this).parents(".jobset");
|
|
|
|
var inputid = jobset.attr("id");
|
|
|
|
var newid = inputid + "-input-" + id++;
|
|
|
|
var x = $("#input-template").clone(true).attr("id", "").appendTo($(".inputs", jobset)).show();
|
|
|
|
$("#input-template-name", x).attr("name", newid + "-name");
|
|
|
|
$("#input-template-type", x).attr("name", newid + "-type");
|
|
|
|
$("#input-template", x).attr("id", newid);
|
2008-11-17 13:36:58 +00:00
|
|
|
return false;
|
|
|
|
});
|
|
|
|
|
2008-11-17 15:31:19 +00:00
|
|
|
$(".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");
|
2008-11-17 13:36:58 +00:00
|
|
|
});
|
2008-11-13 17:55:40 +00:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
[% FOREACH jobset IN curProject.jobsets -%]
|
|
|
|
[% INCLUDE renderJobset jobset=jobset baseName=jobset.name %]
|
|
|
|
[% END -%]
|
2008-11-10 13:33:12 +00:00
|
|
|
|
2008-11-13 09:48:10 +00:00
|
|
|
[% ELSE %]
|
|
|
|
|
|
|
|
<p>No jobsets have been defined yet.</p>
|
|
|
|
|
|
|
|
[% END %]
|
|
|
|
|
2008-11-10 13:33:12 +00:00
|
|
|
|
2008-11-13 14:54:50 +00:00
|
|
|
[% IF !edit %]
|
|
|
|
|
|
|
|
|
2008-11-10 13:33:12 +00:00
|
|
|
<h2>Jobs</h2>
|
|
|
|
|
2008-11-13 17:55:40 +00:00
|
|
|
[% IF jobName && jobNames.size > 0 %]
|
2008-11-13 09:48:10 +00:00
|
|
|
|
2008-11-10 13:33:12 +00:00
|
|
|
<ul>
|
|
|
|
[% FOREACH jobName IN jobNames -%]
|
2008-11-13 00:01:19 +00:00
|
|
|
<li><a href="[% c.uri_for('/job' curProject.name jobName.attrname) %]"><tt>[% jobName.attrname %]</tt></a></li>
|
2008-11-10 13:33:12 +00:00
|
|
|
[% END %]
|
|
|
|
</ul>
|
|
|
|
|
2008-11-13 09:48:10 +00:00
|
|
|
[% ELSE %]
|
|
|
|
|
|
|
|
<p>No builds have been performed or scheduled.</p>
|
|
|
|
|
|
|
|
[% END %]
|
|
|
|
|
2008-11-10 13:33:12 +00:00
|
|
|
|
2008-11-12 11:09:21 +00:00
|
|
|
<h2>Statistics</h2>
|
|
|
|
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<th>Finished builds:</th>
|
|
|
|
<td>[% finishedBuilds %]</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th><img src="/static/images/success.gif" /> Succeeded builds:</th>
|
|
|
|
<td>[% succeededBuilds %]</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th><img src="/static/images/failure.gif" /> Failed builds:</th>
|
|
|
|
<td>[% finishedBuilds - succeededBuilds %]</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>Total build time:</th>
|
|
|
|
<td>[% totalBuildTime %]s</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>Scheduled builds:</th>
|
|
|
|
<td>[% scheduledBuilds %]</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>Currently executing builds:</th>
|
|
|
|
<td>[% busyBuilds %]</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
2008-11-10 13:33:12 +00:00
|
|
|
|
2008-11-13 14:54:50 +00:00
|
|
|
[% END %]
|
|
|
|
|
|
|
|
|
|
|
|
[% IF edit %]
|
|
|
|
|
2008-11-13 17:55:40 +00:00
|
|
|
<hr />
|
2008-11-13 14:54:50 +00:00
|
|
|
|
2008-11-13 17:55:40 +00:00
|
|
|
<p><input type="submit" value="[% IF create %]Create[% ELSE %]Apply changes[% END %]" /></p>
|
2008-11-13 14:54:50 +00:00
|
|
|
|
|
|
|
</form>
|
2008-11-13 17:55:40 +00:00
|
|
|
|
|
|
|
[% IF !create %]
|
|
|
|
|
|
|
|
<form action="[% c.uri_for('/project' curProject.name 'delete') %]" method="post">
|
|
|
|
<p><input id="delete-project" type="submit" value="Delete this project" /></p>
|
|
|
|
</form>
|
2008-11-13 14:54:50 +00:00
|
|
|
|
2008-11-13 17:55:40 +00:00
|
|
|
<script>
|
|
|
|
$("#delete-project").click(function() {
|
|
|
|
return confirm("Are you sure you want to delete this project?");
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
[% END %]
|
|
|
|
|
2008-11-13 14:54:50 +00:00
|
|
|
[% END %]
|
|
|
|
|
|
|
|
|
2008-11-10 13:33:12 +00:00
|
|
|
[% END %]
|