mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
Merge pull request #4424 from Icinga/fix/group-views-not-showing-all-objects-with-mixed-group-filters-4404
Fix group views not showing all objects with mixed group filters
This commit is contained in:
commit
9a58e6f43c
@ -225,15 +225,15 @@ class HostgroupQuery extends IdoQuery
|
|||||||
protected function joinServicegroups()
|
protected function joinServicegroups()
|
||||||
{
|
{
|
||||||
$this->requireVirtualTable('services');
|
$this->requireVirtualTable('services');
|
||||||
$this->select->join(
|
$this->select->joinLeft(
|
||||||
array('sgm' => $this->prefix . 'servicegroup_members'),
|
array('sgm' => $this->prefix . 'servicegroup_members'),
|
||||||
'sgm.service_object_id = s.service_object_id',
|
'sgm.service_object_id = s.service_object_id',
|
||||||
array()
|
array()
|
||||||
)->join(
|
)->joinLeft(
|
||||||
array('sg' => $this->prefix . 'servicegroups'),
|
array('sg' => $this->prefix . 'servicegroups'),
|
||||||
'sgm.servicegroup_id = sg.servicegroup_id',
|
'sgm.servicegroup_id = sg.servicegroup_id',
|
||||||
array()
|
array()
|
||||||
)->join(
|
)->joinLeft(
|
||||||
array('sgo' => $this->prefix . 'objects'),
|
array('sgo' => $this->prefix . 'objects'),
|
||||||
'sgo.object_id = sg.servicegroup_object_id AND sgo.is_active = 1 AND sgo.objecttype_id = 4',
|
'sgo.object_id = sg.servicegroup_object_id AND sgo.is_active = 1 AND sgo.objecttype_id = 4',
|
||||||
array()
|
array()
|
||||||
@ -246,11 +246,11 @@ class HostgroupQuery extends IdoQuery
|
|||||||
protected function joinServices()
|
protected function joinServices()
|
||||||
{
|
{
|
||||||
$this->requireVirtualTable('hosts');
|
$this->requireVirtualTable('hosts');
|
||||||
$this->select->join(
|
$this->select->joinLeft(
|
||||||
array('s' => $this->prefix . 'services'),
|
array('s' => $this->prefix . 'services'),
|
||||||
's.host_object_id = h.host_object_id',
|
's.host_object_id = h.host_object_id',
|
||||||
array()
|
array()
|
||||||
)->join(
|
)->joinLeft(
|
||||||
array('so' => $this->prefix . 'objects'),
|
array('so' => $this->prefix . 'objects'),
|
||||||
'so.object_id = s.service_object_id AND so.is_active = 1 AND so.objecttype_id = 2',
|
'so.object_id = s.service_object_id AND so.is_active = 1 AND so.objecttype_id = 2',
|
||||||
array()
|
array()
|
||||||
|
@ -192,15 +192,15 @@ class ServicegroupQuery extends IdoQuery
|
|||||||
protected function joinHostgroups()
|
protected function joinHostgroups()
|
||||||
{
|
{
|
||||||
$this->requireVirtualTable('services');
|
$this->requireVirtualTable('services');
|
||||||
$this->select->join(
|
$this->select->joinLeft(
|
||||||
array('hgm' => $this->prefix . 'hostgroup_members'),
|
array('hgm' => $this->prefix . 'hostgroup_members'),
|
||||||
'hgm.host_object_id = s.host_object_id',
|
'hgm.host_object_id = s.host_object_id',
|
||||||
array()
|
array()
|
||||||
)->join(
|
)->joinLeft(
|
||||||
array('hg' => $this->prefix . 'hostgroups'),
|
array('hg' => $this->prefix . 'hostgroups'),
|
||||||
'hg.hostgroup_id = hgm.hostgroup_id',
|
'hg.hostgroup_id = hgm.hostgroup_id',
|
||||||
array()
|
array()
|
||||||
)->join(
|
)->joinLeft(
|
||||||
array('hgo' => $this->prefix . 'objects'),
|
array('hgo' => $this->prefix . 'objects'),
|
||||||
'hgo.object_id = hg.hostgroup_object_id AND hgo.objecttype_id = 3 AND hgo.is_active = 1',
|
'hgo.object_id = hg.hostgroup_object_id AND hgo.objecttype_id = 3 AND hgo.is_active = 1',
|
||||||
array()
|
array()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user