From f6bb8afc300a4eca6b343577db9b343ee87937d2 Mon Sep 17 00:00:00 2001 From: aszlig Date: Tue, 21 Apr 2015 03:58:51 +0200 Subject: [PATCH] Show build products on aggregates with channels. This is to get a bit more consistency among channel builds but doesn't do a radical change on the display. Ideally we may want to have a channel overview with all the constituents and a small help showing how the user can add the channel. Unfortunately, this also introduces an inconsistency: We previously used the *subtype* "channel", but now we're expecting "channel" as the type of the product, so we need to change this for the channels overview as well. Signed-off-by: aszlig --- src/lib/Hydra/Controller/Build.pm | 4 ++++ src/root/build.tt | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index 0ab0832e..09018b5d 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -108,6 +108,10 @@ sub build_GET { # If this is an aggregate build, get its constituents. $c->stash->{constituents} = [$c->stash->{build}->constituents_->search({}, {order_by => ["job"]})]; + + $c->stash->{isChannel} = $c->stash->{build}->buildproducts->search( + {type => "channel"} + )->count > 0; } diff --git a/src/root/build.tt b/src/root/build.tt index ec1fe10a..288af542 100644 --- a/src/root/build.tt +++ b/src/root/build.tt @@ -188,7 +188,7 @@ [% IF cachedBuild; INCLUDE renderFullBuildLink build=cachedBuild; ELSE %]unknown[% END %] [% END %] - [% IF !isAggregate && build.finished; actualBuild = build.iscachedbuild ? cachedBuild : build %] + [% IF (!isAggregate || !isChannel) && build.finished; actualBuild = build.iscachedbuild ? cachedBuild : build %] [% IF actualBuild %] Duration: @@ -200,7 +200,7 @@ [% INCLUDE renderDateTime timestamp = build.stoptime; %] [% END %] - [% IF !isAggregate && buildLogExists(build) %] + [% IF (!isAggregate || !isChannel) && buildLogExists(build) %] Logfile: @@ -215,7 +215,7 @@ - [% IF build.buildproducts && !isAggregate %] + [% IF isChannel || (build.buildproducts && !isAggregate) %]

Build products