forked from lix-project/hydra
hydra: minor improvements in hydra ui
This commit is contained in:
parent
fabc8e4774
commit
090a648020
|
@ -20,9 +20,10 @@ sub jobset : Chained('/') PathPart('jobset') CaptureArgs(2) {
|
|||
or notFound($c, "Jobset $jobsetName doesn't exist.");
|
||||
}
|
||||
|
||||
sub jobsetIndex {
|
||||
my ($self, $c, $forceStatus) = @_;
|
||||
|
||||
sub index : Chained('jobset') PathPart('') Args(0) {
|
||||
my ($self, $c) = @_;
|
||||
print STDERR "index\n";
|
||||
|
||||
$c->stash->{template} = 'jobset.tt';
|
||||
|
||||
|
@ -46,7 +47,7 @@ sub index : Chained('jobset') PathPart('') Args(0) {
|
|||
push(@systems, $system->system);
|
||||
}
|
||||
|
||||
if(scalar(@{$c->stash->{activeJobs}}) <= 20) {
|
||||
if($forceStatus || scalar(@{$c->stash->{activeJobs}}) <= 20) {
|
||||
my @select = ();
|
||||
my @as = ();
|
||||
push(@select, "job"); push(@as, "job");
|
||||
|
@ -71,6 +72,16 @@ sub index : Chained('jobset') PathPart('') Args(0) {
|
|||
->search({finished => 1}, {order_by => "timestamp DESC", rows => 5 })] ;
|
||||
}
|
||||
|
||||
sub index : Chained('jobset') PathPart('') Args(0) {
|
||||
my ($self, $c) = @_;
|
||||
jobsetIndex($self, $c, 0);
|
||||
}
|
||||
|
||||
sub indexWithStatus : Chained('jobset') PathPart('') Args(1) {
|
||||
my ($self, $c, $forceStatus) = @_;
|
||||
jobsetIndex($self, $c, 1);
|
||||
}
|
||||
|
||||
|
||||
# Hydra::Base::Controller::ListBuilds needs this.
|
||||
sub get_builds : Chained('jobset') PathPart('') CaptureArgs(0) {
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
<ul>
|
||||
[% IF !edit -%]
|
||||
<li><a href="#tabs-information">Jobset</a></li>
|
||||
[% IF jobset.errormsg -%]<li><a href="#tabs-errors">Errors</a></li>[% END %]
|
||||
[% IF jobset.errormsg -%]<li><a href="#tabs-errors">Evaluation errors</a></li>[% END %]
|
||||
<li><a href="#tabs-jobs">Jobs ([% activeJobs.size %])</a></li>
|
||||
[% END %]
|
||||
<li><a href="#tabs-setup">Setup</a></li>
|
||||
|
@ -89,6 +89,16 @@
|
|||
[% END %]
|
||||
</ul>
|
||||
<div id="tabs-information">
|
||||
[% IF jobset.errormsg && !edit -%]
|
||||
<table class="layoutTable"><tr><td><img src="/static/images/failure.gif" /></td><td><a href="#tabs-errors" id="error-link">There are evaluation errors!</a></td></tr></table>
|
||||
<script type="text/javascript">
|
||||
$('#error-link').click(function() {
|
||||
$("#generic-tabs").tabs('select', 1);
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
[% END %]
|
||||
|
||||
[% IF lastBuilds %]
|
||||
<h2>Most recent builds</h2>
|
||||
[% INCLUDE renderBuildList builds=lastBuilds %]
|
||||
|
@ -123,6 +133,12 @@
|
|||
</tbody>
|
||||
</table>
|
||||
[% END %]
|
||||
[% IF !edit && !activeJobsStatus -%]
|
||||
<h2>Status</h2>
|
||||
<p>
|
||||
[ <a href="[% c.uri_for('/jobset' project.name jobset.name 'with-status' ) %]">Show status overview</a> ]
|
||||
</p>
|
||||
[% END %]
|
||||
|
||||
</div>
|
||||
[% IF !edit -%]
|
||||
|
|
|
@ -49,6 +49,10 @@ a.smallLink {
|
|||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
a#error-link {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
|
|
Loading…
Reference in a new issue