mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
Fix that ghost groups are shown in the host- and servicegroup summary
fixes #9454 refs #9458
This commit is contained in:
parent
3b05c62575
commit
5166ede38f
@ -96,6 +96,7 @@ class HostgroupsummaryQuery extends IdoQuery
|
|||||||
'state_change' => 'host_last_state_change'
|
'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;
|
$this->subQueries[] = $hosts;
|
||||||
$services = $this->createSubQuery(
|
$services = $this->createSubQuery(
|
||||||
'Servicestatus',
|
'Servicestatus',
|
||||||
@ -110,6 +111,7 @@ class HostgroupsummaryQuery extends IdoQuery
|
|||||||
'state_change' => 'service_last_state_change'
|
'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->subQueries[] = $services;
|
||||||
$this->summaryQuery = $this->db->select()->union(array($hosts, $services), Zend_Db_Select::SQL_UNION_ALL);
|
$this->summaryQuery = $this->db->select()->union(array($hosts, $services), Zend_Db_Select::SQL_UNION_ALL);
|
||||||
$this->select->from(array('statussummary' => $this->summaryQuery), array());
|
$this->select->from(array('statussummary' => $this->summaryQuery), array());
|
||||||
|
@ -88,6 +88,7 @@ class ServicegroupsummaryQuery extends IdoQuery
|
|||||||
'state_change' => 'host_last_state_change'
|
'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;
|
$this->subQueries[] = $hosts;
|
||||||
$services = $this->createSubQuery(
|
$services = $this->createSubQuery(
|
||||||
'Servicestatus',
|
'Servicestatus',
|
||||||
@ -102,6 +103,7 @@ class ServicegroupsummaryQuery extends IdoQuery
|
|||||||
'state_change' => 'service_last_state_change'
|
'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->subQueries[] = $services;
|
||||||
$this->summaryQuery = $this->db->select()->union(array($hosts, $services), Zend_Db_Select::SQL_UNION_ALL);
|
$this->summaryQuery = $this->db->select()->union(array($hosts, $services), Zend_Db_Select::SQL_UNION_ALL);
|
||||||
$this->select->from(array('statussummary' => $this->summaryQuery), array());
|
$this->select->from(array('statussummary' => $this->summaryQuery), array());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user