forked from lix-project/hydra
Move more actions from the top bar
This commit is contained in:
parent
a5cfae078e
commit
4fa2821eea
|
@ -100,6 +100,7 @@
|
|||
[% END %]
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="active"><a href="#tabs-summary" data-toggle="tab">Summary</a></li>
|
||||
[% IF isAggregate %]<li><a href="#tabs-constituents" data-toggle="tab">Constituents</a></li>[% END %]
|
||||
<li><a href="#tabs-details" data-toggle="tab">Details</a></li>
|
||||
|
@ -607,7 +608,7 @@
|
|||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<a href="#" class="btn btn-primary clode" data-dismiss="modal">Close</a>
|
||||
<a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -42,6 +42,20 @@
|
|||
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
[% 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">
|
||||
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'edit') title="Edit configuration" %]
|
||||
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'clone') title="Clone this jobset" %]
|
||||
[% INCLUDE menuItem uri = "javascript:confirmEvaluateJobset()" title="Evaluate this jobset" %]
|
||||
</ul>
|
||||
</li>
|
||||
[% END %]
|
||||
|
||||
<li class="active"><a href="#tabs-evaluations" data-toggle="tab">Evaluations</a></li>
|
||||
[% IF jobset.errormsg || jobset.fetcherrormsg %]
|
||||
<li><a href="#tabs-errors" data-toggle="tab"><span class="text-warning">Evaluation errors</span></a></li>
|
||||
|
@ -147,4 +161,23 @@
|
|||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function confirmEvaluateJobset() {
|
||||
bootbox.confirm(
|
||||
'Are you sure you want to force evaluation of this jobset?',
|
||||
function(c) {
|
||||
if (!c) return;
|
||||
$.post("[% HTML.escape(c.uri_for('/api/push', { jobsets = project.name _ ':' _ jobset.name, force = "1" })) %]")
|
||||
.done(function(data) {
|
||||
if (data.error)
|
||||
bootbox.alert("Unable to schedule the jobset for evaluation: " + data.error);
|
||||
else
|
||||
bootbox.alert("The jobset has been scheduled for evaluation.");
|
||||
})
|
||||
.fail(function() { bootbox.alert("Server request failed!"); });
|
||||
});
|
||||
return;
|
||||
};
|
||||
</script>
|
||||
|
||||
[% END %]
|
||||
|
|
|
@ -2,6 +2,20 @@
|
|||
[% PROCESS common.tt %]
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
[% 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">
|
||||
[% INCLUDE menuItem uri = c.uri_for('/project' project.name 'edit') title="Edit configuration" %]
|
||||
[% 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 %]
|
||||
|
||||
<li class="active"><a href="#tabs-project" data-toggle="tab">Jobsets</a></li>
|
||||
<li><a href="#tabs-configuration" data-toggle="tab">Configuration</a></li>
|
||||
<li><a href="#tabs-releases" data-toggle="tab">Releases</a></li>
|
||||
|
@ -140,12 +154,6 @@
|
|||
|
||||
[% END %]
|
||||
|
||||
[% IF c.user_exists %]
|
||||
<p><a class="btn" href="[% c.uri_for('/project' project.name 'create-release') %]">
|
||||
<i class="icon-plus"></i> Create a release
|
||||
</a></p>
|
||||
[% END %]
|
||||
|
||||
</div>
|
||||
|
||||
<div id="tabs-views" class="tab-pane">
|
||||
|
|
|
@ -34,13 +34,7 @@
|
|||
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('project'), [project.name]) title = "Overview" %]
|
||||
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('all'), [project.name]) title = "Latest builds" %]
|
||||
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('errors'), [project.name]) title = "Errors" %]
|
||||
<li class="divider"></li>
|
||||
[% INCLUDE menuItem uri = c.uri_for('/project' project.name 'channel' 'latest') title = "Channel" %]
|
||||
[% IF c.user_exists %]
|
||||
<li class="divider"></li>
|
||||
[% 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" %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
@ -60,34 +54,7 @@
|
|||
[% INCLUDE menuItem
|
||||
uri = c.uri_for(c.controller('Jobset').action_for('errors'), [project.name, jobset.name])
|
||||
title = "Errors" %]
|
||||
<li class="divider"></li>
|
||||
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'channel' 'latest') title = "Channel" %]
|
||||
[% IF c.user_exists %]
|
||||
<li class="divider"></li>
|
||||
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'edit') title="Edit" %]
|
||||
[% INCLUDE menuItem uri = c.uri_for('/jobset' project.name jobset.name 'clone') title="Clone" %]
|
||||
|
||||
<script>
|
||||
function confirmEvaluateJobset() {
|
||||
bootbox.confirm(
|
||||
'Are you sure you want to force evaluation of this jobset?',
|
||||
function(c) {
|
||||
if (!c) return;
|
||||
$.post("[% HTML.escape(c.uri_for('/api/push', { jobsets = project.name _ ':' _ jobset.name, force = "1" })) %]")
|
||||
.done(function(data) {
|
||||
if (data.error)
|
||||
bootbox.alert("Unable to schedule the jobset for evaluation: " + data.error);
|
||||
else
|
||||
bootbox.alert("The jobset has been scheduled for evaluation.");
|
||||
})
|
||||
.fail(function() { bootbox.alert("Server request failed!"); });
|
||||
});
|
||||
return;
|
||||
};
|
||||
</script>
|
||||
[% INCLUDE menuItem title="Evaluate" uri = "javascript:confirmEvaluateJobset()" %]
|
||||
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
|
@ -104,7 +71,6 @@
|
|||
[% INCLUDE menuItem
|
||||
uri = c.uri_for(c.controller('Job').action_for('errors'), [project.name, jobset.name, job.name])
|
||||
title = "Errors" %]
|
||||
<li class="divider"></li>
|
||||
[% INCLUDE menuItem uri = c.uri_for('/job' project.name jobset.name job.name 'channel' 'latest') title = "Channel" %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
|
Loading…
Reference in a new issue