diff --git a/library/Icingadb/Model/Hostgroupsummary.php b/library/Icingadb/Model/Hostgroupsummary.php index 8c050ce6e..68c4a3e6b 100644 --- a/library/Icingadb/Model/Hostgroupsummary.php +++ b/library/Icingadb/Model/Hostgroupsummary.php @@ -99,22 +99,6 @@ public function getDefaultSort() public function getUnions() { $unions = [ - [ - Hostgroup::class, - [], - [ - 'hostgroup_id' => 'hostgroup.id', - 'hostgroup_name' => 'hostgroup.name', - 'hostgroup_display_name' => 'hostgroup.display_name', - 'host_id' => new Expression('NULL'), - 'host_state' => new Expression('NULL'), - 'host_handled' => new Expression('NULL'), - 'host_severity' => new Expression('0'), - 'service_id' => new Expression('NULL'), - 'service_state' => new Expression('NULL'), - 'service_handled' => new Expression('NULL') - ] - ], [ Host::class, [ @@ -152,6 +136,22 @@ public function getUnions() 'service_state' => 'state.soft_state', 'service_handled' => 'state.is_handled' ] + ], + [ + Hostgroup::class, + [], + [ + 'hostgroup_id' => 'hostgroup.id', + 'hostgroup_name' => 'hostgroup.name', + 'hostgroup_display_name' => 'hostgroup.display_name', + 'host_id' => new Expression('NULL'), + 'host_state' => new Expression('NULL'), + 'host_handled' => new Expression('NULL'), + 'host_severity' => new Expression('0'), + 'service_id' => new Expression('NULL'), + 'service_state' => new Expression('NULL'), + 'service_handled' => new Expression('NULL') + ] ] ]; diff --git a/library/Icingadb/Model/ServicegroupSummary.php b/library/Icingadb/Model/ServicegroupSummary.php index f434a9787..1b5232ce3 100644 --- a/library/Icingadb/Model/ServicegroupSummary.php +++ b/library/Icingadb/Model/ServicegroupSummary.php @@ -75,19 +75,6 @@ public function getDefaultSort() public function getUnions() { $unions = [ - [ - Servicegroup::class, - [], - [ - 'servicegroup_id' => 'servicegroup.id', - 'servicegroup_name' => 'servicegroup.name', - 'servicegroup_display_name' => 'servicegroup.display_name', - 'service_id' => new Expression('NULL'), - 'service_state' => new Expression('NULL'), - 'service_handled' => new Expression('NULL'), - 'service_severity' => new Expression('0') - ] - ], [ Service::class, [ @@ -103,6 +90,19 @@ public function getUnions() 'service_handled' => 'state.is_handled', 'service_severity' => 'state.severity' ] + ], + [ + Servicegroup::class, + [], + [ + 'servicegroup_id' => 'servicegroup.id', + 'servicegroup_name' => 'servicegroup.name', + 'servicegroup_display_name' => 'servicegroup.display_name', + 'service_id' => new Expression('NULL'), + 'service_state' => new Expression('NULL'), + 'service_handled' => new Expression('NULL'), + 'service_severity' => new Expression('0') + ] ] ];