From 5166ede38f1d9f3d228f6bbe1cf5f3241b6b19ff Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Fri, 19 Jun 2015 14:08:32 +0200 Subject: [PATCH] Fix that ghost groups are shown in the host- and servicegroup summary fixes #9454 refs #9458 --- .../Monitoring/Backend/Ido/Query/HostgroupsummaryQuery.php | 2 ++ .../Monitoring/Backend/Ido/Query/ServicegroupsummaryQuery.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostgroupsummaryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostgroupsummaryQuery.php index e3524fc58..b35f50a19 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostgroupsummaryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostgroupsummaryQuery.php @@ -96,6 +96,7 @@ class HostgroupsummaryQuery extends IdoQuery 'state_change' => 'host_last_state_change' ) ); + $hosts->select()->where('hgo.name1 IS NOT NULL'); // TODO(9458): Should be possible using our filters! $this->subQueries[] = $hosts; $services = $this->createSubQuery( 'Servicestatus', @@ -110,6 +111,7 @@ class HostgroupsummaryQuery extends IdoQuery 'state_change' => 'service_last_state_change' ) ); + $services->select()->where('hgo.name1 IS NOT NULL'); // TODO(9458): Should be possible using our filters! $this->subQueries[] = $services; $this->summaryQuery = $this->db->select()->union(array($hosts, $services), Zend_Db_Select::SQL_UNION_ALL); $this->select->from(array('statussummary' => $this->summaryQuery), array()); diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupsummaryQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupsummaryQuery.php index f7519edc7..a4c763562 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupsummaryQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupsummaryQuery.php @@ -88,6 +88,7 @@ class ServicegroupsummaryQuery extends IdoQuery 'state_change' => 'host_last_state_change' ) ); + $hosts->select()->where('sgo.name1 IS NOT NULL'); // TODO(9458): Should be possible using our filters! $this->subQueries[] = $hosts; $services = $this->createSubQuery( 'Servicestatus', @@ -102,6 +103,7 @@ class ServicegroupsummaryQuery extends IdoQuery 'state_change' => 'service_last_state_change' ) ); + $services->select()->where('sgo.name1 IS NOT NULL'); // TODO(9458): Should be possible using our filters! $this->subQueries[] = $services; $this->summaryQuery = $this->db->select()->union(array($hosts, $services), Zend_Db_Select::SQL_UNION_ALL); $this->select->from(array('statussummary' => $this->summaryQuery), array());