Jobset eval page: Fix handling of aborted/cancelled builds
The fix in 85d51074
was not quite right.
This commit is contained in:
parent
cad2c07a35
commit
492fe121ea
|
@ -82,10 +82,7 @@ sub view : Chained('eval') PathPart('') Args(0) {
|
|||
|
||||
my $n = 0;
|
||||
foreach my $build (@builds) {
|
||||
if ($build->finished != 0 && ($build->buildstatus == 3 || $build->buildstatus == 4)) {
|
||||
push @{$c->stash->{aborted}}, $build;
|
||||
next;
|
||||
}
|
||||
my $aborted = $build->finished != 0 && ($build->buildstatus == 3 || $build->buildstatus == 4);
|
||||
my $d;
|
||||
my $found = 0;
|
||||
while ($n < scalar(@builds2)) {
|
||||
|
@ -95,7 +92,9 @@ sub view : Chained('eval') PathPart('') Args(0) {
|
|||
if ($d == 0) {
|
||||
$n++;
|
||||
$found = 1;
|
||||
if ($build->finished == 0 || $build2->finished == 0) {
|
||||
if ($aborted) {
|
||||
# do nothing
|
||||
} elsif ($build->finished == 0 || $build2->finished == 0) {
|
||||
push @{$c->stash->{unfinished}}, $build;
|
||||
} elsif ($build->buildstatus == 0 && $build2->buildstatus == 0) {
|
||||
push @{$c->stash->{stillSucceed}}, $build;
|
||||
|
@ -111,7 +110,11 @@ sub view : Chained('eval') PathPart('') Args(0) {
|
|||
push @{$c->stash->{removed}}, { job => $build2->get_column('job'), system => $build2->get_column('system') };
|
||||
$n++;
|
||||
}
|
||||
push @{$c->stash->{new}}, $build if !$found;
|
||||
if ($aborted) {
|
||||
push @{$c->stash->{aborted}}, $build;
|
||||
} else {
|
||||
push @{$c->stash->{new}}, $build if !$found;
|
||||
}
|
||||
}
|
||||
|
||||
$c->stash->{full} = ($c->req->params->{full} || "0") eq "1";
|
||||
|
|
Loading…
Reference in a new issue