2013-02-21 00:12:57 +00:00
|
|
|
[% WRAPPER layout.tt title="Project $project.name" %]
|
2008-11-17 23:59:20 +00:00
|
|
|
[% PROCESS common.tt %]
|
2013-02-21 00:12:57 +00:00
|
|
|
|
|
|
|
<ul class="nav nav-tabs">
|
2013-10-02 23:17:52 +00:00
|
|
|
[% IF c.user_exists %]
|
|
|
|
<li class="dropdown">
|
|
|
|
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
|
|
|
Actions
|
|
|
|
<b class="caret"></b>
|
|
|
|
</a>
|
|
|
|
<ul class="dropdown-menu">
|
2013-10-14 15:43:31 +00:00
|
|
|
[% INCLUDE menuItem title="Edit configuration" icon="icon-edit" uri=c.uri_for(c.controller('Project').action_for('edit'), c.req.captures) %]
|
2013-10-03 15:54:40 +00:00
|
|
|
[% INCLUDE menuItem title="Delete this project" icon="icon-trash" uri="javascript:deleteProject()" %]
|
Enable declarative projects.
This allows fully declarative project specifications. This is best
illustrated by example:
* I create a new project, setting the declarative spec file to
"spec.json" and the declarative input to a git repo pointing
at git://github.com/shlevy/declarative-hydra-example.git
* hydra creates a special ".jobsets" jobset alongside the project
* Just before evaluating the ".jobsets" jobset, hydra fetches
declarative-hydra-example.git, reads spec.json as a jobset spec,
and updates the jobset's configuration accordingly:
{
"enabled": 1,
"hidden": false,
"description": "Jobsets",
"nixexprinput": "src",
"nixexprpath": "default.nix",
"checkinterval": 300,
"schedulingshares": 100,
"enableemail": false,
"emailoverride": "",
"keepnr": 3,
"inputs": {
"src": { "type": "git", "value": "git://github.com/shlevy/declarative-hydra-example.git", "emailresponsible": false },
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs.git release-16.03", "emailresponsible": false }
}
}
* When the "jobsets" job of the ".jobsets" jobset completes, hydra
reads its output as a JSON representation of a dictionary of
jobset specs and creates a jobset named "master" configured
accordingly (In this example, this is the same configuration as
.jobsets itself, except using release.nix instead of default.nix):
{
"enabled": 1,
"hidden": false,
"description": "js",
"nixexprinput": "src",
"nixexprpath": "release.nix",
"checkinterval": 300,
"schedulingshares": 100,
"enableemail": false,
"emailoverride": "",
"keepnr": 3,
"inputs": {
"src": { "type": "git", "value": "git://github.com/shlevy/declarative-hydra-example.git", "emailresponsible": false },
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs.git release-16.03", "emailresponsible": false }
}
}
2016-03-11 23:14:58 +00:00
|
|
|
[% UNLESS project.declfile %]
|
2013-10-14 15:43:31 +00:00
|
|
|
[% INCLUDE menuItem title="Create jobset" icon="icon-plus" uri=c.uri_for(c.controller('Project').action_for('create_jobset'), c.req.captures) %]
|
Enable declarative projects.
This allows fully declarative project specifications. This is best
illustrated by example:
* I create a new project, setting the declarative spec file to
"spec.json" and the declarative input to a git repo pointing
at git://github.com/shlevy/declarative-hydra-example.git
* hydra creates a special ".jobsets" jobset alongside the project
* Just before evaluating the ".jobsets" jobset, hydra fetches
declarative-hydra-example.git, reads spec.json as a jobset spec,
and updates the jobset's configuration accordingly:
{
"enabled": 1,
"hidden": false,
"description": "Jobsets",
"nixexprinput": "src",
"nixexprpath": "default.nix",
"checkinterval": 300,
"schedulingshares": 100,
"enableemail": false,
"emailoverride": "",
"keepnr": 3,
"inputs": {
"src": { "type": "git", "value": "git://github.com/shlevy/declarative-hydra-example.git", "emailresponsible": false },
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs.git release-16.03", "emailresponsible": false }
}
}
* When the "jobsets" job of the ".jobsets" jobset completes, hydra
reads its output as a JSON representation of a dictionary of
jobset specs and creates a jobset named "master" configured
accordingly (In this example, this is the same configuration as
.jobsets itself, except using release.nix instead of default.nix):
{
"enabled": 1,
"hidden": false,
"description": "js",
"nixexprinput": "src",
"nixexprpath": "release.nix",
"checkinterval": 300,
"schedulingshares": 100,
"enableemail": false,
"emailoverride": "",
"keepnr": 3,
"inputs": {
"src": { "type": "git", "value": "git://github.com/shlevy/declarative-hydra-example.git", "emailresponsible": false },
"nixpkgs": { "type": "git", "value": "git://github.com/NixOS/nixpkgs.git release-16.03", "emailresponsible": false }
}
}
2016-03-11 23:14:58 +00:00
|
|
|
[% END %]
|
2013-10-14 15:43:31 +00:00
|
|
|
[% INCLUDE menuItem title="Create release" icon="icon-plus" uri=c.uri_for(c.controller('Project').action_for('create_release'), c.req.captures) %]
|
2013-10-02 23:17:52 +00:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
[% END %]
|
|
|
|
|
2013-02-21 00:12:57 +00:00
|
|
|
<li class="active"><a href="#tabs-project" data-toggle="tab">Jobsets</a></li>
|
2013-06-24 23:00:59 +00:00
|
|
|
<li><a href="#tabs-configuration" data-toggle="tab">Configuration</a></li>
|
2013-02-21 00:23:42 +00:00
|
|
|
<li><a href="#tabs-releases" data-toggle="tab">Releases</a></li>
|
2013-02-21 00:12:57 +00:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<div class="tab-content">
|
|
|
|
|
2016-10-27 14:46:20 +00:00
|
|
|
<script type="text/javascript">
|
2016-11-01 12:03:14 +00:00
|
|
|
function showJobsets() {
|
|
|
|
var showHidden = $('#show-hidden').hasClass('active');
|
|
|
|
var showDisabled = $('#show-disabled').hasClass('active');
|
|
|
|
$('tr.jobset').map(function() {
|
|
|
|
var hide =
|
|
|
|
($(this).hasClass('hidden-jobset') && !showHidden) ||
|
|
|
|
($(this).hasClass('disabled-jobset') && !showDisabled);
|
|
|
|
if (hide) $(this).hide(); else $(this).show();
|
2016-10-27 14:46:20 +00:00
|
|
|
});
|
2016-11-01 12:03:14 +00:00
|
|
|
return false;
|
|
|
|
};
|
2016-10-27 14:46:20 +00:00
|
|
|
|
2016-11-01 12:03:14 +00:00
|
|
|
$(document).ready(function() {
|
|
|
|
$('#show-hidden, #show-disabled').on('click', function(e) {
|
|
|
|
$(this).toggleClass('active');
|
|
|
|
showJobsets();
|
|
|
|
return false;
|
2016-10-27 14:46:20 +00:00
|
|
|
});
|
2016-11-01 12:03:14 +00:00
|
|
|
|
|
|
|
showJobsets();
|
2016-10-27 14:46:20 +00:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
2013-02-21 00:12:57 +00:00
|
|
|
<div id="tabs-project" class="tab-pane active">
|
2013-10-03 11:04:20 +00:00
|
|
|
[% IF project.jobsets %]
|
2016-10-27 14:46:20 +00:00
|
|
|
<p>This project has the following jobsets:
|
2017-12-05 13:07:58 +00:00
|
|
|
<label id="show-disabled" class="btn btn-small pull-right" data-toggle="button">Show disabled jobsets</label>
|
2016-10-27 14:46:20 +00:00
|
|
|
[% IF isProjectOwner %]
|
2016-11-01 12:13:59 +00:00
|
|
|
<label id="show-hidden" class="btn btn-small pull-right" data-toggle="button">Show hidden jobsets</label>
|
2016-10-27 14:46:20 +00:00
|
|
|
[% END %]
|
|
|
|
</p>
|
2013-11-05 15:05:29 +00:00
|
|
|
[% INCLUDE renderJobsetOverview %]
|
2013-02-21 00:12:57 +00:00
|
|
|
[% ELSE %]
|
|
|
|
<p>No jobsets have been defined yet.</p>
|
|
|
|
[% END %]
|
|
|
|
</div>
|
|
|
|
|
2013-06-24 23:00:59 +00:00
|
|
|
<div id="tabs-configuration" class="tab-pane">
|
2013-02-21 12:42:44 +00:00
|
|
|
<table class="info-table">
|
2013-02-21 00:12:57 +00:00
|
|
|
<tr>
|
|
|
|
<th>Display name:</th>
|
|
|
|
<td>[% HTML.escape(project.displayname) %]</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>Description:</th>
|
|
|
|
<td>[% HTML.escape(project.description) %]</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>Homepage:</th>
|
|
|
|
<td>
|
|
|
|
[% IF project.homepage %]
|
|
|
|
<a [% HTML.attributes(href => project.homepage) %]>[% HTML.escape(project.homepage) %]</a>
|
|
|
|
[% ELSE %]
|
|
|
|
<em>(not specified)</em>
|
|
|
|
[% END %]
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>Owner:</th>
|
|
|
|
<td><tt>[% HTML.escape(project.owner.username) %]</tt></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>Enabled:</th>
|
|
|
|
<td>[% project.enabled ? "Yes" : "No" %]</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|
2013-02-21 00:23:42 +00:00
|
|
|
<div id="tabs-releases" class="tab-pane">
|
|
|
|
|
|
|
|
[% IF releases.size == 0 %]
|
|
|
|
|
|
|
|
<p><em>This project has no releases yet.</em></p>
|
|
|
|
|
|
|
|
[% ELSE %]
|
|
|
|
|
|
|
|
<p>This project has made the following releases:</p>
|
|
|
|
|
2013-04-26 12:49:11 +00:00
|
|
|
<table class="table table-condensed table-striped clickable-rows">
|
2013-02-21 00:23:42 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Date</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
[% FOREACH release IN releases %]
|
2013-02-22 17:05:04 +00:00
|
|
|
<tr>
|
|
|
|
<td><a class="row-link" href="[% c.uri_for('/release' project.name release.name) %]"><tt>[% release.name %]</tt></a></td>
|
2013-02-21 00:23:42 +00:00
|
|
|
<td>[% INCLUDE renderDateTime timestamp = release.timestamp %]</td>
|
|
|
|
</tr>
|
|
|
|
[% END %]
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2010-02-05 14:48:22 +00:00
|
|
|
</div>
|
|
|
|
|
2013-10-03 15:23:41 +00:00
|
|
|
<script>
|
|
|
|
function deleteProject() {
|
|
|
|
bootbox.confirm(
|
|
|
|
'Are you sure you want to delete this project?',
|
|
|
|
function(c) {
|
|
|
|
if (!c) return;
|
|
|
|
redirectJSON({
|
|
|
|
url: "[% c.uri_for('/project' project.name) %]",
|
|
|
|
type: 'DELETE'
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
2008-11-10 13:33:12 +00:00
|
|
|
[% END %]
|