IcingaService: fix command endpoint when...

...assigned by template
This commit is contained in:
Thomas Gelf 2016-03-22 03:12:15 +01:00
parent 1ca627f66c
commit e803385673

View File

@ -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');
}
}
/**