diff --git a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicedowntimeQuery.php b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicedowntimeQuery.php index a21be690e..d9cc7ca44 100644 --- a/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicedowntimeQuery.php +++ b/modules/monitoring/library/Monitoring/Backend/Ido/Query/ServicedowntimeQuery.php @@ -27,9 +27,6 @@ class ServicedowntimeQuery 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', @@ -65,6 +62,9 @@ class ServicedowntimeQuery 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', @@ -140,6 +140,18 @@ class ServicedowntimeQuery 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 */ @@ -183,16 +195,4 @@ class ServicedowntimeQuery extends IdoQuery array() ); } - - /** - * Join instances - */ - protected function joinInstances() - { - $this->select->join( - array('i' => $this->prefix . 'instances'), - 'i.instance_id = sd.instance_id', - array() - ); - } }