Move more actions from the top bar
This commit is contained in:
@ -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 %]
|
||||
|
Reference in New Issue
Block a user