monitoring: Rearrange code in the HostdowntimestarthistoryQuery

refs #9956
This commit is contained in:
Eric Lippmann 2015-09-29 23:04:01 +02:00
parent 956c86dcdb
commit 185c0b43be
1 changed files with 15 additions and 15 deletions

View File

@ -27,9 +27,6 @@ class HostdowntimestarthistoryQuery extends IdoQuery
* {@inheritdoc}
*/
protected $columnMap = array(
'instances' => array(
'instance_name' => 'i.instance_name'
),
'downtimehistory' => array(
'host' => 'ho.name1 COLLATE latin1_general_ci',
'host_name' => 'ho.name1',
@ -49,6 +46,9 @@ class HostdowntimestarthistoryQuery extends IdoQuery
'host_alias' => 'h.alias',
'host_display_name' => 'h.display_name COLLATE latin1_general_ci'
),
'instances' => array(
'instance_name' => 'i.instance_name'
),
'servicegroups' => array(
'servicegroup' => 'sgo.name1 COLLATE latin1_general_ci',
'servicegroup_name' => 'sgo.name1',
@ -132,6 +132,18 @@ class HostdowntimestarthistoryQuery extends IdoQuery
);
}
/**
* Join instances
*/
protected function joinInstances()
{
$this->select->join(
array('i' => $this->prefix . 'instances'),
'i.instance_id = hdh.instance_id',
array()
);
}
/**
* Join service groups
*/
@ -168,16 +180,4 @@ class HostdowntimestarthistoryQuery extends IdoQuery
array()
);
}
/**
* Join instances
*/
protected function joinInstances()
{
$this->select->join(
array('i' => $this->prefix . 'instances'),
'i.instance_id = hdh.instance_id',
array()
);
}
}