From 0f03c796e7d409bcc38e2b03efce1462710c8f41 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 13 Nov 2008 00:01:19 +0000 Subject: [PATCH] --- src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm | 9 +++++++-- src/HydraFrontend/root/hydra.css | 1 + src/HydraFrontend/root/layout.tt | 2 +- src/HydraFrontend/root/project.tt | 6 +++--- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm b/src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm index 58161891..33389743 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm @@ -47,11 +47,12 @@ sub project :Local { my ( $self, $c, $projectName ) = @_; $c->stash->{template} = 'project.tt'; + $c->stash->{projects} = [$c->model('DB::Projects')->search({}, {order_by => 'displayname'})]; + (my $project) = $c->model('DB::Projects')->search({ name => $projectName }); return error($c, "Project $projectName doesn't exist.") if !defined $project; - $c->stash->{project} = $project; - $c->model('DB::Builds')->search({project => $projectName}, {join => 'resultInfo', select => {sum => 'starttime'}}); + $c->stash->{curProject} = $project; $c->stash->{finishedBuilds} = $c->model('DB::Builds')->search( {project => $projectName, finished => 1}); @@ -97,9 +98,13 @@ sub default :Path { sub build :Local { my ( $self, $c, $id ) = @_; + $c->stash->{projects} = [$c->model('DB::Projects')->search({}, {order_by => 'displayname'})]; + my $build = getBuild($c, $id); return error($c, "Build with ID $id doesn't exist.") if !defined $build; + $c->stash->{curProject} = $build->project; + $c->stash->{template} = 'build.tt'; $c->stash->{build} = $build; $c->stash->{id} = $id; diff --git a/src/HydraFrontend/root/hydra.css b/src/HydraFrontend/root/hydra.css index ac6f849e..c54e2c2b 100644 --- a/src/HydraFrontend/root/hydra.css +++ b/src/HydraFrontend/root/hydra.css @@ -150,6 +150,7 @@ td.buildfarmMainColumn { pre.buildlog { border: 1px solid black; padding: 0.3em; + white-space: pre-wrap; } ul.productList { diff --git a/src/HydraFrontend/root/layout.tt b/src/HydraFrontend/root/layout.tt index 7b574eaf..77051835 100644 --- a/src/HydraFrontend/root/layout.tt +++ b/src/HydraFrontend/root/layout.tt @@ -39,7 +39,7 @@
Projects
diff --git a/src/HydraFrontend/root/project.tt b/src/HydraFrontend/root/project.tt index 2efc06bc..89fafd10 100644 --- a/src/HydraFrontend/root/project.tt +++ b/src/HydraFrontend/root/project.tt @@ -1,11 +1,11 @@ [% WRAPPER layout.tt title="Hydra Overview" %] -

Project [% project.name %]

+

Project [% curProject.name %]

Definition

-[% FOREACH jobset IN project.jobsets -%] +[% FOREACH jobset IN curProject.jobsets -%]

Jobset [% jobset.name %]

@@ -54,7 +54,7 @@