monitoring: Rearrange code in the ServicedowntimestarthistoryQuery
refs #9956
This commit is contained in:
parent
aa76925f69
commit
c4ac3cbc1a
|
@ -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()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue