Fix that ghost groups are shown in the host- and servicegroup summary

fixes #9454
refs #9458
This commit is contained in:
Johannes Meyer 2015-06-19 14:08:32 +02:00
parent 3b05c62575
commit 5166ede38f
2 changed files with 4 additions and 0 deletions

View File

@ -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());

View File

@ -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());