Skip to content

Commit

Permalink
monitoring: Rearrange code in the ContactgroupQuery
Browse files Browse the repository at this point in the history
refs #9956
  • Loading branch information
lippserd committed Sep 29, 2015
1 parent a9588c9 commit c597a67
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 ContactgroupQuery extends IdoQuery
* {@inheritdoc}
*/
protected $columnMap = array(
'instances' => array(
'instance_name' => 'i.instance_name'
),
'contactgroups' => array(
'contactgroup' => 'cgo.name1 COLLATE latin1_general_ci',
'contactgroup_name' => 'cgo.name1',
Expand Down Expand Up @@ -69,6 +66,9 @@ class ContactgroupQuery 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 @@ -159,6 +159,18 @@ protected function joinHosts()
);
}

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

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

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

0 comments on commit c597a67

Please sign in to comment.