From df69755056bf490df17cbf1d402e09fece053b2b Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 29 Sep 2015 22:54:45 +0200 Subject: [PATCH] monitoring: Rearrange code in the ServicegroupQuery refs #9956 --- .../Backend/Ido/Query/ServicegroupQuery.php | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupQuery.php index bf4bca20a..254280a51 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicegroupQuery.php @@ -24,9 +24,6 @@ class ServicegroupQuery extends IdoQuery * {@inheritdoc} */ protected $columnMap = array( - 'instances' => array( - 'instance_name' => 'i.instance_name' - ), 'hostgroups' => array( 'hostgroup' => 'hgo.name1 COLLATE latin1_general_ci', 'hostgroup_alias' => 'hg.alias COLLATE latin1_general_ci', @@ -36,6 +33,9 @@ class ServicegroupQuery 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_alias' => 'sg.alias COLLATE latin1_general_ci', @@ -102,6 +102,18 @@ class ServicegroupQuery extends IdoQuery ); } + /** + * Join instances + */ + protected function joinInstances() + { + $this->select->join( + array('i' => $this->prefix . 'instances'), + 'i.instance_id = sg.instance_id', + array() + ); + } + /** * Join service objects */ @@ -130,16 +142,4 @@ class ServicegroupQuery extends IdoQuery array() ); } - - /** - * Join instances - */ - protected function joinInstances() - { - $this->select->join( - array('i' => $this->prefix . 'instances'), - 'i.instance_id = sg.instance_id', - array() - ); - } }