From ff5ebdab534348d6363322a7b516241cf7927614 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Fri, 18 Dec 2015 15:52:02 +0100 Subject: [PATCH] IcingaService: command_endpoint fix for use_agent --- library/Director/Objects/IcingaService.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/library/Director/Objects/IcingaService.php b/library/Director/Objects/IcingaService.php index 97234454..9d1f540b 100644 --- a/library/Director/Objects/IcingaService.php +++ b/library/Director/Objects/IcingaService.php @@ -80,13 +80,13 @@ class IcingaService extends IcingaObject return $this->renderRelationProperty('host', $this->host_id, 'host_name'); } - public function renderCommand_endpoint_id() + protected function renderCustomExtensions() { - if ($this->use_agent === 'y') { - return $this->renderHost_id(); - } + if ($this->command_endpoint_id !== null) return ''; + if ($this->object_type !== 'object') return ''; + if ($this->getResolvedProperty('use_agent') !== 'y') return ''; - return $this->renderRelationProperty('command_endpoint', $this->command_endpoint_id); + return $this->renderRelationProperty('host', $this->host_id, 'command_endpoint'); } public function renderUse_agent()