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-03 15:23:41 +00:00
<li><a href="[% c.uri_for('/project' project.name 'edit') %]"><i class="icon-edit icon-black"></i> Edit configuration</a></li>
<li><a href="javascript:deleteProject()"><i class="icon-trash icon-black"></i> Delete this project</a></li>
2013-10-02 23:17:52 +00:00
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('create_jobset'), [project.name]) title = "Create jobset" %]
[% INCLUDE menuItem uri = c.uri_for('/project' project.name 'create-release') title = "Create release" %]
</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-08-15 11:54:23 +00:00
[% IF views.size > 0 %]
<li><a href="#tabs-views" data-toggle="tab">Views</a></li>
[% END %]
2013-02-21 00:12:57 +00:00
</ul>
<div class="tab-content">
<div id="tabs-project" class="tab-pane active">
2013-10-03 11:04:20 +00:00
[% IF project.jobsets %]
2013-02-21 00:12:57 +00:00
<p>This project has the following jobsets:</p>
2013-04-26 12:49:11 +00:00
<table class="table table-striped table-condensed clickable-rows">
2013-02-21 00:12:57 +00:00
<thead>
<tr>
<th></th>
<th>Id</th>
<th>Description</th>
<th>Last evaluated</th>
<th colspan="2">Success</th>
</tr>
</thead>
<tbody>
[% FOREACH j IN jobsets %]
[% successrate = 0 %]
2013-02-22 17:05:04 +00:00
<tr>
2013-02-21 00:12:57 +00:00
<td>
[% IF j.get_column('nrscheduled') > 0 %]
2013-09-25 10:34:13 +00:00
<img src="[% c.uri_for("/static/images/help_16.png") %]" alt="Scheduled" />
2013-02-21 00:12:57 +00:00
[% ELSIF j.get_column('nrfailed') == 0 %]
2013-09-25 10:34:13 +00:00
<img src="[% c.uri_for("/static/images/checkmark_16.png") %]" alt="Succeeded" />
2013-02-21 00:12:57 +00:00
[% ELSIF j.get_column('nrfailed') > 0 && j.get_column('nrsucceeded') > 0 %]
2013-09-25 10:34:13 +00:00
<img src="[% c.uri_for("/static/images/error_some_16.png") %]" alt="Some Failed" />
2013-02-21 00:12:57 +00:00
[% ELSE %]
2013-09-25 10:34:13 +00:00
<img src="[% c.uri_for("/static/images/error_16.png") %]" alt="All Failed" />
2013-01-22 13:41:02 +00:00
[% END %]
2013-02-21 00:12:57 +00:00
</td>
2013-02-22 17:05:04 +00:00
<td><span class="[% IF !j.enabled %]disabled-jobset[% END %] [%+ IF j.hidden %]hidden-jobset[% END %]">[% INCLUDE renderJobsetName project=project.name jobset=j.name inRow=1 %]</span></td>
2013-02-21 00:12:57 +00:00
<td>[% HTML.escape(j.description) %]</td>
2013-08-16 16:26:01 +00:00
<td>[% IF j.lastcheckedtime; INCLUDE renderDateTime timestamp = j.lastcheckedtime; ELSE; "-"; END %]</td>
2013-02-21 00:12:57 +00:00
[% IF j.get_column('nrtotal') > 0 %]
[% successrate = ( j.get_column('nrsucceeded') / j.get_column('nrtotal') )*100 %]
[% IF j.get_column('nrscheduled') > 0 %]
[% class = 'label' %]
[% ELSIF successrate < 25 %]
[% class = 'label label-important' %]
[% ELSIF successrate < 75 %]
[% class = 'label label-warning' %]
[% ELSIF successrate <= 100 %]
[% class = 'label label-success' %]
2013-01-22 13:41:02 +00:00
[% END %]
2013-02-21 00:12:57 +00:00
[% END %]
<td><span class="[% class %]">[% successrate FILTER format('%d') %]%</span></td>
<td>
[% IF j.get_column('nrsucceeded') > 0 %]
<span class="label label-success">[% j.get_column('nrsucceeded') %]</span>
2013-01-22 13:41:02 +00:00
[% END %]
2013-02-21 00:12:57 +00:00
[% IF j.get_column('nrfailed') > 0 %]
<span class="label label-important">[% j.get_column('nrfailed') %]</span>
2013-02-14 17:03:12 +00:00
[% END %]
2013-02-21 00:12:57 +00:00
[% IF j.get_column('nrscheduled') > 0 %]
<span class="label label">[% j.get_column('nrscheduled') %]</span>
[% END %]
</td>
</tr>
[% END %]
</tbody>
</table>
[% 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>
2013-02-21 00:12:57 +00:00
<div id="tabs-views" class="tab-pane">
[% IF views.size > 0 %]
<p>Project <tt>[% project.name %]</tt> has the following views:</p>
<ul>
[% FOREACH view IN views %]
<li>
<a href="[% c.uri_for('/view' project.name view.name) %]"><tt>[% view.name %]</tt></a>
</li>
[% END %]
</ul>
2013-02-14 17:03:12 +00:00
2013-02-21 00:12:57 +00:00
[% ELSE %]
2013-01-22 13:41:02 +00:00
2013-02-21 00:12:57 +00:00
<p>Project <tt>[% project.name %]</tt> has no views.</p>
2013-01-22 13:41:02 +00:00
2013-02-21 00:12:57 +00:00
[% END %]
2013-01-22 13:41:02 +00:00
2013-03-28 23:59:48 +00:00
<!--
2013-02-21 00:12:57 +00:00
<p>
<a class="btn" href="[% c.uri_for('/project' project.name 'create-view') %]"><i class="icon-plus"></i> Create a new view</a>
</p>
2013-03-28 23:59:48 +00:00
-->
2013-01-22 13:41:02 +00:00
2013-02-21 00:12:57 +00:00
</div>
2013-01-22 13:41:02 +00:00
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 %]