hydra: in jobstatus pages, allow maintainer query argument to show only the packages you are maintaining
This commit is contained in:
parent
526ffb7eef
commit
822ca9c29e
|
@ -9,11 +9,13 @@ use Hydra::Helper::CatalystUtils;
|
||||||
|
|
||||||
sub getJobStatus {
|
sub getJobStatus {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
|
|
||||||
my $latest = joinWithResultInfo($c, $c->stash->{jobStatus});
|
my $latest = joinWithResultInfo($c, $c->stash->{jobStatus});
|
||||||
|
|
||||||
|
my $maintainer = $c->request->params->{"maintainer"};
|
||||||
|
|
||||||
$latest = $latest->search(
|
$latest = $latest->search(
|
||||||
{},
|
defined $maintainer ? { maintainers => { like => "%$maintainer%" } } : {},
|
||||||
{ '+select' => ["me.statusChangeId", "me.statusChangeTime"]
|
{ '+select' => ["me.statusChangeId", "me.statusChangeTime"]
|
||||||
, '+as' => ["statusChangeId", "statusChangeTime"]
|
, '+as' => ["statusChangeId", "statusChangeTime"]
|
||||||
, order_by => "coalesce(statusChangeTime, 0) desc"
|
, order_by => "coalesce(statusChangeTime, 0) desc"
|
||||||
|
@ -22,7 +24,6 @@ sub getJobStatus {
|
||||||
return $latest;
|
return $latest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub jobstatus : Chained('get_builds') PathPart Args(0) {
|
sub jobstatus : Chained('get_builds') PathPart Args(0) {
|
||||||
my ($self, $c) = @_;
|
my ($self, $c) = @_;
|
||||||
$c->stash->{template} = 'jobstatus.tt';
|
$c->stash->{template} = 'jobstatus.tt';
|
||||||
|
|
Loading…
Reference in a new issue