forked from lix-project/hydra
Remove the Build menu from the top bar
It's now a dropdown menu in the tabs thingy, which subsumes the "Reproduce locally" button. This makes the actions in the menu a bit more visible, IMHO.
This commit is contained in:
parent
f50477141d
commit
a5cfae078e
|
@ -443,9 +443,8 @@ sub restart : Chained('buildChain') PathPart Args(0) {
|
|||
|
||||
requireProjectOwner($c, $build->project);
|
||||
|
||||
my $drvpath = $build->drvpath;
|
||||
error($c, "This build cannot be restarted.")
|
||||
unless $build->finished && -f $drvpath;
|
||||
unless $build->finished && -f $build->drvpath;
|
||||
|
||||
restartBuild($c->model('DB')->schema, $build);
|
||||
|
||||
|
|
|
@ -68,6 +68,38 @@
|
|||
[% END %]
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" href="#">
|
||||
Actions
|
||||
<b class="caret"></b>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
[% IF build.nixexprinput %]
|
||||
<li><a href="#reproduce" data-toggle="modal">Reproduce locally</a></li>
|
||||
[% END %]
|
||||
[% IF c.user_exists %]
|
||||
<li><a href="[% c.uri_for('/build' build.id 'clone') %]">Clone</a></li>
|
||||
[% IF available %]
|
||||
[% IF build.keep %]
|
||||
<li><a href="[% c.uri_for('/build' build.id 'keep' 0) %]">Unkeep</a></li>
|
||||
[% ELSE %]
|
||||
<li><a href="[% c.uri_for('/build' build.id 'keep' 1) %]">Keep</a></li>
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% IF build.finished %]
|
||||
<li><a href="[% c.uri_for('/build' build.id 'restart') %]">Restart</a></li>
|
||||
[% ELSE %]
|
||||
<li><a href="[% c.uri_for('/build' build.id 'cancel') %]">Cancel</a></li>
|
||||
[% END %]
|
||||
[% IF available && project.releases %]
|
||||
[% INCLUDE menuItem
|
||||
uri = "#add-to-release"
|
||||
title = "Add to release"
|
||||
modal = 1 %]
|
||||
[% END %]
|
||||
[% 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>
|
||||
|
@ -83,26 +115,6 @@
|
|||
|
||||
<div id="tabs-summary" class="tab-pane active">
|
||||
|
||||
[% IF build.nixexprinput %]
|
||||
[% WRAPPER makePopover title="Reproduce locally" classes="btn-info pull-right" placement="left" %]
|
||||
[% url = c.uri_for('/build' build.id 'reproduce') %]
|
||||
|
||||
<p>You can reproduce this build on your own machine by
|
||||
downloading <a [% HTML.attributes(href => url) %]>a script</a>
|
||||
that checks out all inputs of the build and then invokes Nix
|
||||
to perform the build. This script requires that you have Nix
|
||||
on your system.</p>
|
||||
|
||||
<p>To download and execute the script from the command line,
|
||||
run the following command:</p>
|
||||
|
||||
<pre>
|
||||
<span class="shell-prompt">$ </span>bash <(curl <a [% HTML.attributes(href => url) %]>[% HTML.escape(url) %]</a>)
|
||||
</pre>
|
||||
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
|
@ -570,4 +582,34 @@
|
|||
[% END %]
|
||||
|
||||
|
||||
<div id="reproduce" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
[% url = c.uri_for('/build' build.id 'reproduce') %]
|
||||
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h3>Reproduce this build</h3>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
|
||||
<p>You can reproduce this build on your own machine by downloading
|
||||
<a [% HTML.attributes(href => url) %]>a script</a> that checks out
|
||||
all inputs of the build and then invokes Nix to perform the build.
|
||||
This script requires that you have Nix on your system.</p>
|
||||
|
||||
<p>To download and execute the script from the command line, run the
|
||||
following command:</p>
|
||||
|
||||
<pre>
|
||||
<span class="shell-prompt">$ </span>bash <(curl <a [% HTML.attributes(href => url) %]>[% HTML.escape(url) %]</a>)
|
||||
</pre>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<a href="#" class="btn btn-primary clode" data-dismiss="modal">Close</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
[% END %]
|
||||
|
|
|
@ -464,4 +464,10 @@ BLOCK makePopover %]
|
|||
[% END;
|
||||
|
||||
|
||||
BLOCK menuItem %]
|
||||
<li class="[% IF "${root}${curUri}" == uri %]active[% END %]" [% IF confirmmsg %]onclick="javascript:return confirm('[% confirmmsg %]')"[% END %]>
|
||||
<a href="[% uri %]" [% IF modal %]data-toggle="modal"[% END %]>[% title %]</a>
|
||||
</li>
|
||||
[% END;
|
||||
|
||||
%]
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
[% BLOCK menuItem %]
|
||||
<li class="[% IF "${root}${curUri}" == uri %]active[% END %]" [% IF confirmmsg %]onclick="javascript:return confirm('[% confirmmsg %]')"[% END %]>
|
||||
<a href="[% uri %]" [% IF modal %]data-toggle="modal"[% END %]>[% title %]</a>
|
||||
</li>
|
||||
[% END %]
|
||||
|
||||
[% BLOCK makeSubMenu %]
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" href="#" data-toggle="dropdown">[% title %]<b class="caret"></b></a>
|
||||
|
@ -115,49 +109,6 @@
|
|||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% IF build %]
|
||||
[% WRAPPER makeSubMenu title="Build" %]
|
||||
<li class="nav-header">#[% build.id %]</li>
|
||||
<li class="divider"></li>
|
||||
[% INCLUDE menuItem
|
||||
uri = c.uri_for('/build' build.id)
|
||||
title = "Overview" %]
|
||||
[% IF c.user_exists %]
|
||||
<li class="divider"></li>
|
||||
[% INCLUDE menuItem
|
||||
uri = c.uri_for('/build' build.id 'clone')
|
||||
title = "Clone build" %]
|
||||
[% IF available %]
|
||||
[% IF build.keep %]
|
||||
[% INCLUDE menuItem
|
||||
uri = c.uri_for('/build' build.id 'keep' 0)
|
||||
title = "Unkeep build" %]
|
||||
[% ELSE %]
|
||||
[% INCLUDE menuItem
|
||||
uri = c.uri_for('/build' build.id 'keep' 1)
|
||||
title = "Keep build" %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% IF build.finished %]
|
||||
[% INCLUDE menuItem
|
||||
uri = c.uri_for('/build' build.id 'restart')
|
||||
title = "Restart build" %]
|
||||
[% END %]
|
||||
[% IF !build.finished %]
|
||||
[% INCLUDE menuItem
|
||||
uri = c.uri_for('/build' build.id 'cancel')
|
||||
title = "Cancel build" %]
|
||||
[% END %]
|
||||
[% IF available && project.releases %]
|
||||
[% INCLUDE menuItem
|
||||
uri = "#add-to-release"
|
||||
title = "Add to release"
|
||||
modal = 1 %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
[% END %]
|
||||
|
||||
[% IF c.user_exists && c.check_user_roles('admin') %]
|
||||
[% WRAPPER makeSubMenu title="Admin" %]
|
||||
[% IF c.check_user_roles('admin') %]
|
||||
|
|
Loading…
Reference in a new issue