2010-01-07 14:25:12 +00:00
|
|
|
[% BLOCK makeSubMenu %]
|
2016-04-28 17:13:02 +02:00
|
|
|
<li class="dropdown" [% IF id; HTML.attributes(id => id); END %] >
|
2013-02-21 00:47:21 +01:00
|
|
|
<a class="dropdown-toggle" href="#" data-toggle="dropdown">[% title %]<b class="caret"></b></a>
|
2013-09-03 17:35:21 +02:00
|
|
|
<ul class="dropdown-menu">
|
2013-02-21 00:47:21 +01:00
|
|
|
[% content %]
|
|
|
|
</ul>
|
2010-01-07 14:25:12 +00:00
|
|
|
</li>
|
|
|
|
[% END %]
|
2014-01-10 11:04:28 +01:00
|
|
|
[% showPrivate = (isPrivateHydra && c.user_exists) || ! isPrivateHydra %]
|
2010-01-07 14:25:12 +00:00
|
|
|
|
2014-01-10 11:04:28 +01:00
|
|
|
[% IF showPrivate %]
|
2013-09-03 17:35:21 +02:00
|
|
|
<ul class="nav pull-left">
|
2013-02-20 16:24:54 +01:00
|
|
|
|
2013-10-14 20:07:26 +02:00
|
|
|
[% IF c.user_exists %]
|
|
|
|
[% INCLUDE menuItem uri = c.uri_for(c.controller('User').action_for('dashboard'), [c.user.username]) title = "Dashboard" %]
|
|
|
|
[% END %]
|
2013-02-20 16:24:54 +01:00
|
|
|
|
|
|
|
[% WRAPPER makeSubMenu title="Status" %]
|
2013-04-26 13:45:47 +02:00
|
|
|
[% INCLUDE menuItem
|
2016-03-08 19:44:51 +01:00
|
|
|
uri = c.uri_for(c.controller('Root').action_for('queue_summary'))
|
2013-02-20 16:24:54 +01:00
|
|
|
title = "Queue ("_ nrRunningBuilds _"/"_ nrQueuedBuilds _")" %]
|
2013-04-26 13:45:47 +02:00
|
|
|
[% INCLUDE menuItem
|
2013-02-20 16:40:09 +01:00
|
|
|
uri = c.uri_for(c.controller('Root').action_for('status'))
|
2014-09-25 20:17:33 +02:00
|
|
|
title = "Running builds" %]
|
2013-04-26 13:45:47 +02:00
|
|
|
[% INCLUDE menuItem
|
2013-02-20 16:40:09 +01:00
|
|
|
uri = c.uri_for(c.controller('Root').action_for('machines'))
|
2013-02-20 16:24:54 +01:00
|
|
|
title = "Machine status" %]
|
2013-04-26 13:45:47 +02:00
|
|
|
[% INCLUDE menuItem
|
2013-02-21 17:27:17 +01:00
|
|
|
uri = c.uri_for(c.controller('Root').action_for('evals'))
|
|
|
|
title = "Latest evaluations" %]
|
2013-04-26 13:45:47 +02:00
|
|
|
[% INCLUDE menuItem
|
2013-02-20 16:24:54 +01:00
|
|
|
uri = c.uri_for(c.controller('Root').action_for('all'))
|
2013-02-20 18:23:49 +01:00
|
|
|
title = "Latest builds" %]
|
2015-07-10 15:08:34 +02:00
|
|
|
[% INCLUDE menuItem
|
|
|
|
uri = c.uri_for(c.controller('Root').action_for('steps'))
|
|
|
|
title = "Latest steps" %]
|
2013-02-20 16:24:54 +01:00
|
|
|
[% END %]
|
2012-04-12 20:12:07 +02:00
|
|
|
|
|
|
|
[% IF project %]
|
2013-04-26 15:07:14 +02:00
|
|
|
[% WRAPPER makeSubMenu title="Project" %]
|
|
|
|
<li class="nav-header">[% HTML.escape(project.name) %]</li>
|
|
|
|
<li class="divider"></li>
|
2013-06-17 12:34:21 -04:00
|
|
|
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('project'), [project.name]) title = "Overview" %]
|
2013-02-20 18:23:49 +01:00
|
|
|
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('all'), [project.name]) title = "Latest builds" %]
|
2013-02-20 18:20:16 +01:00
|
|
|
[% INCLUDE menuItem uri = c.uri_for('/project' project.name 'channel' 'latest') title = "Channel" %]
|
2012-04-12 20:12:07 +02:00
|
|
|
[% END %]
|
|
|
|
[% END %]
|
2013-01-22 14:41:02 +01:00
|
|
|
|
2012-04-12 20:12:07 +02:00
|
|
|
[% IF jobset %]
|
2013-04-26 15:07:14 +02:00
|
|
|
[% WRAPPER makeSubMenu title="Jobset" %]
|
|
|
|
<li class="nav-header">[% HTML.escape(jobset.name) %]</li>
|
|
|
|
<li class="divider"></li>
|
2013-04-26 13:45:47 +02:00
|
|
|
[% INCLUDE menuItem
|
2013-06-17 12:34:21 -04:00
|
|
|
uri = c.uri_for(c.controller('Jobset').action_for('jobset'), [project.name, jobset.name])
|
2012-04-12 20:12:07 +02:00
|
|
|
title = "Overview" %]
|
2013-04-26 13:45:47 +02:00
|
|
|
[% INCLUDE menuItem
|
2012-04-12 20:12:07 +02:00
|
|
|
uri = c.uri_for(c.controller('Jobset').action_for('evals'), [project.name, jobset.name])
|
|
|
|
title = "Evaluations" %]
|
2013-04-26 13:45:47 +02:00
|
|
|
[% INCLUDE menuItem
|
2012-04-12 20:12:07 +02:00
|
|
|
uri = c.uri_for(c.controller('Jobset').action_for('all'), [project.name, jobset.name])
|
2013-02-20 18:23:49 +01:00
|
|
|
title = "Latest builds" %]
|
2013-02-20 18:20:16 +01:00
|
|
|
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'channel' 'latest') title = "Channel" %]
|
2012-04-12 20:12:07 +02:00
|
|
|
[% END %]
|
|
|
|
[% END %]
|
2013-01-22 14:41:02 +01:00
|
|
|
|
2012-04-12 20:12:07 +02:00
|
|
|
[% IF job %]
|
2013-04-26 15:07:14 +02:00
|
|
|
[% WRAPPER makeSubMenu title="Job" %]
|
2020-05-27 20:09:36 +02:00
|
|
|
<li class="nav-header">[% HTML.escape(job) %]</li>
|
2013-04-26 15:07:14 +02:00
|
|
|
<li class="divider"></li>
|
2013-04-26 13:45:47 +02:00
|
|
|
[% INCLUDE menuItem
|
2020-05-27 20:09:36 +02:00
|
|
|
uri = c.uri_for(c.controller('Job').action_for('overview'), [project.name, jobset.name, job])
|
2012-04-12 20:12:07 +02:00
|
|
|
title = "Overview" %]
|
2013-04-26 13:45:47 +02:00
|
|
|
[% INCLUDE menuItem
|
2020-05-27 20:09:36 +02:00
|
|
|
uri = c.uri_for(c.controller('Job').action_for('all'), [project.name, jobset.name, job])
|
2013-02-20 18:23:49 +01:00
|
|
|
title = "Latest builds" %]
|
2020-05-27 20:09:36 +02:00
|
|
|
[% INCLUDE menuItem uri = c.uri_for('/job' project.name jobset.name job 'channel' 'latest') title = "Channel" %]
|
2012-04-12 20:12:07 +02:00
|
|
|
[% END %]
|
|
|
|
[% END %]
|
|
|
|
|
2013-10-31 10:03:54 +01:00
|
|
|
[% IF c.user_exists && (c.check_user_roles('admin') ||
|
|
|
|
c.check_user_roles('create-projects')) %]
|
2012-04-12 20:12:07 +02:00
|
|
|
[% WRAPPER makeSubMenu title="Admin" %]
|
2013-10-31 10:03:54 +01:00
|
|
|
[% IF c.check_user_roles('admin') || c.check_user_roles('create-projects') %]
|
2013-02-21 01:26:29 +01:00
|
|
|
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('create')) title = "Create project" %]
|
|
|
|
<li class="divider"></li>
|
|
|
|
[% END %]
|
2013-10-31 10:03:54 +01:00
|
|
|
[% IF c.check_user_roles('admin') %]
|
2013-04-26 13:45:47 +02:00
|
|
|
[% INCLUDE menuItem
|
2012-04-12 20:12:07 +02:00
|
|
|
uri = c.uri_for(c.controller('Admin').action_for('machines'))
|
|
|
|
title = "Manage machines" %]
|
2013-04-26 13:45:47 +02:00
|
|
|
[% INCLUDE menuItem
|
2012-04-12 20:12:07 +02:00
|
|
|
uri = c.uri_for(c.controller('Admin').action_for('managenews'))
|
|
|
|
title = "Manage news" %]
|
2013-04-26 13:45:47 +02:00
|
|
|
[% INCLUDE menuItem
|
2012-04-12 20:12:07 +02:00
|
|
|
uri = c.uri_for(c.controller('Admin').action_for('users'))
|
|
|
|
title = "Manage users" %]
|
|
|
|
<li class="divider"></li>
|
2015-11-02 14:22:25 +01:00
|
|
|
[% INCLUDE menuItem
|
|
|
|
uri = c.uri_for(c.controller('Admin').action_for('clear_queue_non_current'))
|
|
|
|
title = "Cancel queued non-current builds"
|
|
|
|
confirmmsg = "Are you sure you want to cancel all non-current builds?"
|
|
|
|
class = "" %]
|
2013-04-26 14:45:20 +02:00
|
|
|
[% INCLUDE menuItem
|
2013-01-22 14:41:02 +01:00
|
|
|
uri = c.uri_for(c.controller('Admin').action_for('clearfailedcache'))
|
2013-04-26 14:45:20 +02:00
|
|
|
title = "Clear failed builds cache"
|
2012-04-17 16:53:11 +02:00
|
|
|
confirmmsg = "Are you sure you want to clear the failed builds cache?"
|
|
|
|
class = "" %]
|
2013-10-03 19:43:21 +02:00
|
|
|
[% INCLUDE menuItem
|
|
|
|
uri = c.uri_for(c.controller('Admin').action_for('clearvcscache'))
|
|
|
|
title = "Clear VCS caches"
|
|
|
|
confirmmsg = "Are you sure you want to clear the VCS cache?"
|
|
|
|
class = "" %]
|
2013-10-31 10:03:54 +01:00
|
|
|
[% END %]
|
2012-04-12 20:12:07 +02:00
|
|
|
[% END %]
|
|
|
|
[% END %]
|
|
|
|
|
2013-02-20 16:14:30 +01:00
|
|
|
</ul>
|
2014-01-10 11:04:28 +01:00
|
|
|
[% END %]
|
2013-02-22 15:45:10 +01:00
|
|
|
|
2013-09-03 17:35:21 +02:00
|
|
|
<ul class="nav pull-right">
|
2013-02-22 15:45:10 +01:00
|
|
|
|
2014-01-10 11:04:28 +01:00
|
|
|
[% IF showPrivate %]
|
|
|
|
<form class="navbar-search" action="[% c.uri_for('/search') %]">
|
|
|
|
<input name="query" type="text" class="search-query span2" placeholder="Search" [% HTML.attributes(value => c.req.params.query) %]/>
|
|
|
|
</form>
|
|
|
|
[% END %]
|
2013-05-09 14:36:51 +02:00
|
|
|
[% IF c.user_exists %]
|
|
|
|
[% INCLUDE menuItem uri = c.uri_for(c.controller('User').action_for('edit'), [c.user.username]) title = "Preferences" %]
|
2013-07-08 23:54:40 +02:00
|
|
|
<li>
|
2016-01-13 17:32:52 +01:00
|
|
|
<a href="#" onclick="signOut();">Sign out</a>
|
2013-07-08 23:54:40 +02:00
|
|
|
</li>
|
2013-05-09 14:36:51 +02:00
|
|
|
[% ELSE %]
|
2016-04-28 17:13:02 +02:00
|
|
|
[% WRAPPER makeSubMenu title="Sign in" id="sign-in-menu" %]
|
2016-01-13 17:32:52 +01:00
|
|
|
[% IF c.config.enable_google_login %]
|
2016-04-28 17:13:02 +02:00
|
|
|
<div style="display: none" class="g-signin2" data-onsuccess="onGoogleSignIn" data-theme="dark"></div></a>
|
|
|
|
<li><a href="#" id="google-signin">Sign in with Google</a></li>
|
2016-01-13 17:32:52 +01:00
|
|
|
<li class="divider"></li>
|
|
|
|
[% END %]
|
2013-07-09 14:39:28 +02:00
|
|
|
<li>
|
2016-01-13 17:32:52 +01:00
|
|
|
<a href="#hydra-signin" data-toggle="modal">Sign in with a Hydra account</a>
|
2013-07-09 14:39:28 +02:00
|
|
|
</li>
|
|
|
|
[% END %]
|
2013-05-09 14:36:51 +02:00
|
|
|
[% END %]
|
2013-02-22 15:45:10 +01:00
|
|
|
|
2013-05-09 14:36:51 +02:00
|
|
|
</ul>
|