From 08965898e956524a66336781db3c0f3177d073db Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Tue, 29 Sep 2015 22:39:01 +0200 Subject: [PATCH] monitoring: Rearrange code in the HostdowntimeQuery refs #9956 --- .../Backend/Ido/Query/HostdowntimeQuery.php | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostdowntimeQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostdowntimeQuery.php index c6ffc4aee..95b61198c 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostdowntimeQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/HostdowntimeQuery.php @@ -17,9 +17,6 @@ class HostdowntimeQuery extends IdoQuery * {@inheritdoc} */ protected $columnMap = array( - 'instances' => array( - 'instance_name' => 'i.instance_name' - ), 'downtimes' => array( 'downtime_author' => 'sd.author_name COLLATE latin1_general_ci', 'downtime_author_name' => 'sd.author_name', @@ -51,6 +48,9 @@ class HostdowntimeQuery extends IdoQuery 'hoststatus' => array( 'host_state' => 'CASE WHEN hs.has_been_checked = 0 OR hs.has_been_checked IS NULL THEN 99 ELSE hs.current_state END' ), + 'instances' => array( + 'instance_name' => 'i.instance_name' + ), 'servicegroups' => array( 'servicegroup' => 'sgo.name1 COLLATE latin1_general_ci', 'servicegroup_name' => 'sgo.name1', @@ -123,6 +123,18 @@ class HostdowntimeQuery extends IdoQuery ); } + /** + * Join instances + */ + protected function joinInstances() + { + $this->select->join( + array('i' => $this->prefix . 'instances'), + 'i.instance_id = sd.instance_id', + array() + ); + } + /** * Join service groups */ @@ -160,18 +172,6 @@ class HostdowntimeQuery extends IdoQuery ); } - /** - * Join instances - */ - protected function joinInstances() - { - $this->select->join( - array('i' => $this->prefix . 'instances'), - 'i.instance_id = sd.instance_id', - array() - ); - } - /** * {@inheritdoc} */