IcingaServiceTable: order by whether it has...
...a command and is therefore candidate for apply rules. Sort by object name afterwards
This commit is contained in:
parent
bd41d9d6a6
commit
fe308a3ee6
|
@ -105,7 +105,8 @@ class IcingaServiceTable extends QuickTable
|
||||||
array('i' => 'icinga_service_inheritance'),
|
array('i' => 'icinga_service_inheritance'),
|
||||||
'i.service_id = s.id',
|
'i.service_id = s.id',
|
||||||
array()
|
array()
|
||||||
)->where('i.parent_service_id = ?', $id)->where('s.object_type = ?', 'apply');
|
)->where('i.parent_service_id = ?', $id)
|
||||||
|
->where('s.object_type = ?', 'apply');
|
||||||
|
|
||||||
return $db->fetchPairs($query);
|
return $db->fetchPairs($query);
|
||||||
}
|
}
|
||||||
|
@ -115,6 +116,7 @@ class IcingaServiceTable extends QuickTable
|
||||||
return $this->getUnfilteredQuery()->where(
|
return $this->getUnfilteredQuery()->where(
|
||||||
's.object_type IN (?)',
|
's.object_type IN (?)',
|
||||||
array('template')
|
array('template')
|
||||||
);
|
)->order('CASE WHEN s.check_command_id IS NULL THEN 1 ELSE 0 END')
|
||||||
|
->order('s.object_name');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue