[icinga-checkins] icinga.org: icingaweb2-module-director/fiddle/mfrosch: IcingaService: simplify command endpoint rendering

git at icinga.org git at icinga.org
Thu May 19 16:46:21 CEST 2016


Module: icingaweb2-module-director
Branch: fiddle/mfrosch
Commit: 480e80709a9328bbb709113e9a21dc06565cd227
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=480e80709a9328bbb709113e9a21dc06565cd227

Author: Thomas Gelf <thomas at gelf.net>
Date:   Thu May 19 16:06:06 2016 +0200

IcingaService: simplify command endpoint rendering

host.name doesn't work as of #11786. host_name should be fine for
templates, objects and apply rules. I therefore also dropped the
exception for service objects with use_agent and host_id.

---

 library/Director/Objects/IcingaService.php |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/library/Director/Objects/IcingaService.php b/library/Director/Objects/IcingaService.php
index 02834ac..5dc2a82 100644
--- a/library/Director/Objects/IcingaService.php
+++ b/library/Director/Objects/IcingaService.php
@@ -173,11 +173,7 @@ class IcingaService extends IcingaObject
             return '';
         }
 
-        if ($this->hasBeenAssignedToHostTemplate() || $this->object_type !== 'object') {
-            return c::renderKeyValue('command_endpoint', 'host.name');
-        } else {
-            return $this->renderRelationProperty('host', $this->host_id, 'command_endpoint');
-        }
+        return c::renderKeyValue('command_endpoint', 'host_name');
     }
 
     /**



More information about the icinga-checkins mailing list