2013-02-20 14:54:33 +00:00
|
|
|
[% WRAPPER layout.tt title=(edit ? (create ? "New Project" : "Editing project $project.name") : "Project $project.name") %]
|
2008-11-17 23:59:20 +00:00
|
|
|
[% PROCESS common.tt %]
|
2013-02-20 13:29:35 +00:00
|
|
|
<ul class="nav nav-tabs">
|
2013-01-22 13:41:02 +00:00
|
|
|
[% IF !edit %]
|
2013-02-20 14:54:33 +00:00
|
|
|
<li class="active"><a href="#tabs-project" data-toggle="tab">Overview</a></li>
|
2013-01-22 13:41:02 +00:00
|
|
|
[% END %]
|
|
|
|
<li><a href="#tabs-settings" data-toggle="tab">Settings</a></li>
|
|
|
|
[% IF !edit %]
|
|
|
|
<li><a href="#tabs-views" data-toggle="tab">Views</a></li>
|
|
|
|
[% END %]
|
|
|
|
</ul>
|
2010-02-05 14:48:22 +00:00
|
|
|
|
2012-04-12 18:12:07 +00:00
|
|
|
<div class="tab-content">
|
|
|
|
|
2013-01-22 13:41:02 +00:00
|
|
|
[% IF !edit %]
|
|
|
|
<div id="tabs-project" class="tab-pane active">
|
|
|
|
[% IF project.jobsets.size > 0 %]
|
|
|
|
|
|
|
|
<p>This project has the following jobsets:</p>
|
|
|
|
|
|
|
|
<table class="tablesorter table table-striped table-condensed">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2010-03-18 15:59:24 +00:00
|
|
|
<th></th>
|
2013-01-22 13:41:02 +00:00
|
|
|
<th>Id</th>
|
|
|
|
<th>Description</th>
|
|
|
|
<th>Last evaluated</th>
|
2010-03-19 08:36:31 +00:00
|
|
|
<th colspan="2">Success</th>
|
2013-01-22 13:41:02 +00:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
[% FOREACH j IN jobsets %]
|
2011-11-16 18:29:40 +00:00
|
|
|
[% successrate = 0 %]
|
2013-01-22 13:41:02 +00:00
|
|
|
<tr class="clickable [% IF odd %] odd [% END; odd = !odd %]"
|
|
|
|
onclick="window.location = '[% c.uri_for('/jobset' project.name j.name) %]'">
|
2010-03-18 15:59:24 +00:00
|
|
|
<td>
|
|
|
|
[% IF j.get_column('nrscheduled') > 0 %]
|
2011-11-16 18:29:40 +00:00
|
|
|
<img src="/static/images/help_16.png" alt="Scheduled" />
|
2010-03-18 15:59:24 +00:00
|
|
|
[% ELSIF j.get_column('nrfailed') == 0 %]
|
2011-11-16 18:29:40 +00:00
|
|
|
<img src="/static/images/checkmark_16.png" alt="Succeeded" />
|
2010-03-18 15:59:24 +00:00
|
|
|
[% ELSIF j.get_column('nrfailed') > 0 && j.get_column('nrsucceeded') > 0 %]
|
2011-11-16 18:29:40 +00:00
|
|
|
<img src="/static/images/error_some_16.png" alt="Some Failed" />
|
2010-03-18 15:59:24 +00:00
|
|
|
[% ELSE %]
|
2011-11-16 18:29:40 +00:00
|
|
|
<img src="/static/images/error_16.png" alt="All Failed" />
|
2010-03-18 15:59:24 +00:00
|
|
|
[% END %]
|
|
|
|
</td>
|
2013-01-22 13:41:02 +00:00
|
|
|
<td>[% INCLUDE renderJobsetName project = project.name jobset = j.name %]</td>
|
|
|
|
<td>[% HTML.escape(j.description) %]</td>
|
2010-03-18 15:59:24 +00:00
|
|
|
<td>[% INCLUDE renderDateTime timestamp = j.lastcheckedtime %]</td>
|
2010-03-19 08:36:31 +00:00
|
|
|
[% IF j.get_column('nrtotal') > 0 %]
|
|
|
|
[% successrate = ( j.get_column('nrsucceeded') / j.get_column('nrtotal') )*100 %]
|
|
|
|
[% IF j.get_column('nrscheduled') > 0 %]
|
2012-04-12 18:12:07 +00:00
|
|
|
[% class = 'label' %]
|
2010-03-19 08:36:31 +00:00
|
|
|
[% ELSIF successrate < 25 %]
|
2012-04-12 18:12:07 +00:00
|
|
|
[% class = 'label label-important' %]
|
2010-03-19 08:36:31 +00:00
|
|
|
[% ELSIF successrate < 75 %]
|
2012-04-12 18:12:07 +00:00
|
|
|
[% class = 'label label-warning' %]
|
2010-03-29 07:12:52 +00:00
|
|
|
[% ELSIF successrate <= 100 %]
|
2012-04-12 18:12:07 +00:00
|
|
|
[% class = 'label label-success' %]
|
2010-03-19 08:36:31 +00:00
|
|
|
[% END %]
|
|
|
|
[% END %]
|
2012-04-12 18:12:07 +00:00
|
|
|
<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>
|
|
|
|
[% END %]
|
|
|
|
[% IF j.get_column('nrfailed') > 0 %]
|
|
|
|
<span class="label label-important">[% j.get_column('nrfailed') %]</span>
|
|
|
|
[% END %]
|
2010-03-19 08:36:31 +00:00
|
|
|
[% IF j.get_column('nrscheduled') > 0 %]
|
2012-04-12 18:12:07 +00:00
|
|
|
<span class="label label">[% j.get_column('nrscheduled') %]</span>
|
2010-03-19 08:36:31 +00:00
|
|
|
[% END %]
|
|
|
|
</td>
|
2013-01-22 13:41:02 +00:00
|
|
|
</tr>
|
|
|
|
[% END %]
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
[% ELSE %]
|
|
|
|
|
|
|
|
<p>No jobsets have been defined yet.</p>
|
|
|
|
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
[% END %]
|
|
|
|
<div id="tabs-settings" class="tab-pane [% IF edit %]active[% END %]">
|
|
|
|
[% IF edit %]
|
|
|
|
<form action="[% IF create %][% c.uri_for('/create-project/submit') %][% ELSE %][% c.uri_for('/project' project.name 'submit') %][% END %]" method="post">
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
<table class="layoutTable">
|
|
|
|
[% IF edit %]
|
|
|
|
<tr>
|
|
|
|
<th>Identifier:</th>
|
|
|
|
<td><tt>[% INCLUDE maybeEditString param="name" value=project.name %]</tt></td>
|
|
|
|
</tr>
|
|
|
|
[% END %]
|
|
|
|
<tr>
|
|
|
|
<th>Display name:</th>
|
|
|
|
<td>[% INCLUDE maybeEditString param="displayname" value=project.displayname %]</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>Description:</th>
|
|
|
|
<td>[% INCLUDE maybeEditString param="description" value=project.description %]</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>Homepage:</th>
|
|
|
|
<td>
|
|
|
|
[% IF edit %]
|
|
|
|
[% INCLUDE maybeEditString param="homepage" value=project.homepage %]
|
|
|
|
[% ELSE %]
|
|
|
|
[% IF project.homepage %]
|
|
|
|
<a [% HTML.attributes(href => project.homepage) %]>[% HTML.escape(project.homepage) %]</a>
|
|
|
|
[% ELSE %]
|
|
|
|
<em>(not specified)</em>
|
|
|
|
[% END %]
|
|
|
|
[% END %]
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>Owner:</th>
|
|
|
|
<td><tt>[% INCLUDE maybeEditString param="owner" value=(project.owner.username || c.user.username) edit=(edit && c.check_user_roles('admin')) %]</tt></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>Enabled:</th>
|
|
|
|
<td>
|
|
|
|
[% INCLUDE renderSelection param="enabled" curValue=project.enabled radiobuttons=1 options={"1" = "Yes", "0" = "No"} %]
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
[% IF edit %]
|
|
|
|
|
2013-02-20 14:54:33 +00:00
|
|
|
<div class="form-actions">
|
2012-04-17 14:53:11 +00:00
|
|
|
<button type="submit" class="btn btn-primary">
|
|
|
|
<i class="icon-ok icon-white"></i>
|
|
|
|
[%IF create %]Create[% ELSE %]Apply changes[% END %]
|
|
|
|
</button>
|
|
|
|
[% IF !create %]
|
2013-01-22 13:41:02 +00:00
|
|
|
<button id="delete-project" type="submit" class="btn btn-danger" name="submit" value="delete">
|
2012-04-17 14:53:11 +00:00
|
|
|
<i class="icon-trash icon-white"></i>
|
|
|
|
Delete this project
|
|
|
|
</button>
|
2013-01-22 13:41:02 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
$("#delete-project").click(function() {
|
|
|
|
return confirm("Are you sure you want to delete this project?");
|
|
|
|
});
|
|
|
|
</script>
|
2012-04-17 14:53:11 +00:00
|
|
|
[% END %]
|
2013-02-20 14:54:33 +00:00
|
|
|
</div>
|
2013-01-22 13:41:02 +00:00
|
|
|
|
2012-04-17 14:53:11 +00:00
|
|
|
</form>
|
2013-01-22 13:41:02 +00:00
|
|
|
|
2013-02-14 17:03:12 +00:00
|
|
|
[% END %]
|
|
|
|
|
2013-01-22 13:41:02 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
[% IF !edit %]
|
|
|
|
<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>
|
2012-04-17 14:53:11 +00:00
|
|
|
<a class="btn btn-mini" href="[% c.uri_for('/view' project.name view.name "edit") %]">Edit</a>
|
2013-01-22 13:41:02 +00:00
|
|
|
</li>
|
|
|
|
[% END %]
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
[% ELSE %]
|
|
|
|
|
|
|
|
<p>Project <tt>[% project.name %]</tt> has no views.</p>
|
|
|
|
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
<p><a class="btn" href="[% c.uri_for('/project' project.name 'create-view') %]">
|
2012-04-17 14:53:11 +00:00
|
|
|
<i class="icon-plus"></i> Create a new view
|
|
|
|
</a></p>
|
2013-01-22 13:41:02 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
[% END %]
|
2010-02-05 14:48:22 +00:00
|
|
|
</div>
|
|
|
|
|
2008-11-10 13:33:12 +00:00
|
|
|
[% END %]
|