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.
This commit is contained in:
Thomas Gelf 2016-05-19 16:06:06 +02:00
parent 5f1a21e1f0
commit 480e80709a
1 changed files with 1 additions and 5 deletions

View File

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