ServicegroupQuery: Really join hosts if instructed to do so
fixes #3983
This commit is contained in:
parent
8d2970a18e
commit
8e51518e96
|
@ -33,4 +33,15 @@ class EmptyservicegroupQuery extends ServicegroupQuery
|
|||
$this->select->group(['sgo.object_id', 'sg.servicegroup_id']);
|
||||
$this->select->having('COUNT(esgm.servicegroup_member_id) = ?', 0);
|
||||
}
|
||||
|
||||
protected function joinHosts()
|
||||
{
|
||||
parent::joinHosts();
|
||||
|
||||
$this->select->joinLeft(
|
||||
['h' => 'icinga_hosts'],
|
||||
'h.host_object_id = s.host_object_id',
|
||||
[]
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue