Flip base tables in HoststatusQuery
This has no performance impact but all our queries should start w/ select from icinga_objects.
This commit is contained in:
parent
370d148072
commit
9b529bcd15
|
@ -175,17 +175,16 @@ class HoststatusQuery extends IdoQuery
|
||||||
if (version_compare($this->getIdoVersion(), '1.10.0', '<')) {
|
if (version_compare($this->getIdoVersion(), '1.10.0', '<')) {
|
||||||
$this->columnMap['hoststatus']['host_check_source'] = '(NULL)';
|
$this->columnMap['hoststatus']['host_check_source'] = '(NULL)';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version_compare($this->getIdoVersion(), '1.13.0', '<')) {
|
if (version_compare($this->getIdoVersion(), '1.13.0', '<')) {
|
||||||
$this->columnMap['hoststatus']['host_is_reachable'] = '(NULL)';
|
$this->columnMap['hoststatus']['host_is_reachable'] = '(NULL)';
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->select->from(
|
$this->select->from(
|
||||||
array('h' => $this->prefix . 'hosts'),
|
array('ho' => $this->prefix . 'objects'),
|
||||||
array()
|
array()
|
||||||
)->join(
|
)->join(
|
||||||
array('ho' => $this->prefix . 'objects'),
|
array('h' => $this->prefix . 'hosts'),
|
||||||
'ho.object_id = h.host_object_id AND ho.is_active = 1 AND ho.objecttype_id = 1',
|
'h.host_object_id = ho.object_id AND ho.is_active = 1 AND ho.objecttype_id = 1',
|
||||||
array()
|
array()
|
||||||
);
|
);
|
||||||
$this->joinedVirtualTables['hosts'] = true;
|
$this->joinedVirtualTables['hosts'] = true;
|
||||||
|
|
Loading…
Reference in New Issue