forked from lix-project/hydra
parent
ae364b9e5f
commit
3af294f848
|
@ -35,7 +35,7 @@ sub get_builds : Chained('job') PathPart('') CaptureArgs(0) {
|
||||||
$c->stash->{allBuilds} =
|
$c->stash->{allBuilds} =
|
||||||
$c->stash->{jobset}->builds->search({job => $c->stash->{jobName}});
|
$c->stash->{jobset}->builds->search({job => $c->stash->{jobName}});
|
||||||
$c->stash->{channelBaseName} =
|
$c->stash->{channelBaseName} =
|
||||||
$c->stash->{curProject}->name . "-" . $c->stash->{jobName};
|
$c->stash->{curProject}->name . "-" . $c->stash->{jobset}->name . "-" . $c->stash->{jobName};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
39
src/lib/Hydra/Controller/Jobset.pm
Normal file
39
src/lib/Hydra/Controller/Jobset.pm
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
package Hydra::Controller::Jobset;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use base 'Hydra::Base::Controller::ListBuilds';
|
||||||
|
use Hydra::Helper::Nix;
|
||||||
|
use Hydra::Helper::CatalystUtils;
|
||||||
|
|
||||||
|
|
||||||
|
sub jobset : Chained('/') PathPart('jobset') CaptureArgs(2) {
|
||||||
|
my ($self, $c, $projectName, $jobsetName) = @_;
|
||||||
|
|
||||||
|
my $project = $c->model('DB::Projects')->find($projectName)
|
||||||
|
or notFound($c, "Project $projectName doesn't exist.");
|
||||||
|
|
||||||
|
$c->stash->{curProject} = $project;
|
||||||
|
|
||||||
|
$c->stash->{jobset} = $project->jobsets->find({name => $jobsetName})
|
||||||
|
or notFound($c, "Jobset $jobsetName doesn't exist.");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub index : Chained('jobset') PathPart('') Args(0) {
|
||||||
|
my ($self, $c) = @_;
|
||||||
|
$c->go($self->action_for("all"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Hydra::Base::Controller::ListBuilds needs this.
|
||||||
|
sub get_builds : Chained('jobset') PathPart('') CaptureArgs(0) {
|
||||||
|
my ($self, $c) = @_;
|
||||||
|
$c->stash->{allBuilds} =
|
||||||
|
$c->stash->{jobset}->builds;
|
||||||
|
$c->stash->{channelBaseName} =
|
||||||
|
$c->stash->{curProject}->name . "-" . $c->stash->{jobset}->name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
1;
|
|
@ -2,8 +2,9 @@
|
||||||
[% PROCESS common.tt %]
|
[% PROCESS common.tt %]
|
||||||
|
|
||||||
<h1>All Builds
|
<h1>All Builds
|
||||||
[% IF jobName %]for Job [% curProject.name %]:[% jobset.name %]:[% jobName %][% ELSE %]
|
[% IF jobName %]for Job [% curProject.name %]:[% jobset.name %]:[% jobName %]
|
||||||
[% IF curProject %] for Project <tt>[% curProject.name %]</tt>[% END %][% END %]</h1>
|
[% ELSIF jobset %]for Jobset [% curProject.name %]:[% jobset.name %]
|
||||||
|
[% ELSIF curProject %] for Project <tt>[% curProject.name %]</tt>[% END %]</h1>
|
||||||
|
|
||||||
<p>Showing builds [% (page - 1) * resultsPerPage + 1 %] - [% (page - 1) * resultsPerPage + builds.size %]
|
<p>Showing builds [% (page - 1) * resultsPerPage + 1 %] - [% (page - 1) * resultsPerPage + builds.size %]
|
||||||
out of [% totalBuilds %] in order of descending timestamp.</p>
|
out of [% totalBuilds %] in order of descending timestamp.</p>
|
||||||
|
|
Loading…
Reference in a new issue