From c6fe9f00bf6e3ba128fa1ea1339d5fb352892e6a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 21 Feb 2013 18:42:18 +0100 Subject: [PATCH] Also show number of evaluations of which a build is a part --- src/lib/Hydra/Controller/Build.pm | 1 + src/root/build.tt | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index 05edea1d..442b1151 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -92,6 +92,7 @@ sub view_build : Chained('build') PathPart('') Args(0) { } # Get the first eval of which this build was a part. + ($c->stash->{nrEvals}) = $c->stash->{build}->jobsetevals->search({ hasnewbuilds => 1 })->count; ($c->stash->{eval}) = $c->stash->{build}->jobsetevals->search( { hasnewbuilds => 1}, { limit => 1, order_by => ["id"] }); diff --git a/src/root/build.tt b/src/root/build.tt index c2b8b2f8..4855234f 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -97,12 +97,6 @@ System: [% build.system %] - [% IF eval %] - - Part of: - evaluation [% eval.id %] - - [% END %] [% IF build.releasename %] Release name: @@ -114,6 +108,15 @@ [% build.nixname %] [% END %] + [% IF eval %] + + Part of: + + evaluation [% eval.id %] + [% IF nrEvals > 1 +%] (and [% nrEvals - 1 %] others)[% END %] + + + [% END %] [% IF build.iscachedbuild %] Cached from: