monitoring: Rearrange code in the ServicecommenthistoryQuery

refs #9956
This commit is contained in:
Eric Lippmann 2015-09-29 22:37:26 +02:00
parent 1f040df1e9
commit 041c72bb6c
1 changed files with 15 additions and 15 deletions

View File

@ -27,9 +27,6 @@ class ServicecommenthistoryQuery extends IdoQuery
* {@inheritdoc}
*/
protected $columnMap = array(
'instances' => array(
'instance_name' => 'i.instance_name'
),
'commenthistory' => array(
'host' => 'so.name1 COLLATE latin1_general_ci',
'host_name' => 'so.name1',
@ -53,6 +50,9 @@ class ServicecommenthistoryQuery 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',
@ -125,6 +125,18 @@ class ServicecommenthistoryQuery extends IdoQuery
);
}
/**
* Join instances
*/
protected function joinInstances()
{
$this->select->join(
array('i' => $this->prefix . 'instances'),
'i.instance_id = sch.instance_id',
array()
);
}
/**
* Join service groups
*/
@ -156,16 +168,4 @@ class ServicecommenthistoryQuery extends IdoQuery
array()
);
}
/**
* Join instances
*/
protected function joinInstances()
{
$this->select->join(
array('i' => $this->prefix . 'instances'),
'i.instance_id = sch.instance_id',
array()
);
}
}