From d5a0f6e1458077b5e73c6793c6e911fbb6f83021 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 6 Nov 2008 23:17:46 +0000 Subject: [PATCH] --- .../lib/HydraFrontend/Controller/Root.pm | 12 ++++++++++++ src/HydraFrontend/root/build.tt | 4 ++-- src/HydraFrontend/root/hydra.css | 4 ++++ src/HydraFrontend/root/job.tt | 2 +- src/HydraFrontend/root/short-build-info.tt | 2 +- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm b/src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm index 866e044c..baf2c1d2 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm @@ -36,9 +36,21 @@ sub index :Path :Args(0) { } +sub project :Local { + my ( $self, $c, $projectName ) = @_; + $c->stash->{template} = 'project.tt'; + (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->stash->{jobNames} = + [$c->model('DB::Builds')->search({project => $projectName}, {select => [{distinct => 'attrname'}], as => ['attrname']})]; +} + + sub job :Local { my ( $self, $c, $project, $jobName ) = @_; $c->stash->{template} = 'job.tt'; + $c->stash->{projectName} = $project; $c->stash->{jobName} = $jobName; $c->stash->{builds} = [$c->model('DB::Builds')->search({project => $project, attrName => $jobName}, {order_by => "timestamp DESC"})]; } diff --git a/src/HydraFrontend/root/build.tt b/src/HydraFrontend/root/build.tt index 95460ae9..e3a2e50c 100644 --- a/src/HydraFrontend/root/build.tt +++ b/src/HydraFrontend/root/build.tt @@ -13,7 +13,7 @@ Project: - [% build.project %] + [% build.project %] Jobset: @@ -21,7 +21,7 @@ Job name: - [% build.attrname %] + [% build.attrname %] Description: diff --git a/src/HydraFrontend/root/hydra.css b/src/HydraFrontend/root/hydra.css index 28474860..b645077a 100644 --- a/src/HydraFrontend/root/hydra.css +++ b/src/HydraFrontend/root/hydra.css @@ -177,3 +177,7 @@ table.tablesorter thead tr .headerSortDown { table.tablesorter thead tr .headerSortDown, table.tablesorter thead tr .headerSortUp { background-color: #ffe000; } + +table.tablesorter thead tr th { + padding-right: 1.5em; +} \ No newline at end of file diff --git a/src/HydraFrontend/root/job.tt b/src/HydraFrontend/root/job.tt index c0df71d4..bebc0d4d 100644 --- a/src/HydraFrontend/root/job.tt +++ b/src/HydraFrontend/root/job.tt @@ -1,6 +1,6 @@ [% WRAPPER layout.tt title="Hydra Overview" %] -

All builds for job [% jobName %]

+

All builds for job [% projectName %]:[% jobName %]

diff --git a/src/HydraFrontend/root/short-build-info.tt b/src/HydraFrontend/root/short-build-info.tt index bf6cd8af..12990614 100644 --- a/src/HydraFrontend/root/short-build-info.tt +++ b/src/HydraFrontend/root/short-build-info.tt @@ -10,7 +10,7 @@ - +
IdProjectJobSystemTimestampDescription
[% build.id %] [% build.project %][% build.jobset %]:[% build.attrname %][% build.attrname %] [% build.system %] [% date.format(build.timestamp, '%Y-%m-%d %H:%M:%S') %] [% build.description %]