forked from lix-project/hydra
Show aborted/cancelled builds separately in jobset eval pages
This commit is contained in:
parent
9801cb76db
commit
cc1fcf657c
2 changed files with 15 additions and 5 deletions
|
@ -39,11 +39,11 @@ sub view : Chained('eval') PathPart('') Args(0) {
|
|||
if ($compare =~ /^\d+$/) {
|
||||
$eval2 = $c->model('DB::JobsetEvals')->find($compare)
|
||||
or notFound($c, "Evaluation $compare doesn't exist.");
|
||||
} elsif ($compare =~ /^-(\d+)$/) {
|
||||
my $t = int($1);
|
||||
} elsif ($compare =~ /^-(\d+)$/) {
|
||||
my $t = int($1);
|
||||
$eval2 = $c->stash->{jobset}->jobsetevals->find(
|
||||
{ hasnewbuilds => 1, timestamp => {'<=', $eval->timestamp - $t} },
|
||||
{ order_by => "timestamp desc", rows => 1});
|
||||
{ hasnewbuilds => 1, timestamp => {'<=', $eval->timestamp - $t} },
|
||||
{ order_by => "timestamp desc", rows => 1});
|
||||
} elsif (defined $compare && $compare =~ /^($jobsetNameRE)$/) {
|
||||
my $j = $c->stash->{project}->jobsets->find({name => $compare})
|
||||
or notFound($c, "Jobset $compare doesn't exist.");
|
||||
|
@ -78,6 +78,7 @@ sub view : Chained('eval') PathPart('') Args(0) {
|
|||
$c->stash->{new} = [];
|
||||
$c->stash->{removed} = [];
|
||||
$c->stash->{unfinished} = [];
|
||||
$c->stash->{aborted} = [];
|
||||
|
||||
my $n = 0;
|
||||
foreach my $build (@builds) {
|
||||
|
@ -90,7 +91,9 @@ sub view : Chained('eval') PathPart('') Args(0) {
|
|||
if ($d == 0) {
|
||||
$n++;
|
||||
$found = 1;
|
||||
if ($build->finished == 0 || $build2->finished == 0) {
|
||||
if ($build->buildstatus == 3 || $build->buildstatus == 4) {
|
||||
push @{$c->stash->{aborted}}, $build;
|
||||
} elsif ($build->finished == 0 || $build2->finished == 0) {
|
||||
push @{$c->stash->{unfinished}}, $build;
|
||||
} elsif ($build->buildstatus == 0 && $build2->buildstatus == 0) {
|
||||
push @{$c->stash->{stillSucceed}}, $build;
|
||||
|
|
|
@ -46,6 +46,9 @@ c.uri_for(c.controller('JobsetEval').action_for('view'),
|
|||
</li>
|
||||
[% END %]
|
||||
|
||||
[% IF aborted.size > 0 %]
|
||||
<li><a href="#tabs-aborted" data-toggle="tab"><span class="text-warning">Aborted jobs</span></a></li>
|
||||
[% END %]
|
||||
[% IF nowFail.size > 0 %]
|
||||
<li><a href="#tabs-now-fail" data-toggle="tab"><span class="text-warning">Newly-failing jobs</span></a></li>
|
||||
[% END %]
|
||||
|
@ -83,6 +86,10 @@ c.uri_for(c.controller('JobsetEval').action_for('view'),
|
|||
|
||||
<div class="tab-content">
|
||||
|
||||
<div id="tabs-aborted" class="tab-pane">
|
||||
[% INCLUDE renderSome builds=aborted %]
|
||||
</div>
|
||||
|
||||
<div id="tabs-now-fail" class="tab-pane">
|
||||
[% INCLUDE renderSome builds=nowFail %]
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue