monitoring: Rearrange code in the ServicedowntimestarthistoryQuery

refs #9956
This commit is contained in:
Eric Lippmann 2015-09-30 09:33:10 +02:00
parent aa76925f69
commit c4ac3cbc1a
1 changed files with 15 additions and 15 deletions

View File

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