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