From e803385673af92a021159a8362aa5dfd20eaae8c Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 22 Mar 2016 03:12:15 +0100 Subject: [PATCH] IcingaService: fix command endpoint when... ...assigned by template --- library/Director/Objects/IcingaService.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/Director/Objects/IcingaService.php b/library/Director/Objects/IcingaService.php index 2d9deb3d..27168d1f 100644 --- a/library/Director/Objects/IcingaService.php +++ b/library/Director/Objects/IcingaService.php @@ -168,7 +168,11 @@ class IcingaService extends IcingaObject return ''; } - return $this->renderRelationProperty('host', $this->host_id, 'command_endpoint'); + if ($this->hasBeenAssignedToHostTemplate()) { + return c::renderKeyValue('command_endpoint', 'host.name'); + } else { + return $this->renderRelationProperty('host', $this->host_id, 'command_endpoint'); + } } /**