JobsetEval: allow restarting failed builds even with no eval to compare to

This commit is contained in:
Cole Helbling 2022-01-07 12:33:33 -08:00
parent 98c88a4dbf
commit aba0422865
2 changed files with 5 additions and 1 deletions

View file

@ -83,6 +83,7 @@ sub view_GET {
$c->stash->{removed} = [];
$c->stash->{unfinished} = [];
$c->stash->{aborted} = [];
$c->stash->{failed} = [];
my $n = 0;
foreach my $build (@builds) {
@ -119,6 +120,9 @@ sub view_GET {
} else {
push @{$c->stash->{new}}, $build if !$found;
}
if ($build->buildstatus != 0) {
push @{$c->stash->{failed}}, $build;
}
}
$c->stash->{full} = ($c->req->params->{full} || "0") eq "1";

View file

@ -51,7 +51,7 @@ c.uri_for(c.controller('JobsetEval').action_for('view'),
[% IF unfinished.size > 0 %]
<a class="dropdown-item" href="[% c.uri_for(c.controller('JobsetEval').action_for('cancel'), [eval.id]) %]">Cancel all scheduled builds</a>
[% END %]
[% IF aborted.size > 0 || stillFail.size > 0 || nowFail.size > 0 %]
[% IF aborted.size > 0 || stillFail.size > 0 || nowFail.size > 0 || failed.size > 0 %]
<a class="dropdown-item" href="[% c.uri_for(c.controller('JobsetEval').action_for('restart_failed'), [eval.id]) %]">Restart all failed builds</a>
[% END %]
[% IF aborted.size > 0 %]