parent
627e681e74
commit
72e5c07da1
|
@ -209,15 +209,15 @@ SQL;
|
|||
*/
|
||||
protected function joinHostgroups()
|
||||
{
|
||||
$this->select->join(
|
||||
$this->select->joinLeft(
|
||||
array('hgm' => $this->prefix . 'hostgroup_members'),
|
||||
'hgm.host_object_id = ho.object_id',
|
||||
array()
|
||||
)->join(
|
||||
)->joinLeft(
|
||||
array('hg' => $this->prefix . 'hostgroups'),
|
||||
'hg.hostgroup_id = hgm.hostgroup_id',
|
||||
array()
|
||||
)->join(
|
||||
)->joinLeft(
|
||||
array('hgo' => $this->prefix . 'objects'),
|
||||
'hgo.object_id = hg.hostgroup_object_id AND hgo.is_active = 1 AND hgo.objecttype_id = 3',
|
||||
array()
|
||||
|
@ -291,15 +291,15 @@ SQL;
|
|||
protected function joinServicegroups()
|
||||
{
|
||||
$this->requireVirtualTable('services');
|
||||
$this->select->join(
|
||||
$this->select->joinLeft(
|
||||
array('sgm' => $this->prefix . 'servicegroup_members'),
|
||||
'sgm.service_object_id = s.service_object_id',
|
||||
array()
|
||||
)->join(
|
||||
)->joinLeft(
|
||||
array('sg' => $this->prefix . 'servicegroups'),
|
||||
'sgm.servicegroup_id = sg.' . $this->servicegroup_id,
|
||||
array()
|
||||
)->join(
|
||||
)->joinLeft(
|
||||
array('sgo' => $this->prefix . 'objects'),
|
||||
'sgo.object_id = sg.servicegroup_object_id AND sgo.is_active = 1 AND sgo.objecttype_id = 4',
|
||||
array()
|
||||
|
@ -313,11 +313,11 @@ SQL;
|
|||
protected function joinServices()
|
||||
{
|
||||
$this->requireVirtualTable('hosts');
|
||||
$this->select->join(
|
||||
$this->select->joinLeft(
|
||||
array('s' => $this->prefix . 'services'),
|
||||
's.host_object_id = h.host_object_id',
|
||||
array()
|
||||
)->join(
|
||||
)->joinLeft(
|
||||
array('so' => $this->prefix . 'objects'),
|
||||
'so.object_id = s.service_object_id AND so.is_active = 1 AND so.objecttype_id = 2',
|
||||
array()
|
||||
|
|
Loading…
Reference in New Issue