From 9d4cb29e0857648ee0820f3d96afb93d97a1b3e1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 2 Apr 2012 15:23:42 +0000 Subject: [PATCH] Show queued builds in jobset evaluation pages --- src/lib/Hydra/Controller/JobsetEval.pm | 5 ++++- src/root/jobset-eval.tt | 19 +++++++++++++------ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/lib/Hydra/Controller/JobsetEval.pm b/src/lib/Hydra/Controller/JobsetEval.pm index 824f01e2..16fba67f 100644 --- a/src/lib/Hydra/Controller/JobsetEval.pm +++ b/src/lib/Hydra/Controller/JobsetEval.pm @@ -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; diff --git a/src/root/jobset-eval.tt b/src/root/jobset-eval.tt index eab0788d..e5c03737 100644 --- a/src/root/jobset-eval.tt +++ b/src/root/jobset-eval.tt @@ -16,6 +16,11 @@ [% INCLUDE renderBuildListHeader unsortable=1 %] +[% IF unfinished.size > 0 %] + Queued jobs + [% INCLUDE renderSome builds=unfinished %] +[% END %] + [% IF new.size > 0 %] New jobs [% INCLUDE renderSome builds=new %] @@ -23,15 +28,17 @@ [% IF removed.size > 0 %] Removed jobs - [%- FOREACH j IN removed -%] + [% size = removed.size; max = full ? size : 30; %] + [%- FOREACH j IN removed.slice(0,(size > max ? max : size) - 1) -%] - - [% INCLUDE renderJobName project=project.name jobset=jobset.name job=j.job %] - - [% j.system %] - + + [% INCLUDE renderJobName project=project.name jobset=jobset.name job=j.job %] + [% j.system %] [%- END -%] + [% IF size > max %] + ([% size - max %] more jobs omitted) + [% END %] [% END %] [% IF nowFail.size > 0 %]