jobsets: put hidden and enabled jobsets at the end

Allows for generally correct zebra striping
This commit is contained in:
Graham Christensen 2021-03-25 18:16:17 -04:00 committed by Graham Christensen
parent a46f655c56
commit cc9c91fe12

View file

@ -113,7 +113,7 @@ sub registerRoot {
sub jobsetOverview_ { sub jobsetOverview_ {
my ($c, $jobsets) = @_; my ($c, $jobsets) = @_;
return $jobsets->search({}, return $jobsets->search({},
{ order_by => "name" { order_by => ["hidden ASC", "enabled DESC", "name"]
, "+select" => , "+select" =>
[ "(select count(*) from Builds as a where a.finished = 0 and me.project = a.project and me.name = a.jobset and a.isCurrent = 1)" [ "(select count(*) from Builds as a where a.finished = 0 and me.project = a.project and me.name = a.jobset and a.isCurrent = 1)"
, "(select count(*) from Builds as a where a.finished = 1 and me.project = a.project and me.name = a.jobset and buildstatus <> 0 and a.isCurrent = 1)" , "(select count(*) from Builds as a where a.finished = 1 and me.project = a.project and me.name = a.jobset and buildstatus <> 0 and a.isCurrent = 1)"