2012-04-12 18:12:07 +00:00
|
|
|
[% BLOCK menuItem %]
|
|
|
|
<li class="[% IF "${root}${curUri}" == uri %]active[% END %]">
|
2010-01-07 14:25:12 +00:00
|
|
|
<a href="[% uri %]">[% title %]</a>
|
|
|
|
</li>
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
[% BLOCK makeSubMenu %]
|
2012-04-12 18:12:07 +00:00
|
|
|
<li class="dropdown">
|
2013-02-20 23:47:21 +00:00
|
|
|
<a class="dropdown-toggle" href="#" data-toggle="dropdown">[% title %]<b class="caret"></b></a>
|
|
|
|
<ul id="left-menu" class="dropdown-menu">
|
|
|
|
[% content %]
|
|
|
|
</ul>
|
2010-01-07 14:25:12 +00:00
|
|
|
</li>
|
|
|
|
[% END %]
|
|
|
|
|
2012-04-12 18:12:07 +00:00
|
|
|
[% BLOCK makeLinkWrapped %]
|
|
|
|
<li [% IF curUri == uri %]class="active"[% END %]>
|
|
|
|
<a href="[% uri %]">[% title %]</a>
|
|
|
|
[% content %]
|
|
|
|
</li>
|
|
|
|
[% END %]
|
|
|
|
|
2013-02-14 15:51:42 +00:00
|
|
|
[% BLOCK makeLink %]
|
|
|
|
[% INCLUDE makeLinkWrapped content="" %]
|
2012-04-12 18:12:07 +00:00
|
|
|
[% END %]
|
|
|
|
|
2013-02-22 14:45:10 +00:00
|
|
|
<ul class="nav pull-left" id="top-menu">
|
2013-02-20 15:24:54 +00:00
|
|
|
|
|
|
|
[% WRAPPER makeSubMenu title="Status" %]
|
|
|
|
[% INCLUDE makeLink
|
|
|
|
uri = c.uri_for(c.controller('Root').action_for('queue'))
|
|
|
|
title = "Queue ("_ nrRunningBuilds _"/"_ nrQueuedBuilds _")" %]
|
|
|
|
[% INCLUDE makeLink
|
2013-02-20 15:40:09 +00:00
|
|
|
uri = c.uri_for(c.controller('Root').action_for('status'))
|
2013-02-20 15:24:54 +00:00
|
|
|
title = "Active build steps" %]
|
|
|
|
[% INCLUDE makeLink
|
2013-02-20 15:40:09 +00:00
|
|
|
uri = c.uri_for(c.controller('Root').action_for('machines'))
|
2013-02-20 15:24:54 +00:00
|
|
|
title = "Machine status" %]
|
2013-02-21 16:27:17 +00:00
|
|
|
[% INCLUDE makeLink
|
|
|
|
uri = c.uri_for(c.controller('Root').action_for('evals'))
|
|
|
|
title = "Latest evaluations" %]
|
2013-02-20 15:24:54 +00:00
|
|
|
[% INCLUDE makeLink
|
|
|
|
uri = c.uri_for(c.controller('Root').action_for('all'))
|
2013-02-20 17:23:49 +00:00
|
|
|
title = "Latest builds" %]
|
2013-02-20 15:24:54 +00:00
|
|
|
[% END %]
|
2012-04-12 18:12:07 +00:00
|
|
|
|
|
|
|
[% IF project %]
|
2013-02-20 15:24:54 +00:00
|
|
|
[% WRAPPER makeSubMenu title=("Project: " _ project.name) %]
|
2012-04-12 18:12:07 +00:00
|
|
|
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('view'), [project.name]) title = "Overview" %]
|
2013-02-20 17:23:49 +00:00
|
|
|
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('all'), [project.name]) title = "Latest builds" %]
|
2012-04-12 18:12:07 +00:00
|
|
|
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('jobstatus'), [project.name]) title = "Job status" %]
|
|
|
|
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('errors'), [project.name]) title = "Errors" %]
|
2012-04-13 09:26:37 +00:00
|
|
|
<li class="divider"></li>
|
2013-02-20 17:20:16 +00:00
|
|
|
[% INCLUDE menuItem uri = c.uri_for('/project' project.name 'channel' 'latest') title = "Channel" %]
|
2012-05-18 08:09:53 +00:00
|
|
|
[% IF c.user_exists %]
|
2013-02-20 15:14:30 +00:00
|
|
|
<li class="divider"></li>
|
2013-02-21 00:26:29 +00:00
|
|
|
[% INCLUDE menuItem uri = c.uri_for('/project' project.name 'edit') title="Edit" %]
|
|
|
|
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('create_jobset'), [project.name]) title = "Create jobset" %]
|
2012-04-12 18:12:07 +00:00
|
|
|
[% END %]
|
|
|
|
[% END %]
|
|
|
|
[% END %]
|
2013-01-22 13:41:02 +00:00
|
|
|
|
2012-04-12 18:12:07 +00:00
|
|
|
[% IF jobset %]
|
2013-02-20 15:24:54 +00:00
|
|
|
[% WRAPPER makeSubMenu title=("Jobset: " _ jobset.name) %]
|
2012-04-12 18:12:07 +00:00
|
|
|
[% INCLUDE makeLink
|
|
|
|
uri = c.uri_for(c.controller('Jobset').action_for('index'), [project.name, jobset.name])
|
|
|
|
title = "Overview" %]
|
|
|
|
[% INCLUDE makeLink
|
|
|
|
uri = c.uri_for(c.controller('Jobset').action_for('evals'), [project.name, jobset.name])
|
|
|
|
title = "Evaluations" %]
|
|
|
|
[% INCLUDE makeLink
|
|
|
|
uri = c.uri_for(c.controller('Jobset').action_for('all'), [project.name, jobset.name])
|
2013-02-20 17:23:49 +00:00
|
|
|
title = "Latest builds" %]
|
2012-04-12 18:12:07 +00:00
|
|
|
[% INCLUDE makeLink
|
|
|
|
uri = c.uri_for(c.controller('Jobset').action_for('jobstatus'), [project.name, jobset.name])
|
|
|
|
title = "Job status" %]
|
|
|
|
[% INCLUDE makeLink
|
|
|
|
uri = c.uri_for(c.controller('Jobset').action_for('errors'), [project.name, jobset.name])
|
|
|
|
title = "Errors" %]
|
2012-04-13 09:26:37 +00:00
|
|
|
<li class="divider"></li>
|
2013-02-20 17:20:16 +00:00
|
|
|
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'channel' 'latest') title = "Channel" %]
|
2012-04-17 07:49:27 +00:00
|
|
|
[% IF c.user_exists %]
|
2013-02-20 15:14:30 +00:00
|
|
|
<li class="divider"></li>
|
2013-02-21 00:26:29 +00:00
|
|
|
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'edit') title="Edit" %]
|
2013-02-20 23:47:21 +00:00
|
|
|
|
|
|
|
<form id="delete-jobset" method="post" action="[% c.uri_for('/jobset' project.name jobset.name 'delete') %]" class="hidden"></form>
|
|
|
|
<script>
|
|
|
|
function confirmDeleteJobset() {
|
|
|
|
bootbox.confirm(
|
|
|
|
'Are you sure you want to delete this jobset?',
|
|
|
|
function(del) { if (del) $('#delete-jobset').submit(); });
|
|
|
|
return;
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
[% INCLUDE menuItem title="Delete" uri = "javascript:confirmDeleteJobset()" %]
|
|
|
|
|
|
|
|
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'clone') title="Clone" %]
|
|
|
|
[% INCLUDE maybeLink uri = c.uri_for(c.controller('Admin').action_for('force_eval'), project.name, jobset.name)
|
|
|
|
content = "Evaluate" confirmmsg = ("Are you sure you want to force evaluation of jobset " _ project.name _ ":" _ jobset.name _ "?") class = "" %]
|
2012-04-12 18:12:07 +00:00
|
|
|
[% END %]
|
|
|
|
[% END %]
|
|
|
|
[% END %]
|
2013-01-22 13:41:02 +00:00
|
|
|
|
2012-04-12 18:12:07 +00:00
|
|
|
[% IF job %]
|
|
|
|
[% WRAPPER makeSubMenu title=("Job: " _ job.name) %]
|
|
|
|
[% INCLUDE makeLink
|
|
|
|
uri = c.uri_for(c.controller('Job').action_for('overview'), [project.name, jobset.name, job.name])
|
|
|
|
title = "Overview" %]
|
|
|
|
[% INCLUDE makeLink
|
|
|
|
uri = c.uri_for(c.controller('Job').action_for('all'), [project.name, jobset.name, job.name])
|
2013-02-20 17:23:49 +00:00
|
|
|
title = "Latest builds" %]
|
2012-04-12 18:12:07 +00:00
|
|
|
[% INCLUDE makeLink
|
|
|
|
uri = c.uri_for(c.controller('Job').action_for('jobstatus'), [project.name, jobset.name, job.name])
|
|
|
|
title = "Job status" %]
|
|
|
|
[% INCLUDE makeLink
|
|
|
|
uri = c.uri_for(c.controller('Job').action_for('errors'), [project.name, jobset.name, job.name])
|
|
|
|
title = "Errors" %]
|
2013-02-22 11:00:32 +00:00
|
|
|
<li class="divider"></li>
|
|
|
|
[% INCLUDE menuItem uri = c.uri_for('/job' project.name jobset.name job.name 'channel' 'latest') title = "Channel" %]
|
2012-04-12 18:12:07 +00:00
|
|
|
[% END %]
|
|
|
|
[% END %]
|
|
|
|
|
2013-02-20 15:14:30 +00:00
|
|
|
[% IF build %]
|
2012-04-12 19:03:59 +00:00
|
|
|
[% WRAPPER makeSubMenu title=("Build: " _ build.id) %]
|
|
|
|
[% INCLUDE makeLink
|
2013-02-20 14:54:33 +00:00
|
|
|
uri = c.uri_for('/build' build.id)
|
|
|
|
title = "Overview" %]
|
2012-04-13 08:19:15 +00:00
|
|
|
[% IF c.user_exists %]
|
2013-02-20 15:14:30 +00:00
|
|
|
<li class="divider"></li>
|
|
|
|
[% INCLUDE makeLink
|
|
|
|
uri = c.uri_for('/build' build.id 'clone')
|
|
|
|
title = "Clone build" %]
|
|
|
|
[% IF available %]
|
|
|
|
[% IF build.keep %]
|
|
|
|
[% INCLUDE makeLink
|
|
|
|
uri = c.uri_for('/build' build.id 'keep' 0)
|
|
|
|
title = "Unkeep build" %]
|
2012-04-13 08:19:15 +00:00
|
|
|
[% ELSE %]
|
2013-02-20 15:14:30 +00:00
|
|
|
[% INCLUDE makeLink
|
|
|
|
uri = c.uri_for('/build' build.id 'keep' 1)
|
|
|
|
title = "Keep build" %]
|
2012-04-13 08:19:15 +00:00
|
|
|
[% END %]
|
2013-02-20 15:14:30 +00:00
|
|
|
[% END %]
|
|
|
|
[% IF build.finished %]
|
2012-04-12 19:50:06 +00:00
|
|
|
[% INCLUDE makeLink
|
2012-04-13 08:19:15 +00:00
|
|
|
uri = c.uri_for('/build' build.id 'restart')
|
|
|
|
title = "Restart build" %]
|
2013-02-20 15:14:30 +00:00
|
|
|
[% END %]
|
|
|
|
[% IF !build.finished %]
|
2012-04-17 09:39:08 +00:00
|
|
|
[% INCLUDE makeLink
|
|
|
|
uri = c.uri_for('/build' build.id 'cancel')
|
|
|
|
title = "Cancel build" %]
|
2013-02-20 15:14:30 +00:00
|
|
|
[% END %]
|
2012-04-12 19:50:06 +00:00
|
|
|
[% END %]
|
2012-04-12 19:03:59 +00:00
|
|
|
[% END %]
|
2013-02-20 15:14:30 +00:00
|
|
|
[% END %]
|
2013-01-22 13:41:02 +00:00
|
|
|
|
2013-02-20 15:14:30 +00:00
|
|
|
[% IF c.user_exists && c.check_user_roles('admin') %]
|
2012-04-12 18:12:07 +00:00
|
|
|
[% WRAPPER makeSubMenu title="Admin" %]
|
2013-02-21 00:26:29 +00:00
|
|
|
[% IF c.check_user_roles('admin') %]
|
|
|
|
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('create')) title = "Create project" %]
|
|
|
|
<li class="divider"></li>
|
|
|
|
[% END %]
|
2012-04-12 18:12:07 +00:00
|
|
|
[% INCLUDE makeLink
|
|
|
|
uri = c.uri_for(c.controller('Admin').action_for('machines'))
|
|
|
|
title = "Manage machines" %]
|
|
|
|
[% INCLUDE makeLink
|
|
|
|
uri = c.uri_for(c.controller('Admin').action_for('managenews'))
|
|
|
|
title = "Manage news" %]
|
|
|
|
[% INCLUDE makeLink
|
|
|
|
uri = c.uri_for(c.controller('Admin').action_for('users'))
|
|
|
|
title = "Manage users" %]
|
|
|
|
<li class="divider"></li>
|
2013-01-22 13:41:02 +00:00
|
|
|
[% INCLUDE maybeLink
|
|
|
|
uri = c.uri_for(c.controller('Admin').action_for('clearfailedcache'))
|
|
|
|
content = "Clear failed builds cache"
|
2012-04-17 14:53:11 +00:00
|
|
|
confirmmsg = "Are you sure you want to clear the failed builds cache?"
|
|
|
|
class = "" %]
|
2013-01-22 13:41:02 +00:00
|
|
|
[% INCLUDE maybeLink
|
2012-04-12 18:12:07 +00:00
|
|
|
uri = c.uri_for(c.controller('Admin').action_for('clear_queue_non_current'))
|
2013-02-20 14:54:33 +00:00
|
|
|
content = "Clear all non-running old builds from queue"
|
2012-04-17 14:53:11 +00:00
|
|
|
confirmmsg = "Are you sure you want to clear the queue?"
|
2013-02-20 15:14:30 +00:00
|
|
|
class = "" %]
|
2012-04-12 18:12:07 +00:00
|
|
|
[% END %]
|
|
|
|
[% END %]
|
|
|
|
|
2013-02-20 15:14:30 +00:00
|
|
|
</ul>
|
2013-02-22 14:45:10 +00:00
|
|
|
|
|
|
|
<div class="pull-right">
|
|
|
|
|
|
|
|
<form class="navbar-search" action="[% c.uri_for('/search') %]">
|
|
|
|
<input name="query" type="text" class="search-query span2" placeholder="Search"></input>
|
|
|
|
</form>
|
|
|
|
|
|
|
|
<ul class="nav" id="top-menu">
|
|
|
|
|
|
|
|
[% IF c.user_exists %]
|
|
|
|
[% INCLUDE makeLink uri = c.uri_for(c.controller('Root').action_for('logout')) title = "Sign out" %]
|
|
|
|
[% ELSE %]
|
|
|
|
[% INCLUDE makeLink uri = c.uri_for(c.controller('Root').action_for('login')) title = "Sign in" %]
|
|
|
|
[% END %]
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
</div>
|