Show aborted/cancelled builds separately in jobset eval pages

This commit is contained in:
Eelco Dolstra 2013-10-03 01:54:42 +02:00
parent 9801cb76db
commit cc1fcf657c
2 changed files with 15 additions and 5 deletions

View file

@ -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;

View file

@ -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>