diff --git a/src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm b/src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm index 956c044c..851f5006 100644 --- a/src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm +++ b/src/HydraFrontend/lib/HydraFrontend/Controller/Root.pm @@ -32,15 +32,15 @@ sub index :Path :Args(0) { $c->stash->{allBuilds} = [$c->model('DB::Builds')->all]; # Get the latest build for each unique job. # select * from builds as x where timestamp == (select max(timestamp) from builds where jobName == x.jobName); - $c->stash->{latestBuilds} = [$c->model('DB::Builds')->search(undef, {order_by => "jobName", where => "timestamp == (select max(timestamp) from builds where jobName == me.jobName)"})]; + $c->stash->{latestBuilds} = [$c->model('DB::Builds')->search(undef, {order_by => "project, attrName", where => "timestamp == (select max(timestamp) from builds where project == me.project and attrName == me.attrName)"})]; } sub job :Local { - my ( $self, $c, $jobName ) = @_; + my ( $self, $c, $project, $jobName ) = @_; $c->stash->{template} = 'job.tt'; $c->stash->{jobName} = $jobName; - $c->stash->{builds} = [$c->model('DB::Builds')->search({jobName => $jobName}, {order_by => "timestamp DESC"})]; + $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 57c7534f..a27aab90 100644 --- a/src/HydraFrontend/root/build.tt +++ b/src/HydraFrontend/root/build.tt @@ -10,9 +10,17 @@ Build ID: [% build.id %] + + Project: + [% build.project %] + + + Jobset: + [% build.jobset %] + Job name: - [% build.jobname %] + [% build.attrname %] Description: diff --git a/src/HydraFrontend/root/index.tt b/src/HydraFrontend/root/index.tt index 2f80a90d..3a545e8b 100644 --- a/src/HydraFrontend/root/index.tt +++ b/src/HydraFrontend/root/index.tt @@ -6,7 +6,7 @@ - + [% FOREACH build IN latestBuilds -%] @@ -21,7 +21,7 @@
#JobTimestampDescription
#ProjectJobTimestampDescription
- + [% FOREACH build IN allBuilds -%] diff --git a/src/HydraFrontend/root/job.tt b/src/HydraFrontend/root/job.tt index 33932347..9547401d 100644 --- a/src/HydraFrontend/root/job.tt +++ b/src/HydraFrontend/root/job.tt @@ -3,7 +3,7 @@

All builds for job [% jobName %]

#JobTimestampDescription
#ProjectJobTimestampDescription
- + [% FOREACH build IN builds -%] [% INCLUDE "short-build-info.tt" %] [% END -%] diff --git a/src/HydraFrontend/root/short-build-info.tt b/src/HydraFrontend/root/short-build-info.tt index c5391058..74b73c65 100644 --- a/src/HydraFrontend/root/short-build-info.tt +++ b/src/HydraFrontend/root/short-build-info.tt @@ -9,7 +9,8 @@ [% END %] - + +
IdJobTimestampDescription
IdProjectJobTimestampDescription
[% build.id %][% build.jobname %][% build.project %][% build.jobset %]:[% build.attrname %] [% date.format(build.timestamp, '%Y-%m-%d %H:%M:%S') %] [% build.description %]