From f7e2c4c0193d8b8c42240eb4cd100543a6a5ff76 Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Tue, 26 Nov 2024 14:35:39 +0100 Subject: [PATCH] Models: Add missing `parent & child` relation --- library/Icingadb/Model/Hostgroup.php | 4 +++- library/Icingadb/Model/Servicegroup.php | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/library/Icingadb/Model/Hostgroup.php b/library/Icingadb/Model/Hostgroup.php index 1ff6f0fba..a5477f5d7 100644 --- a/library/Icingadb/Model/Hostgroup.php +++ b/library/Icingadb/Model/Hostgroup.php @@ -71,7 +71,9 @@ public function getDefaultSort() public function createBehaviors(Behaviors $behaviors) { $behaviors->add(new ReRoute([ - 'servicegroup' => 'service.servicegroup' + 'servicegroup' => 'service.servicegroup', + 'parent' => 'host.from.to', + 'child' => 'host.to.from' ])); $behaviors->add(new Binary([ diff --git a/library/Icingadb/Model/Servicegroup.php b/library/Icingadb/Model/Servicegroup.php index 2e4b847b5..852114939 100644 --- a/library/Icingadb/Model/Servicegroup.php +++ b/library/Icingadb/Model/Servicegroup.php @@ -72,7 +72,9 @@ public function createBehaviors(Behaviors $behaviors) { $behaviors->add(new ReRoute([ 'host' => 'service.host', - 'hostgroup' => 'service.hostgroup' + 'hostgroup' => 'service.hostgroup', + 'parent' => 'service.from.to', + 'child' => 'service.to.from' ])); $behaviors->add(new Binary([