Show queued builds in jobset evaluation pages

This commit is contained in:
Eelco Dolstra 2012-04-02 15:23:42 +00:00
parent 427e5e8db8
commit 9d4cb29e08
2 changed files with 17 additions and 7 deletions

View file

@ -39,6 +39,7 @@ sub view : Chained('eval') PathPart('') Args(0) {
$c->stash->{nowFail} = [];
$c->stash->{new} = [];
$c->stash->{removed} = [];
$c->stash->{unfinished} = [];
my $n = 0;
foreach my $build (@builds) {
@ -49,7 +50,9 @@ sub view : Chained('eval') PathPart('') Args(0) {
|| $build->get_column('system') cmp $build2->get_column('system');
if ($d == 0) {
$n++;
if ($build->buildstatus == 0 && $build2->buildstatus == 0) {
if ($build->finished == 0 || $build2->finished == 0) {
push @{$c->stash->{unfinished}}, $build;
} elsif ($build->buildstatus == 0 && $build2->buildstatus == 0) {
push @{$c->stash->{stillSucceed}}, $build;
} elsif ($build->buildstatus != 0 && $build2->buildstatus != 0) {
push @{$c->stash->{stillFail}}, $build;

View file

@ -16,6 +16,11 @@
[% INCLUDE renderBuildListHeader unsortable=1 %]
[% IF unfinished.size > 0 %]
<tr><th class="subheader" colspan="0"><strong>Queued</strong> jobs</th></tr>
[% INCLUDE renderSome builds=unfinished %]
[% END %]
[% IF new.size > 0 %]
<tr><th class="subheader" colspan="0"><strong>New</strong> jobs</th></tr>
[% INCLUDE renderSome builds=new %]
@ -23,15 +28,17 @@
[% IF removed.size > 0 %]
<tr><th class="subheader" colspan="0"><strong>Removed</strong> jobs</th></tr>
[%- FOREACH j IN removed -%]
[% size = removed.size; max = full ? size : 30; %]
[%- FOREACH j IN removed.slice(0,(size > max ? max : size) - 1) -%]
<tr>
<td colspan=2></td>
<td>[% INCLUDE renderJobName project=project.name jobset=jobset.name job=j.job %]</td>
<td></td>
<td><tt>[% j.system %]</tt></td>
<td></td>
<td colspan="2"></td>
<td colspan="2">[% INCLUDE renderJobName project=project.name jobset=jobset.name job=j.job %]</td>
<td colspan="2"><tt>[% j.system %]</tt></td>
</tr>
[%- END -%]
[% IF size > max %]
<tr><td class="centered" colspan="0"><a href="[% c.uri_for(c.controller('JobsetEval').action_for('view'), [eval.id], full => 1) %]"><em>([% size - max %] more jobs omitted)</em></a></td></tr>
[% END %]
[% END %]
[% IF nowFail.size > 0 %]