Skip to content

Commit

Permalink
monitoring: Rearrange code in the HostcommenthistoryQuery
Browse files Browse the repository at this point in the history
refs #9956
  • Loading branch information
lippserd committed Sep 29, 2015
1 parent cd52189 commit 3623cf5
Showing 1 changed file with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down Expand Up @@ -122,6 +122,18 @@ protected function joinHosts()
);
}

/**
* Join instances
*/
protected function joinInstances()
{
$this->select->join(
array('i' => $this->prefix . 'instances'),
'i.instance_id = hch.instance_id',
array()
);
}

/**
* Join service groups
*/
Expand Down Expand Up @@ -158,16 +170,4 @@ protected function joinServices()
array()
);
}

/**
* Join instances
*/
protected function joinInstances()
{
$this->select->join(
array('i' => $this->prefix . 'instances'),
'i.instance_id = hch.instance_id',
array()
);
}
}

0 comments on commit 3623cf5

Please sign in to comment.