monitoring: Rearrange code in the HostcommenthistoryQuery

refs #9956
This commit is contained in:
Eric Lippmann 2015-09-29 22:25:45 +02:00
parent cd521891ae
commit 3623cf5196
1 changed files with 15 additions and 15 deletions

View File

@ -27,9 +27,6 @@ class HostcommenthistoryQuery extends IdoQuery
* {@inheritdoc}
*/
protected $columnMap = array(
'instances' => array(
'instance_name' => 'i.instance_name'
),
'commenthistory' => array(
'host' => 'ho.name1 COLLATE latin1_general_ci',
'host_name' => 'ho.name1',
@ -49,6 +46,9 @@ class HostcommenthistoryQuery 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',
@ -122,6 +122,18 @@ class HostcommenthistoryQuery extends IdoQuery
);
}
/**
* Join instances
*/
protected function joinInstances()
{
$this->select->join(
array('i' => $this->prefix . 'instances'),
'i.instance_id = hch.instance_id',
array()
);
}
/**
* Join service groups
*/
@ -158,16 +170,4 @@ class HostcommenthistoryQuery extends IdoQuery
array()
);
}
/**
* Join instances
*/
protected function joinInstances()
{
$this->select->join(
array('i' => $this->prefix . 'instances'),
'i.instance_id = hch.instance_id',
array()
);
}
}