Update boostrap to latest 4.3.1

Co-authored-by: Graham Christensen <graham@grahamc.com>
... but just fixing up merge conflicts from the introduction of flakes
and the removal of the Jobs table.
This commit is contained in:
Tyson Whitehead 2019-07-30 17:51:24 -04:00
parent 627af61abe
commit 230a0387d2
No known key found for this signature in database
GPG key ID: B22199763A27997B
22 changed files with 462 additions and 478 deletions

View file

@ -8,7 +8,7 @@ STATIC = \
static/js/jquery/jquery-ui-1.10.4.min.js static/js/jquery/jquery-ui-1.10.4.min.js
FLOT = flot-0.8.3.zip FLOT = flot-0.8.3.zip
BOOTSTRAP = bootstrap-2.3.1.zip BOOTSTRAP = bootstrap-4.3.1-dist.zip
ZIPS = $(FLOT) $(BOOTSTRAP) ZIPS = $(FLOT) $(BOOTSTRAP)
@ -26,4 +26,4 @@ install-data-local: $(ZIPS)
mkdir -p $(hydradir)/static/js mkdir -p $(hydradir)/static/js
cp -prvd $(srcdir)/static/js/* $(hydradir)/static/js cp -prvd $(srcdir)/static/js/* $(hydradir)/static/js
mkdir -p $(hydradir)/static/bootstrap mkdir -p $(hydradir)/static/bootstrap
cp -prvd $(srcdir)/static/bootstrap/* $(hydradir)/static/bootstrap cp -prvd $(srcdir)/static/$(basename $(BOOTSTRAP))/* $(hydradir)/static/bootstrap

View file

@ -31,26 +31,26 @@
[% ELSE %] [% ELSE %]
<div id="hydra-signin" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true"> <div id="hydra-signin" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true">
<form class="form-horizontal"> <div class="modal-dialog" role="document">
<div class="modal-body"> <div class="modal-content">
<div class="control-group"> <form>
<label class="control-label">User name</label> <div class="modal-body">
<div class="controls"> <div class="form-group">
<input type="text" class="span3" name="username" value=""/> <label for="username" class="col-form-label">User name</label>
<input type="text" class="form-control" name="username"/>
</div>
<div class="form-group">
<label for="password" class="col-form-label">Password</label>
<input type="password" class="form-control" name="password"/>
</div>
</div> </div>
</div> <div class="modal-footer">
<div class="control-group"> <button id="do-signin" type="button" class="btn btn-primary">Sign in</button>
<label class="control-label">Password</label> <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
<div class="controls">
<input type="password" class="span3" name="password" value=""/>
</div> </div>
</div> </form>
</div> </div>
<div class="modal-footer"> </div>
<button id="do-signin" class="btn btn-primary">Sign in</button>
<button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
</div>
</form>
</div> </div>
<script> <script>

Binary file not shown.

Binary file not shown.

View file

@ -114,41 +114,38 @@ END;
[% END %] [% END %]
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li class="dropdown"> <li class="nav-item dropdown">
<a class="dropdown-toggle actions" data-toggle="dropdown" href="#"> <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" area-haspopup="true" aria-expanded="false">Actions</a>
Actions <div class="dropdown-menu">
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
[% IF eval.nixexprinput || eval.flake %] [% IF eval.nixexprinput || eval.flake %]
<li><a href="#reproduce" data-toggle="modal">Reproduce locally</a></li> <a class="dropdown-item" href="#reproduce" data-toggle="modal">Reproduce locally</a>
[% END %] [% END %]
[% IF c.user_exists %] [% IF c.user_exists %]
[% IF available %] [% IF available %]
[% IF build.keep %] [% IF build.keep %]
<li><a href="[% c.uri_for('/build' build.id 'keep' 0) %]">Unkeep</a></li> <a class="dropdown-item" href="[% c.uri_for('/build' build.id 'keep' 0) %]">Unkeep</a>
[% ELSE %] [% ELSE %]
<li><a href="[% c.uri_for('/build' build.id 'keep' 1) %]">Keep</a></li> <a class="dropdown-item" href="[% c.uri_for('/build' build.id 'keep' 1) %]">Keep</a>
[% END %] [% END %]
[% END %] [% END %]
[% IF build.finished %] [% IF build.finished %]
<li><a href="[% c.uri_for('/build' build.id 'restart') %]">Restart</a></li> <a class="dropdown-item" href="[% c.uri_for('/build' build.id 'restart') %]">Restart</a>
[% ELSE %] [% ELSE %]
<li><a href="[% c.uri_for('/build' build.id 'cancel') %]">Cancel</a></li> <a class="dropdown-item" href="[% c.uri_for('/build' build.id 'cancel') %]">Cancel</a>
<li><a href="[% c.uri_for('/build' build.id 'bump') %]">Bump up</a></li> <a class="dropdown-item" href="[% c.uri_for('/build' build.id 'bump') %]">Bump up</a>
[% END %] [% END %]
[% END %] [% END %]
</ul> </div>
</li> </li>
<li class="active"><a href="#tabs-summary" data-toggle="tab">Summary</a></li> <li class="nav-item"><a class="nav-link active" href="#tabs-summary" data-toggle="tab">Summary</a></li>
[% IF isAggregate %]<li><a href="#tabs-constituents" data-toggle="tab">Constituents</a></li>[% END %] [% IF isAggregate %]<li class="nav-item"><a class="nav-link" href="#tabs-constituents" data-toggle="tab">Constituents</a></li>[% END %]
<li><a href="#tabs-details" data-toggle="tab">Details</a></li> <li class="nav-item"><a class="nav-link" href="#tabs-details" data-toggle="tab">Details</a></li>
<li><a href="#tabs-buildinputs" data-toggle="tab">Inputs</a></li> <li class="nav-item"><a class="nav-link" href="#tabs-buildinputs" data-toggle="tab">Inputs</a></li>
[% IF steps.size() > 0 %]<li><a href="#tabs-buildsteps" data-toggle="tab">Build steps</a></li>[% END %] [% IF steps.size() > 0 %]<li class="nav-item"><a class="nav-link" href="#tabs-buildsteps" data-toggle="tab">Build steps</a></li>[% END %]
[% IF build.dependents %]<li><a href="#tabs-usedby" data-toggle="tab">Used by</a></li>[% END%] [% IF build.dependents %]<li class="nav-item"><a class="nav-link" href="#tabs-usedby" data-toggle="tab">Used by</a></li>[% END%]
[% IF drvAvailable %]<li><a href="#tabs-build-deps" data-toggle="tab">Build dependencies</a></li>[% END %] [% IF drvAvailable %]<li class="nav-item"><a class="nav-link" href="#tabs-build-deps" data-toggle="tab">Build dependencies</a></li>[% END %]
[% IF localStore && available %]<li><a href="#tabs-runtime-deps" data-toggle="tab">Runtime dependencies</a></li>[% END %] [% IF localStore && available %]<li class="nav-item"><a class="nav-link" href="#tabs-runtime-deps" data-toggle="tab">Runtime dependencies</a></li>[% END %]
</ul> </ul>
<div id="generic-tabs" class="tab-content"> <div id="generic-tabs" class="tab-content">
@ -489,22 +486,23 @@ END;
</div> </div>
<div id="reproduce" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true"> <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-dialog" role="document">
<div class="modal-content">
[% url = c.uri_for('/build' build.id 'reproduce') %]
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button> <h3>Reproduce this build</h3>
<h3>Reproduce this build</h3> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</div> </div>
<div class="modal-body"> <div class="modal-body">
[% IF eval.flake %] [% IF eval.flake %]
<p>If you have <a href='https://nixos.org/nix/download.html'>Nix <p>If you have <a href='https://nixos.org/nix/download.html'>Nix
installed</a>, you can reproduce this build on your own machine by installed</a>, you can reproduce this build on your own machine by
running the following command:</p> running the following command:</p>
<pre> <pre>
<span class="shell-prompt"># </span>nix build [% HTML.escape(eval.flake) %]#hydraJobs.[% HTML.escape(job) %] <span class="shell-prompt"># </span>nix build [% HTML.escape(eval.flake) %]#hydraJobs.[% HTML.escape(job) %]
@ -512,14 +510,14 @@ END;
[% ELSE %] [% ELSE %]
<p>If you have <a href='https://nixos.org/nix/download.html'>Nix <p>If you have <a href='https://nixos.org/nix/download.html'>Nix
installed</a>, you can reproduce this build on your own machine by installed</a>, you can reproduce this build on your own machine by
downloading <a [% HTML.attributes(href => url) %]>a script</a> downloading <a [% HTML.attributes(href => url) %]>a script</a>
that checks out all inputs of the build and then invokes Nix to that checks out all inputs of the build and then invokes Nix to
perform the build.</p> perform the build.</p>
<p>To download and execute the script from the command line, run the <p>To download and execute the script from the command line, run the
following command:</p> following command:</p>
<pre> <pre>
<span class="shell-prompt"># </span>curl <a [% HTML.attributes(href => url) %]>[% HTML.escape(url) %]</a> | bash <span class="shell-prompt"># </span>curl <a [% HTML.attributes(href => url) %]>[% HTML.escape(url) %]</a> | bash
@ -527,10 +525,12 @@ END;
[% END %] [% END %]
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<a href="#" class="btn btn-primary" data-dismiss="modal">Close</a> <a href="#" class="btn btn-primary" data-dismiss="modal">Close</a>
</div>
</div>
</div> </div>
</div> </div>

View file

@ -182,7 +182,7 @@ BLOCK renderSelection;
[% END %] [% END %]
</div> </div>
[% ELSE %] [% ELSE %]
<select style='width: 15em;' [% HTML.attributes(id => param, name => param) %]> <select class="custom-select" [% HTML.attributes(id => param, name => param) %]>
[% FOREACH name IN options.keys.sort %] [% FOREACH name IN options.keys.sort %]
<option [% IF name == curValue; "selected='selected'"; END; " "; HTML.attributes(value => name) %]>[% options.$name %]</option> <option [% IF name == curValue; "selected='selected'"; END; " "; HTML.attributes(value => name) %]>[% options.$name %]</option>
[% END %] [% END %]
@ -405,11 +405,11 @@ BLOCK renderInputDiff; %]
BLOCK renderPager %] BLOCK renderPager %]
<ul class="pager"> <ul class="pagination">
<li [% IF page == 1 %]class="disabled"[% END %]><a href="[% "$baseUri?page=1" %]">« First</a></li> <li class="page-item[% IF page == 1 %] disabled[% END %]"><a class="page-link" href="[% "$baseUri?page=1" %]">&laquo; First</a></li>
<li [% IF page == 1 %]class="disabled"[% END %]><a href="[% "$baseUri?page="; (page - 1) %]"> Previous</a></li> <li class="page-item[% IF page == 1 %] disabled[% END %]"><a class="page-link" href="[% "$baseUri?page="; (page - 1) %]">&lsaquo; Previous</a></li>
<li [% IF page * resultsPerPage >= total %]class="disabled"[% END %]><a href="[% "$baseUri?page="; (page + 1) %]">Next </a></li> <li class="page-item[% IF page * resultsPerPage >= total %] disabled[% END %]"><a class="page-link" href="[% "$baseUri?page="; (page + 1) %]">Next &rsaquo;</a></li>
<li [% IF page * resultsPerPage >= total %]class="disabled"[% END %]><a href="[% "$baseUri?page="; (total - 1) div resultsPerPage + 1 %]">Last »</a></li> <li class="page-item[% IF page * resultsPerPage >= total %] disabled[% END %]"><a class="page-link" href="[% "$baseUri?page="; (total - 1) div resultsPerPage + 1 %]">Last &raquo;</a></li>
</ul> </ul>
[% END; [% END;
@ -517,7 +517,7 @@ BLOCK renderLogLinks %]
BLOCK makeLazyTab %] BLOCK makeLazyTab %]
<div id="[% tabName %]" class="tab-pane"> <div id="[% tabName %]" class="tab-pane">
<center><img src="[% c.uri_for("/static/images/ajax-loader.gif") %]" alt="Loading..." /></center> <center><span class="spinner-border spinner-border-sm"/></center>
</div> </div>
<script> <script>
$(function() { makeLazyTab("[% tabName %]", "[% uri %]"); }); $(function() { makeLazyTab("[% tabName %]", "[% uri %]"); });
@ -533,9 +533,19 @@ BLOCK makePopover %]
BLOCK menuItem %] BLOCK menuItem %]
<li class="[% IF "${root}${curUri}" == uri %]active[% END %]" [% IF confirmmsg %]onclick="javascript:return confirm('[% confirmmsg %]')"[% END %]> <a class="dropdown-item[% IF "${root}${curUri}" == uri %] active[% END %]"
<a [% HTML.attributes(href => uri) %] [%+ IF modal %]data-toggle="modal"[% END %]> [% HTML.attributes(href => uri) %] [%+ IF modal %]data-toggle="modal"[% END %]
[% IF icon %]<i class="[% icon %] icon-black"></i> [%+ END %] [% IF confirmmsg %]onclick="javascript:return confirm('[% confirmmsg %]')"[% END %]>
[% IF icon %]<i class="[% icon %] icon-black"></i> [%+ END %]
[% title %]
</a>
[% END;
BLOCK navItem %]
<li class="nav-item">
<a class="nav-link[% IF "${root}${curUri}" == uri %] active[% END %]"
[% HTML.attributes(href => uri) %]>
[% title %] [% title %]
</a> </a>
</li> </li>

View file

@ -2,9 +2,9 @@
[% PROCESS common.tt %] [% PROCESS common.tt %]
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li class="active"><a href="#tabs-starred-jobs" data-toggle="tab">Starred jobs</a></li> <li class="nav-item"><a class="nav-link active" href="#tabs-starred-jobs" data-toggle="tab">Starred jobs</a></li>
<li><a href="#tabs-my-jobs" data-toggle="tab">My jobs</a></li> <li class="nav-item"><a class="nav-link" href="#tabs-my-jobs" data-toggle="tab">My jobs</a></li>
<li><a href="#tabs-my-jobsets" data-toggle="tab">My jobsets</a></li> <li class="nav-item"><a class="nav-link" href="#tabs-my-jobsets" data-toggle="tab">My jobsets</a></li>
</ul> </ul>
<div id="generic-tabs" class="tab-content"> <div id="generic-tabs" class="tab-content">

View file

@ -57,124 +57,132 @@
</table> </table>
[% END %] [% END %]
<form class="form-horizontal"> <form>
<fieldset> <div class="form-group row">
<label class="col-sm-3" for="editjobsetenabled">State</label>
<div class="btn-group btn-group-toggle col-sm-9" data-toggle="buttons">
<label class="btn btn-secondary[% IF jobset.enabled == 1 %] active[% END %]">
<input type="radio" id="editjobsetenabled" name="enabled" value="1" [% IF jobset.enabled == 1 %]checked[% END %]>Enabled</button>
</label>
<label class="btn btn-secondary[% IF jobset.enabled == 2 %] active[% END %]">
<input type="radio" name="enabled" value="2" [% IF jobset.enabled == 2 %]checked[% END %]>One-shot</button>
</label>
<label class="btn btn-secondary[% IF jobset.enabled == 3 %] active[% END %]">
<input type="radio" name="enabled" value="3" [% IF jobset.enabled == 3 %]checked[% END %]>One-at-a-time</button>
</label>
<label class="btn btn-secondary[% IF jobset.enabled == 0 %] active[% END %]">
<input type="radio" name="enabled" value="0" [% IF jobset.enabled == 0 %]checked[% END %]>Disabled</button>
</label>
</div>
</div>
<div class="control-group"> <div class="form-group row">
<label class="control-label">State</label> <label class="col-form-label col-sm-3" for="editjobsetvisible">Visible</label>
<div class="controls"> <div class="col-sm-9">
<div class="btn-group" data-toggle="buttons-radio"> <input type="checkbox" id="editjobsetvisible" name="visible" [% IF !jobset.hidden; 'checked="checked"'; END %]/>
<input type="hidden" name="enabled" value="[% jobset.enabled %]" /> </div>
<button type="button" class="btn" value="1">Enabled</button> </div>
<button type="button" class="btn" value="2">One-shot</button>
<button type="button" class="btn" value="3">One-at-a-time</button> <div class="form-group row">
<button type="button" class="btn" value="0">Disabled</button> <label class="col-form-label col-sm-3" for="editjobsetname">Identifier</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="editjobsetname" name="name" [% HTML.attributes(value => edit ? jobset.name : "") %]/>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3" for="editjobsettype">Type</label>
<div class="btn-group btn-group-toggle col-sm-9" data-toggle="buttons">
<label class="btn btn-secondary[% IF jobset.type == 1 %] active[% END %]">
<input type="radio" id="type-flake" name="enabled" value="1" [% IF jobset.type == 1 %]checked[% END %]>Flake</button>
</label>
<label class="btn btn-secondary[% IF jobset.type == 0 %] active[% END %]">
<input type="radio" id="type-legacy" name="enabled" value="0" [% IF jobset.type == 0 %]checked[% END %]>Legacy</button>
</label>
</div>
</div>
<div class="form-group row">
<label class="col-form-label col-sm-3" for="editjobsetdescription">Description</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="editjobsetdescription" name="description" [% HTML.attributes(value => jobset.description) %]/>
</div>
</div>
<div class="form-group row show-on-flake">
<label class="col-form-label col-sm-3" for="editjobsetflakeref">Flake URI</label>
<div class="col-sm-9">
<div class="input-group">
<input type="text" class="form-control" id="editjobsetflakeref" name="flakeref" [% HTML.attributes(value => jobset.flake) %]/>
</div>
</div>
</div>
<div class="form-group row show-on-legacy">
<label class="col-form-label col-sm-3" for="editjobsetnixexpr">Nix expression</label>
<div class="col-sm-9">
<div class="input-group">
<input type="text" class="form-control" id="editjobsetnixexpr" name="nixexprpath" [% HTML.attributes(value => jobset.nixexprpath) %]/>
<div class="input-group-append input-group-prepend">
<span class="input-group-text">in</span>
</div>
<input type="text" class="form-control" name="nixexprinput" [% HTML.attributes(value => jobset.nixexprinput) %]/>
</div>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3" for="editjobsetcheckinterval">
Check interval
<small class="form-text text-muted">(0 to disable polling)</small>
</label>
<div class="col-sm-9">
<div class="input-group">
<input type="number" class="form-control" id="editjobsetcheckinterval" name="checkinterval" [% HTML.attributes(value => jobset.checkinterval) %]/>
<div class="input-group-append">
<span class="input-group-text">sec</span>
</div> </div>
</div> </div>
</div> </div>
</div>
<div class="control-group"> <div class="form-group row">
<div class="controls"> <label class="col-sm-3" for="editjobsetschedulingshares">
<label class="checkbox"> Scheduling shares
<input type="checkbox" name="visible" [% IF !jobset.hidden; 'checked="checked"'; END %]/>Visible [% IF totalShares %]
</label> <small class="form-text text-muted">([% f = format("%.2f"); f(jobset.schedulingshares / totalShares * 100) %]% out of [% totalShares %] shares)</small>
</div> [% END %]
</label>
<div class="col-sm-9">
<input type="number" class="form-control" id="editjobschedulingshares" name="schedulingshares" [% HTML.attributes(value => jobset.schedulingshares) %]/>
</div> </div>
</div>
<div class="control-group"> <div class="form-group row">
<label class="control-label">Identifier</label> <label class="col-sm-3" for="editjobsetenableemail">Email notification</label>
<div class="controls"> <div class="col-sm-9">
<input type="text" class="span3" name="name" [% HTML.attributes(value => edit ? jobset.name : "") %]/> <input type="checkbox" id="editjobsetenableemail" name="enableemail" [% IF jobset.enableemail %]checked[% END %] [% IF !emailNotification %]disabled[% END %]/>
</div>
</div> </div>
</div>
<div class="control-group"> <div class="form-group row">
<label class="control-label">Description</label> <label class="col-sm-3" for="editjobsetemailoverride">Email override</label>
<div class="controls"> <div class="col-sm-9">
<input type="text" class="span3" name="description" [% HTML.attributes(value => jobset.description) %]/> <input type="text" class="form-control" id="editjobsetemailoverride" name="emailoverride" [% HTML.attributes(value => jobset.emailoverride) %] [% IF !emailNotification %]disabled[% END %]/>
</div>
</div> </div>
</div>
<div class="control-group"> <div class="form-group row">
<label class="control-label">Type</label> <label class="col-sm-3" for="editjobsetkeepnumber">Number of evaluations to keep</label>
<div class="controls"> <div class="col-sm-9">
<div class="btn-group" data-toggle="buttons-radio"> <input type="number" class="form-control" id="editjobsetkeepnumber" name="keepnr" [% HTML.attributes(value => jobset.keepnr) %]/>
<input type="hidden" id="type" name="type" value="[% jobset.type %]" />
<button type="button" class="btn" value="1" id="type-flake">Flake</button>
<button type="button" class="btn" value="0" id="type-legacy">Legacy</button>
</div>
</div>
</div> </div>
</div>
<div class="control-group show-on-flake"> [% INCLUDE renderJobsetInputs %]
<label class="control-label">Flake URI</label>
<div class="controls">
<input type="text" class="span3" name="flakeref" [% HTML.attributes(value => jobset.flake) %]/>
</div>
</div>
<div class="control-group show-on-legacy"> <button id="submit-jobset" type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> [%IF !edit %]Create jobset[% ELSE %]Apply changes[% END %]</button>
<label class="control-label">Nix expression</label>
<div class="controls">
<input type="text" class="span3" name="nixexprpath" [% HTML.attributes(value => jobset.nixexprpath) %]/>
in
<input type="text" class="span3" name="nixexprinput" [% HTML.attributes(value => jobset.nixexprinput) %]/>
</div>
</div>
<div class="control-group">
<label class="control-label">Check interval</label>
<div class="controls">
<div class="input-append">
<input type="number" class="span3" name="checkinterval" [% HTML.attributes(value => jobset.checkinterval) %]/>
<span class="add-on">sec</span>
</div>
<span class="help-inline">(0 to disable polling)</span>
</div>
</div>
<div class="control-group">
<label class="control-label">Scheduling shares</label>
<div class="controls">
<div class="input-append">
<input type="number" class="span3" name="schedulingshares" [% HTML.attributes(value => jobset.schedulingshares) %]/>
</div>
[% IF totalShares %]
<span class="help-inline">([% f = format("%.2f"); f(jobset.schedulingshares / totalShares * 100) %]% out of [% totalShares %] shares)</span>
[% END %]
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" name="enableemail" [% IF jobset.enableemail; 'checked="checked"'; END %] [%IF !emailNotification%]disabled=1[%END%] />Email notification
</label>
</div>
</div>
<div class="control-group">
<label class="control-label">Email override</label>
<div class="controls">
<input type="text" class="span3" name="emailoverride" [% HTML.attributes(value => jobset.emailoverride) %] [%IF !emailNotification%]disabled=1[%END%] />
</div>
</div>
<div class="control-group">
<label class="control-label">Number of evaluations to keep</label>
<div class="controls">
<input type="number" class="span3" name="keepnr" [% HTML.attributes(value => jobset.keepnr) %]/>
</div>
</div>
[% INCLUDE renderJobsetInputs %]
<div class="form-actions">
<button id="submit-jobset" type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> [%IF !edit %]Create jobset[% ELSE %]Apply changes[% END %]</button>
</div>
</fieldset>
<table style="display: none"> <table style="display: none">
[% INCLUDE renderJobsetInput input="" extraClass="template" id="input-template" baseName="input-template" %] [% INCLUDE renderJobsetInput input="" extraClass="template" id="input-template" baseName="input-template" %]

View file

@ -1,85 +1,79 @@
[% WRAPPER layout.tt title=(create ? "New project" : "Editing project $project.name") %] [% WRAPPER layout.tt title=(create ? "New project" : "Editing project $project.name") %]
[% PROCESS common.tt %] [% PROCESS common.tt %]
<form class="form-horizontal"> <form>
<fieldset> <div class="form-group row">
<label class="col-sm-3" for="editprojectenabled">Enabled</label>
<div class="control-group"> <div class="col-sm-9">
<div class="controls"> <input type="checkbox" id="editprojectenabled" name="enabled" [% IF project.enabled %] checked="checked" [% END %]/>
<label class="checkbox">
<input type="checkbox" name="enabled" [% IF create || project.enabled; 'checked="checked"'; END %]/>Enabled
</label>
</div>
<div class="controls">
<label class="checkbox">
<input type="checkbox" name="visible" [% IF !project.hidden; 'checked="checked"'; END %]/>Visible in the list of projects
</label>
</div>
</div> </div>
</div>
<div class="control-group"> <div class="form-group row">
<label class="control-label">Identifier</label> <label class="col-sm-3" for="editprojectvisible">Visible in projects list</label>
<div class="controls"> <div class="col-sm-9">
<input type="text" class="span3" name="name" [% HTML.attributes(value => project.name) %]/> <input type="checkbox" id="editprojectvisible" name="visible" [% IF !project.hidden %] checked="checked" [% END %]/>
</div>
</div> </div>
</div>
<div class="control-group"> <div class="form-group row">
<label class="control-label">Display name</label> <label class="col-sm-3" for="editprojectidentifier">Identifier</label>
<div class="controls"> <div class="col-sm-9">
<input type="text" class="span3" name="displayname" [% HTML.attributes(value => project.displayname) %]/> <input type="text" class="form-control" id="editprojectidentifier" name="name" [% HTML.attributes(value => project.name) %]/>
</div>
</div> </div>
</div>
<div class="control-group"> <div class="form-group row">
<label class="control-label">Description</label> <label class="col-sm-3" for="editprojectdisplayname">Display name</label>
<div class="controls"> <div class="col-sm-9">
<input type="text" class="span3" name="description" [% HTML.attributes(value => project.description) %]/> <input type="text" class="form-control" id="editprojectdisplayname" name="displayname" [% HTML.attributes(value => project.displayname) %]/>
</div>
</div> </div>
</div>
<div class="control-group"> <div class="form-group row">
<label class="control-label">Homepage</label> <label class="col-sm-3" for="editprojectdescription">Description</label>
<div class="controls"> <div class="col-sm-9">
<input type="text" class="span3" name="homepage" [% HTML.attributes(value => project.homepage) %]/> <input type="text" class="form-control" id="editprojectdescription" name="description" [% HTML.attributes(value => project.description) %]/>
</div>
</div> </div>
</div>
<div class="control-group"> <div class="form-group row">
<label class="control-label">Owner</label> <label class="col-sm-3" for="editprojecthomepage">Homepage</label>
<div class="controls"> <div class="col-sm-9">
<input type="text" class="span3" name="owner" [% HTML.attributes(value => project.owner.username || c.user.username) %]/> <input type="text" class="form-control" id="editprojecthomepage" name="homepage" [% HTML.attributes(value => project.homepage) %]/>
</div>
</div> </div>
</div>
<div class="control-group"> <div class="form-group row">
<label class="control-label">Declarative spec file</label> <label class="col-sm-3" for="editprojectowner">Owner</label>
<div class="controls"> <div class="col-sm-9">
<div class="input-append"> <input type="text" class="form-control" id="editprojectowner" name="owner" [% HTML.attributes(value => project.owner.username || c.user.username) %]/>
<input type="text" class="span3" name="declfile" [% HTML.attributes(value => project.declfile) %]/>
</div>
<span class="help-inline">(Leave blank for non-declarative project configuration)</span>
</div>
</div> </div>
</div>
<div class="control-group"> <div class="form-group row">
<label class="control-label">Declarative input type</label> <label class="col-sm-3" for="editprojectdeclfile">
<div class="controls"> Declarative spec file
[% INCLUDE renderSelection param="decltype" options=inputTypes edit=1 curValue=project.decltype %] <small class="form-text text-muted">(Leave blank for non-declarative project configuration)</small>
value </label>
<input style="width: 70%" type="text" [% HTML.attributes(value => project.declvalue, name => "declvalue") %]/> <div class="col-sm-9">
</div> <input type="text" class="form-control" id="editprojectdeclfile" name="declfile" [% HTML.attributes(value => project.declfile) %]/>
</div> </div>
</div>
<div class="form-actions"> <div class="form-group row">
<button id="submit-project" type="submit" class="btn btn-primary"> <label class="col-sm-3" for="editprojectdeclvalue">Declarative input type</label>
<i class="icon-ok icon-white"></i> <div class="col-sm-9">
[%IF create %]Create project[% ELSE %]Apply changes[% END %] [% INCLUDE renderSelection param="decltype" options=inputTypes edit=1 curValue=project.decltype %]
</button> <input type="text" class="form-control" id="editprojectdeclvalue" name="declvalue" [% HTML.attributes(value => project.declvalue) %]/>
</div> </div>
</div>
</fieldset> <button id="submit-project" type="submit" class="btn btn-primary">
<i class="icon-ok icon-white"></i>
[%IF create %]Create project[% ELSE %]Apply changes[% END %]
</button>
</form> </form>

View file

@ -15,12 +15,12 @@ removed or had an evaluation error.</div>
[% END %] [% END %]
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li class="active"><a href="#tabs-status" data-toggle="tab">Status</a></li> <li class="nav-item active"><a class="nav-link" href="#tabs-status" data-toggle="tab">Status</a></li>
[% IF constituentJobs.size > 0 %] [% IF constituentJobs.size > 0 %]
<li><a href="#tabs-constituents" data-toggle="tab">Constituents</a></li> <li class="nav-item"><a class="nav-link" href="#tabs-constituents" data-toggle="tab">Constituents</a></li>
[% END %] [% END %]
<li><a href="#tabs-charts" data-toggle="tab">Charts</a></li> <li class="nav-item"><a class="nav-link" href="#tabs-charts" data-toggle="tab">Charts</a></li>
<li><a href="#tabs-links" data-toggle="tab">Links</a></li> <li class="nav-item"><a class="nav-link" href="#tabs-links" data-toggle="tab">Links</a></li>
</ul> </ul>
<div id="generic-tabs" class="tab-content"> <div id="generic-tabs" class="tab-content">

View file

@ -32,67 +32,63 @@ c.uri_for(c.controller('JobsetEval').action_for('view'),
<div class="alert">Couldn't find an evaluation to compare to.</div> <div class="alert">Couldn't find an evaluation to compare to.</div>
[% END %] [% END %]
<form class="form-search"> <form>
<input name="filter" type="text" class="input-large search-query" placeholder="Search jobs by name..." [% HTML.attributes(value => filter) %]/> <input name="filter" type="text" class="form-control" type="search" placeholder="Search jobs by name..." [% HTML.attributes(value => filter) %]/>
<input name="compare" type="hidden" [% HTML.attributes(value => otherEval.id) %]/> <input name="compare" type="hidden" [% HTML.attributes(value => otherEval.id) %]/>
<input name="full" type="hidden" [% HTML.attributes(value => full) %]/> <input name="full" type="hidden" [% HTML.attributes(value => full) %]/>
</form> </form>
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
[% IF c.user_exists %] [% IF c.user_exists %]
<li class="dropdown"> <li class="nav-item dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#"> <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#">Actions</a>
Actions <div class="dropdown-menu">
<b class="caret"></b> <a class="dropdown-item" href="[% c.uri_for(c.controller('JobsetEval').action_for('create_jobset'), [eval.id]) %]">Create a jobset from this evaluation</a>
</a>
<ul class="dropdown-menu">
<li><a href="[% c.uri_for(c.controller('JobsetEval').action_for('create_jobset'), [eval.id]) %]">Create a jobset from this evaluation</a></li>
[% IF unfinished.size > 0 %] [% IF unfinished.size > 0 %]
<li><a href="[% c.uri_for(c.controller('JobsetEval').action_for('cancel'), [eval.id]) %]">Cancel all scheduled builds</a></li> <a class="dropdown-item" href="[% c.uri_for(c.controller('JobsetEval').action_for('cancel'), [eval.id]) %]">Cancel all scheduled builds</a>
[% END %] [% END %]
[% IF aborted.size > 0 || stillFail.size > 0 || nowFail.size > 0 %] [% IF aborted.size > 0 || stillFail.size > 0 || nowFail.size > 0 %]
<li><a href="[% c.uri_for(c.controller('JobsetEval').action_for('restart_failed'), [eval.id]) %]">Restart all failed builds</a></li> <a class="dropdown-item" href="[% c.uri_for(c.controller('JobsetEval').action_for('restart_failed'), [eval.id]) %]">Restart all failed builds</a>
[% END %] [% END %]
[% IF aborted.size > 0 %] [% IF aborted.size > 0 %]
<li><a href="[% c.uri_for(c.controller('JobsetEval').action_for('restart_aborted'), [eval.id]) %]">Restart all aborted builds</a></li> <a class="dropdown-item" href="[% c.uri_for(c.controller('JobsetEval').action_for('restart_aborted'), [eval.id]) %]">Restart all aborted builds</a>
[% END %] [% END %]
[% IF unfinished.size > 0 %] [% IF unfinished.size > 0 %]
<li><a href="[% c.uri_for(c.controller('JobsetEval').action_for('bump'), [eval.id]) %]">Bump builds to front of queue</a></li> <a class="dropdown-item" href="[% c.uri_for(c.controller('JobsetEval').action_for('bump'), [eval.id]) %]">Bump builds to front of queue</a>
[% END %] [% END %]
</ul> </div>
</li> </li>
[% END %] [% END %]
[% IF aborted.size > 0 %] [% IF aborted.size > 0 %]
<li><a href="#tabs-aborted" data-toggle="tab"><span class="text-warning">Aborted jobs ([% aborted.size %])</span></a></li> <li class="nav-item"><a class="nav-link" href="#tabs-aborted" data-toggle="tab"><span class="text-warning">Aborted jobs ([% aborted.size %])</span></a></li>
[% END %] [% END %]
[% IF nowFail.size > 0 %] [% IF nowFail.size > 0 %]
<li><a href="#tabs-now-fail" data-toggle="tab"><span class="text-warning">Newly failing jobs ([% nowFail.size %])</span></a></li> <li class="nav-item"><a class="nav-link" href="#tabs-now-fail" data-toggle="tab"><span class="text-warning">Newly failing jobs ([% nowFail.size %])</span></a></li>
[% END %] [% END %]
[% IF nowSucceed.size > 0 %] [% IF nowSucceed.size > 0 %]
<li><a href="#tabs-now-succeed" data-toggle="tab"><span class="text-success">Newly succeeding jobs ([% nowSucceed.size %])</span></a></li> <li class="nav-item"><a class="nav-link" href="#tabs-now-succeed" data-toggle="tab"><span class="text-success">Newly succeeding jobs ([% nowSucceed.size %])</span></a></li>
[% END %] [% END %]
[% IF new.size > 0 %] [% IF new.size > 0 %]
<li><a href="#tabs-new" data-toggle="tab">New jobs ([% new.size %])</a></li> <li class="nav-item"><a class="nav-link" href="#tabs-new" data-toggle="tab">New jobs ([% new.size %])</a></li>
[% END %] [% END %]
[% IF removed.size > 0 %] [% IF removed.size > 0 %]
<li><a href="#tabs-removed" data-toggle="tab">Removed jobs ([% removed.size %])</a></li> <li class="nav-item"><a class="nav-link" href="#tabs-removed" data-toggle="tab">Removed jobs ([% removed.size %])</a></li>
[% END %] [% END %]
[% IF stillFail.size > 0 %] [% IF stillFail.size > 0 %]
<li><a href="#tabs-still-fail" data-toggle="tab">Still failing jobs ([% stillFail.size %])</a></li> <li class="nav-item"><a class="nav-link" href="#tabs-still-fail" data-toggle="tab">Still failing jobs ([% stillFail.size %])</a></li>
[% END %] [% END %]
[% IF stillSucceed.size > 0 %] [% IF stillSucceed.size > 0 %]
<li><a href="#tabs-still-succeed" data-toggle="tab">Still succeeding jobs ([% stillSucceed.size %])</a></li> <li class="nav-item"><a class="nav-link" href="#tabs-still-succeed" data-toggle="tab">Still succeeding jobs ([% stillSucceed.size %])</a></li>
[% END %] [% END %]
[% IF unfinished.size > 0 %] [% IF unfinished.size > 0 %]
<li><a href="#tabs-unfinished" data-toggle="tab">Queued jobs ([% unfinished.size %])</a></li> <li class="nav-item"><a class="nav-link" href="#tabs-unfinished" data-toggle="tab">Queued jobs ([% unfinished.size %])</a></li>
[% END %] [% END %]
<li><a href="#tabs-inputs" data-toggle="tab">Inputs</a></li> <li class="nav-item"><a class="nav-link" href="#tabs-inputs" data-toggle="tab">Inputs</a></li>
[% IF eval.evaluationerror.errormsg %] [% IF eval.evaluationerror.errormsg %]
<li><a href="#tabs-errors" data-toggle="tab"><span class="text-warning">Evaluation errors</span></a></li> <li class="nav-item"><a class="nav-link" href="#tabs-errors" data-toggle="tab"><span class="text-warning">Evaluation errors</span></a></li>
[% END %] [% END %]
</ul> </ul>
[% BLOCK renderSome %] [% BLOCK renderSome %]

View file

@ -1,12 +1,15 @@
[% PROCESS common.tt; USE Math %] [% PROCESS common.tt; USE Math %]
<form class="form-search" id="filter-jobs"> <form id="filter-jobs">
<div class="input-append"> <div class="input-group">
<input name="filter" type="text" class="input-large search-query" placeholder="Search jobs by name..." [% HTML.attributes(value => filter) %]/> <input name="filter" type="search" class="form-control" placeholder="Search jobs by name..." [% HTML.attributes(value => filter) %]/>
<button type="button" class="btn btn-info [% IF showInactive %]active[% END %]" id="active-toggle">Show inactive jobs</button> <div class="input-group-prepend">
<button type="button" class="btn btn-info [% IF showInactive %]active[% END %]" id="active-toggle">
<span class="spinner-border spinner-border-sm" id="filter-loading" style="display:none"/>
Show inactive jobs
</button>
</div>
</div> </div>
&nbsp;
<img src="[% c.uri_for("/static/images/ajax-loader.gif") %]" alt="Loading..." style="display: none;" id="filter-loading" />
</form> </form>
<script> <script>

View file

@ -43,12 +43,9 @@
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
[% IF c.user_exists %] [% IF c.user_exists %]
<li class="dropdown"> <li class="nav-item dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#"> <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#">Actions</a>
Actions <div class="dropdown-menu">
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
[% UNLESS project.declfile %] [% UNLESS project.declfile %]
[% INCLUDE menuItem title="Edit configuration" icon="icon-edit" uri=c.uri_for(c.controller('Jobset').action_for('edit'), c.req.captures) %] [% INCLUDE menuItem title="Edit configuration" icon="icon-edit" uri=c.uri_for(c.controller('Jobset').action_for('edit'), c.req.captures) %]
<!-- <!--
@ -57,18 +54,18 @@
[% INCLUDE menuItem title="Clone this jobset" uri=c.uri_for(c.controller('Jobset').action_for('edit'), c.req.captures, { cloneJobset => 1 }) %] [% INCLUDE menuItem title="Clone this jobset" uri=c.uri_for(c.controller('Jobset').action_for('edit'), c.req.captures, { cloneJobset => 1 }) %]
[% END %] [% END %]
[% INCLUDE menuItem title="Evaluate this jobset" uri="javascript:confirmEvaluateJobset()" %] [% INCLUDE menuItem title="Evaluate this jobset" uri="javascript:confirmEvaluateJobset()" %]
</ul> </div>
</li> </li>
[% END %] [% END %]
<li class="active"><a href="#tabs-evaluations" data-toggle="tab">Evaluations</a></li> <li class="nav-item active"><a class="nav-link" href="#tabs-evaluations" data-toggle="tab">Evaluations</a></li>
[% IF jobset.errormsg || jobset.fetcherrormsg %] [% IF jobset.errormsg || jobset.fetcherrormsg %]
<li><a href="#tabs-errors" data-toggle="tab"><span class="text-warning">Evaluation errors</span></a></li> <li class="nav-item"><a class="nav-link" href="#tabs-errors" data-toggle="tab"><span class="text-warning">Evaluation errors</span></a></li>
[% END %] [% END %]
<li><a href="#tabs-jobs" data-toggle="tab">Jobs</a></li> <li class="nav-item"><a class="nav-link" href="#tabs-jobs" data-toggle="tab">Jobs</a></li>
<li><a href="#tabs-configuration" data-toggle="tab">Configuration</a></li> <li class="nav-item"><a class="nav-link" href="#tabs-configuration" data-toggle="tab">Configuration</a></li>
<li><a href="#tabs-links" data-toggle="tab">Links</a></li> <li class="nav-item"><a class="nav-link" href="#tabs-links" data-toggle="tab">Links</a></li>
<li><a href="#tabs-channels" data-toggle="tab">Channels</a></li> <li class="nav-item"><a class="nav-link" href="#tabs-channels" data-toggle="tab">Channels</a></li>
</ul> </ul>
<div id="generic-tabs" class="tab-content"> <div id="generic-tabs" class="tab-content">

View file

@ -20,11 +20,9 @@
<script type="text/javascript" src="[% c.uri_for("/static/bootstrap/js/bootstrap.min.js") %]"></script> <script type="text/javascript" src="[% c.uri_for("/static/bootstrap/js/bootstrap.min.js") %]"></script>
<link href="[% c.uri_for("/static/bootstrap/css/bootstrap.min.css") %]" rel="stylesheet" /> <link href="[% c.uri_for("/static/bootstrap/css/bootstrap.min.css") %]" rel="stylesheet" />
<!-- hydra.css must be included before bootstrap-responsive to <!-- hydra.css may need to be moved to before boostrap to make the @media rule work. -->
make the @media rule work. -->
<link rel="stylesheet" href="[% c.uri_for("/static/css/hydra.css") %]" type="text/css" /> <link rel="stylesheet" href="[% c.uri_for("/static/css/hydra.css") %]" type="text/css" />
<link rel="stylesheet" href="[% c.uri_for("/static/css/rotated-th.css") %]" type="text/css" /> <link rel="stylesheet" href="[% c.uri_for("/static/css/rotated-th.css") %]" type="text/css" />
<link href="[% c.uri_for("/static/bootstrap/css/bootstrap-responsive.min.css") %]" rel="stylesheet" />
<style> <style>
.popover { max-width: 40%; } .popover { max-width: 40%; }
@ -46,27 +44,21 @@
<body> <body>
<div class="navbar navbar-fixed-top"> <nav class="navbar navbar-expand-md navbar-light bg-light">
<div class="navbar-inner"> <a class="navbar-brand" href="[% c.uri_for(c.controller('Root').action_for('index')) %]">
<div class="container"> [% IF logo == "" %]
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> Hydra
<span class="icon-bar"></span> [% ELSE %]
<span class="icon-bar"></span> <img src="[% c.uri_for(logo) %]" alt="Hydra Logo" class="logo" />
<span class="icon-bar"></span> [% END %]
</button> </a>
<a class="brand" href="[% c.uri_for(c.controller('Root').action_for('index')) %]"> <button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbarSupportedContent">
[% IF logo == "" %] <span class="navbar-toggler-icon"></span>
Hydra </button>
[% ELSE %] <div class="collapse navbar-collapse" id="navbarSupportedContent">
<img src="[% c.uri_for(logo) %]" alt="Hydra Logo" class="logo" /> [% PROCESS topbar.tt %]
[% END %]
</a>
<div class="nav-collapse collapse">
[% PROCESS topbar.tt %]
</div>
</div>
</div> </div>
</div> </nav>
<div class="container"> <div class="container">
<div class="skip-topbar"></div> <div class="skip-topbar"></div>

View file

@ -21,22 +21,18 @@
</table> </table>
[% END %] [% END %]
<form class="form-horizontal" action="[% c.uri_for('/admin/news/submit') %]" method="post"> <form action="[% c.uri_for('/admin/news/submit') %]" method="post">
<fieldset> <div class="page-header">Add news item</div>
<legend>Add news item</legend>
<div class="control-group"> <div class="form-group">
<label class="control-label">News text (HTML)</label> <label for="newscontents">News text (HTML)</label>
<div class="controls"> <textarea class="form-control" id="newscontents" name="contents"></textarea>
<textarea class="span9" name="contents"></textarea>
</div>
</div>
</fieldset>
<div class="form-actions">
<button type="submit" class="btn btn-primary">
<i class="icon-ok icon-white"></i>
Post
</button>
</div> </div>
<button type="submit" class="btn btn-primary">
<i class="icon-ok icon-white"></i>
Post
</button>
</form> </form>
[% END %] [% END %]

View file

@ -3,23 +3,20 @@
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
[% IF c.user_exists %] [% IF c.user_exists %]
<li class="dropdown"> <li class="nav-item dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#"> <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#">Actions</a>
Actions <div class="dropdown-menu">
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
[% INCLUDE menuItem title="Edit configuration" icon="icon-edit" uri=c.uri_for(c.controller('Project').action_for('edit'), c.req.captures) %] [% INCLUDE menuItem title="Edit configuration" icon="icon-edit" uri=c.uri_for(c.controller('Project').action_for('edit'), c.req.captures) %]
[% INCLUDE menuItem title="Delete this project" icon="icon-trash" uri="javascript:deleteProject()" %] [% INCLUDE menuItem title="Delete this project" icon="icon-trash" uri="javascript:deleteProject()" %]
[% UNLESS project.declfile %] [% UNLESS project.declfile %]
[% INCLUDE menuItem title="Create jobset" icon="icon-plus" uri=c.uri_for(c.controller('Project').action_for('create_jobset'), c.req.captures) %] [% INCLUDE menuItem title="Create jobset" icon="icon-plus" uri=c.uri_for(c.controller('Project').action_for('create_jobset'), c.req.captures) %]
[% END %] [% END %]
</ul> </div>
</li> </li>
[% END %] [% END %]
<li class="active"><a href="#tabs-project" data-toggle="tab">Jobsets</a></li> <li class="nav-item active"><a class="nav-link" href="#tabs-project" data-toggle="tab">Jobsets</a></li>
<li><a href="#tabs-configuration" data-toggle="tab">Configuration</a></li> <li class="nav-item"><a class="nav-link" href="#tabs-configuration" data-toggle="tab">Configuration</a></li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
@ -50,12 +47,17 @@
<div id="tabs-project" class="tab-pane active"> <div id="tabs-project" class="tab-pane active">
[% IF project.jobsets %] [% IF project.jobsets %]
<p>This project has the following jobsets: <div class="row">
<label id="show-disabled" class="btn btn-small pull-right" data-toggle="button">Show disabled jobsets</label> <div class="col">
[% IF isProjectOwner %] This project has the following jobsets:
<label id="show-hidden" class="btn btn-small pull-right" data-toggle="button">Show hidden jobsets</label> </div>
[% END %] <div class="col-auto">
</p> <label id="show-disabled" class="btn btn-secondary" data-toggle="button">Show disabled jobsets</label>
[% IF isProjectOwner %]
<label id="show-hidden" class="btn btn-secondary" data-toggle="button">Show hidden jobsets</label>
[% END %]
</div>
</div>
[% INCLUDE renderJobsetOverview %] [% INCLUDE renderJobsetOverview %]
[% ELSE %] [% ELSE %]
<p>No jobsets have been defined yet.</p> <p>No jobsets have been defined yet.</p>

View file

@ -52,11 +52,6 @@ table.info-table th {
padding-bottom: 0.2em; padding-bottom: 0.2em;
} }
/* Missing in bootstrap 2.0.2 */
.text-warning {
color: #c09853;
}
table.clickable-rows > tbody > tr { table.clickable-rows > tbody > tr {
cursor: pointer; cursor: pointer;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

View file

@ -46,7 +46,7 @@ $(document).ready(function() {
window.location = link.attr("href"); window.location = link.attr("href");
}); });
bootbox.animate(false); bootbox.setDefaults({ animate: false });
$(".hydra-popover").popover({}); $(".hydra-popover").popover({});
@ -131,7 +131,7 @@ $(document).ready(function() {
var tabsLoaded = {}; var tabsLoaded = {};
function makeLazyTab(tabName, uri) { function makeLazyTab(tabName, uri) {
$('.nav-tabs').bind('show', function(e) { $('.nav-tabs').bind('show.bs.tab', function(e) {
var pattern = /#.+/gi; var pattern = /#.+/gi;
var id = e.target.toString().match(pattern)[0]; var id = e.target.toString().match(pattern)[0];
if (id == '#' + tabName && !tabsLoaded[id]) { if (id == '#' + tabName && !tabsLoaded[id]) {

View file

@ -1,18 +1,18 @@
[% BLOCK makeSubMenu %] [% BLOCK makeSubMenu %]
<li class="dropdown" [% IF id; HTML.attributes(id => id); END %] > <li class="nav-item dropdown" [% IF id; HTML.attributes(id => id); END %] >
<a class="dropdown-toggle" href="#" data-toggle="dropdown">[% title %]<b class="caret"></b></a> <a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown">[% title %]<b class="caret"></b></a>
<ul class="dropdown-menu"> <div class="dropdown-menu[% IF align == 'right' %] dropdown-menu-right[% END %]">
[% content %] [% content %]
</ul> </div>
</li> </li>
[% END %] [% END %]
[% showPrivate = (isPrivateHydra && c.user_exists) || ! isPrivateHydra %] [% showPrivate = (isPrivateHydra && c.user_exists) || ! isPrivateHydra %]
[% IF showPrivate %] [% IF showPrivate %]
<ul class="nav pull-left"> <ul class="navbar-nav mr-auto">
[% IF c.user_exists %] [% IF c.user_exists %]
[% INCLUDE menuItem uri = c.uri_for(c.controller('User').action_for('dashboard'), [c.user.username]) title = "Dashboard" %] [% INCLUDE navItem uri = c.uri_for(c.controller('User').action_for('dashboard'), [c.user.username]) title = "Dashboard" %]
[% END %] [% END %]
[% WRAPPER makeSubMenu title="Status" %] [% WRAPPER makeSubMenu title="Status" %]
@ -38,8 +38,8 @@
[% IF project %] [% IF project %]
[% WRAPPER makeSubMenu title="Project" %] [% WRAPPER makeSubMenu title="Project" %]
<li class="nav-header">[% HTML.escape(project.name) %]</li> <h6 class="dropdown-header">[% HTML.escape(project.name) %]</h6>
<li class="divider"></li> <div class="dropdown-divider"></div>
[% 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('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('all'), [project.name]) title = "Latest builds" %]
[% INCLUDE menuItem uri = c.uri_for('/project' project.name 'channel' 'latest') title = "Channel" %] [% INCLUDE menuItem uri = c.uri_for('/project' project.name 'channel' 'latest') title = "Channel" %]
@ -48,8 +48,8 @@
[% IF jobset %] [% IF jobset %]
[% WRAPPER makeSubMenu title="Jobset" %] [% WRAPPER makeSubMenu title="Jobset" %]
<li class="nav-header">[% HTML.escape(jobset.name) %]</li> <h6 class="dropdown-header">[% HTML.escape(jobset.name) %]</h6>
<li class="divider"></li> <div class="dropdown-divider"></div>
[% INCLUDE menuItem [% INCLUDE menuItem
uri = c.uri_for(c.controller('Jobset').action_for('jobset'), [project.name, jobset.name]) uri = c.uri_for(c.controller('Jobset').action_for('jobset'), [project.name, jobset.name])
title = "Overview" %] title = "Overview" %]
@ -65,8 +65,8 @@
[% IF job %] [% IF job %]
[% WRAPPER makeSubMenu title="Job" %] [% WRAPPER makeSubMenu title="Job" %]
<li class="nav-header">[% HTML.escape(job) %]</li> <h6 class="dropdown-header">[% HTML.escape(job) %]</h6>
<li class="divider"></li> <div class="dropdown-divider"></div>
[% INCLUDE menuItem [% INCLUDE menuItem
uri = c.uri_for(c.controller('Job').action_for('overview'), [project.name, jobset.name, job]) uri = c.uri_for(c.controller('Job').action_for('overview'), [project.name, jobset.name, job])
title = "Overview" %] title = "Overview" %]
@ -82,7 +82,7 @@
[% WRAPPER makeSubMenu title="Admin" %] [% WRAPPER makeSubMenu title="Admin" %]
[% IF c.check_user_roles('admin') || c.check_user_roles('create-projects') %] [% IF c.check_user_roles('admin') || c.check_user_roles('create-projects') %]
[% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('create')) title = "Create project" %] [% INCLUDE menuItem uri = c.uri_for(c.controller('Project').action_for('create')) title = "Create project" %]
<li class="divider"></li> <div class="dropdown-divider"></div>
[% END %] [% END %]
[% IF c.check_user_roles('admin') %] [% IF c.check_user_roles('admin') %]
[% INCLUDE menuItem [% INCLUDE menuItem
@ -94,7 +94,7 @@
[% INCLUDE menuItem [% INCLUDE menuItem
uri = c.uri_for(c.controller('Admin').action_for('users')) uri = c.uri_for(c.controller('Admin').action_for('users'))
title = "Manage users" %] title = "Manage users" %]
<li class="divider"></li> <div class="dropdown-divider"></div>
[% INCLUDE menuItem [% INCLUDE menuItem
uri = c.uri_for(c.controller('Admin').action_for('clear_queue_non_current')) uri = c.uri_for(c.controller('Admin').action_for('clear_queue_non_current'))
title = "Cancel queued non-current builds" title = "Cancel queued non-current builds"
@ -117,32 +117,31 @@
</ul> </ul>
[% END %] [% END %]
<ul class="nav pull-right"> [% IF showPrivate %]
<form class="form-inline" action="[% c.uri_for('/search') %]">
<input name="query" type="text" class="form-control" placeholder="Search" [% HTML.attributes(value => c.req.params.query) %]/>
</form>
[% END %]
<ul class="navbar-nav">
[% 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 %]
[% IF c.user_exists %] [% IF c.user_exists %]
[% INCLUDE menuItem uri = c.uri_for(c.controller('User').action_for('edit'), [c.user.username]) title = "Preferences" %] [% INCLUDE navItem uri = c.uri_for(c.controller('User').action_for('edit'), [c.user.username]) title = "Preferences" %]
<li> <li class="nav-item">
<a href="#" onclick="signOut();">Sign out</a> <a class="nav-link" href="#" onclick="signOut();">Sign out</a>
</li> </li>
[% ELSE %] [% ELSE %]
[% WRAPPER makeSubMenu title="Sign in" id="sign-in-menu" %] [% WRAPPER makeSubMenu title="Sign in" id="sign-in-menu" align="right" %]
[% IF c.config.enable_google_login %] [% IF c.config.enable_google_login %]
<div style="display: none" class="g-signin2" data-onsuccess="onGoogleSignIn" data-theme="dark"></div></a> <div style="display: none" class="g-signin2" data-onsuccess="onGoogleSignIn" data-theme="dark"></div>
<li><a href="#" id="google-signin">Sign in with Google</a></li> <a class="dropdown-item" href="#" id="google-signin">Sign in with Google</a>
<li class="divider"></li> <div class="dropdown-divider"></div>
[% END %] [% END %]
[% IF c.config.github_client_id %] [% IF c.config.github_client_id %]
<li><a href="/github-redirect?after=[% c.req.path %]">Sign in with GitHub</a></li> <a class="dropdown-item" href="/github-redirect?after=[% c.req.path %]">Sign in with GitHub</a>
<li class="divider"></li> <div class="dropdown-divider"></div>
[% END %] [% END %]
<li> <a class="dropdown-item" href="#hydra-signin" data-toggle="modal">Sign in with a Hydra account</a>
<a href="#hydra-signin" data-toggle="modal">Sign in with a Hydra account</a>
</li>
[% END %] [% END %]
[% END %] [% END %]

View file

@ -14,115 +14,107 @@
>[% role %]</option> >[% role %]</option>
[% END %] [% END %]
<form class="form-horizontal"> <form>
<fieldset> [% IF create %]
<div class="form-group row">
<label class="col-sm-3" for="userusername">User name</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="userusername" name="username" [% HTML.attributes(value => username) %]/>
</div>
</div>
[% END %]
[% IF create %] <div class="form-group row">
<div class="control-group"> <label class="col-sm-3" for="userfullname">Full name</label>
<label class="control-label">User name</label> <div class="col-sm-9">
<div class="controls"> <input type="text" class="form-control" id="userfullname" name="fullname" [% HTML.attributes(value => create ? '' : user.fullname) %]/>
<input type="text" class="span3" name="username" [% HTML.attributes(value => username) %]/> </div>
</div>
[% IF create || user.type == 'hydra' %]
<div class="form-group row">
<label class="col-sm-3" for="userpassword">Password</label>
<div class="col-sm-9">
<input type="password" class="form-control" id="userpassword" name="password" value=""/>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3" for="userpassword2">Confirm password</label>
<div class="col-sm-9">
<input type="password" class="form-control" id="userpassword2" name="password2" value=""/>
</div>
</div>
[% END %]
<div class="form-group row">
<label class="col-sm-3" for="useremailaddress">Email</label>
<div class="col-sm-9">
<input type="text" class="form-control" id="useremailaddress" name="emailaddress" [% IF !create && user.username.search('@') %]disabled="disabled"[% END %] [%+ HTML.attributes(value => user.emailaddress) %]/>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3" for="useremailonerror">Receive evaluation error notifications</label>
<div class="col-sm-9">
<input type="checkbox" name="emailonerror" [% IF !create && user.emailonerror; 'checked="checked"'; END %]/>
</div>
</div>
<div class="form-group row">
<label class="col-sm-3" for="userpublicdashboard">Public dashboard</label>
<div class="col-sm-9">
<input type="checkbox" name="publicdashboard" [% IF !create && user.publicdashboard; 'checked="checked"'; END %]/>
</div>
</div>
[% IF !create || c.check_user_roles('admin') %]
<div class="form-group row">
<label class="col-sm-3">Roles</label>
<div class="col-sm-9">
<select multiple="multiple" name="roles" class="form-control" [% IF !c.check_user_roles('admin') %]disabled="disabled"[% END %]>
[% INCLUDE roleoption role="admin" %]
[% INCLUDE roleoption role="create-projects" %]
[% INCLUDE roleoption role="restart-jobs" %]
[% INCLUDE roleoption role="bump-to-front" %]
[% INCLUDE roleoption role="cancel-build" %]
</select>
</div> </div>
</div> </div>
[% END %] [% END %]
<div class="control-group"> [% IF create && !c.check_user_roles('admin') %]
<label class="control-label">Full name</label> <div class="form-group row">
<div class="controls"> <label class="col-sm-3"></label>
<input type="text" class="span3" name="fullname" [% HTML.attributes(value => create ? '' : user.fullname) %]/> <div class="col-sm-9">
<img src="[% c.uri_for('/captcha') %]" alt="CAPTCHA">
</div> </div>
</div> </div>
<div class="form-group row">
[% IF create || user.type == 'hydra' %] <label class="col-sm-3" for="usercaptcha">Type the digits shown in the image above</label>
<div class="control-group"> <div class="col-sm-9">
<label class="control-label">Password</label> <input type="text" class="form-control" id="usercaptcha" name="captcha" value="">
<div class="controls">
<input type="password" class="span3" name="password" value=""/>
</div> </div>
</div> </div>
[% END %]
<div class="control-group"> <button id="submit-user" class="btn btn-primary">
<label class="control-label">Confirm password</label> <i class="icon-ok icon-white"></i>
<div class="controls"> [%IF create %]Create[% ELSE %]Apply changes[% END %]
<input type="password" class="span3" name="password2" value=""/> </button>
</div> [% IF !create && c.check_user_roles('admin') && user.type == 'hydra' %]
</div> <button id="reset-password" class="btn btn-warning">
[% END %] <i class="icon-trash icon-white"></i>
Reset password
<div class="control-group"> </button>
<label class="control-label">Email</label> [% END %]
<div class="controls"> [% IF !create %]
<input type="text" class="span3" name="emailaddress" [% IF !create && user.username.search('@') %]disabled="disabled"[% END %] [%+ HTML.attributes(value => user.emailaddress) %]/> <button id="delete-user" class="btn btn-danger">
</div> <i class="icon-trash icon-white"></i>
</div> Delete this user
</button>
<div class="control-group"> [% END %]
<div class="controls">
<label class="checkbox">
<input type="checkbox" name="emailonerror" [% IF !create && user.emailonerror; 'checked="checked"'; END %]/>Receive evaluation error notifications
</label>
</div>
</div>
<div class="control-group">
<div class="controls">
<label class="checkbox">
<input type="checkbox" name="publicdashboard" [% IF !create && user.publicdashboard; 'checked="checked"'; END %]/>Public dashboard
</label>
</div>
</div>
[% IF !create || c.check_user_roles('admin') %]
<div class="control-group">
<label class="control-label">Roles</label>
<div class="controls">
<select multiple="multiple" name="roles" class="span3" [% IF !c.check_user_roles('admin') %]disabled="disabled"[% END %]>
[% INCLUDE roleoption role="admin" %]
[% INCLUDE roleoption role="create-projects" %]
[% INCLUDE roleoption role="restart-jobs" %]
[% INCLUDE roleoption role="bump-to-front" %]
[% INCLUDE roleoption role="cancel-build" %]
</select>
</div>
</div>
[% END %]
[% IF create && !c.check_user_roles('admin') %]
<div class="control-group">
<div class="controls">
<img src="[% c.uri_for('/captcha') %]" alt="CAPTCHA"/>
</div>
</div>
<div class="control-group">
<label class="control-label">Type the digits shown in the image above</label>
<div class="controls">
<input type="text" class="span3" name="captcha" value=""/>
</div>
</div>
[% END %]
<div class="form-actions">
<button id="submit-user" class="btn btn-primary">
<i class="icon-ok icon-white"></i>
[%IF create %]Create[% ELSE %]Apply changes[% END %]
</button>
[% IF !create && c.check_user_roles('admin') && user.type == 'hydra' %]
<button id="reset-password" class="btn btn-warning">
<i class="icon-trash icon-white"></i>
Reset password
</button>
[% END %]
[% IF !create %]
<button id="delete-user" class="btn btn-danger">
<i class="icon-trash icon-white"></i>
Delete this user
</button>
[% END %]
</div>
</fieldset>
</form> </form>

View file

@ -24,8 +24,8 @@
</tbody> </tbody>
</table> </table>
<p><a class="btn" href="[% c.uri_for(c.controller('Root').action_for('register')) %]"> <a class="btn btn-primary" href="[% c.uri_for(c.controller('Root').action_for('register')) %]">
<i class="icon-plus"></i> Add a new user <i class="icon-plus"></i> Add a new user
</a></p> </a>
[% END %] [% END %]