hydra: order machines by enabled/disabled, add green and red color for enabled/disabled

This commit is contained in:
Rob Vermaas
2010-10-21 14:37:03 +00:00
parent 7cd219bcbc
commit 0f1c580731
2 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ sub index : Chained('admin') PathPart('') Args(0) {
my ($self, $c) = @_;
$c->stash->{machines} = [$c->model('DB::BuildMachines')->search(
{},
{ order_by => "hostname"
{ order_by => ["enabled DESC", "hostname"]
, '+select' => ["(select bs.stoptime from buildsteps as bs where bs.machine = (me.username || '\@' || me.hostname) and not bs.stoptime is null order by bs.stoptime desc limit 1)"]
, '+as' => ['idle']
})];