IcingaService: command endpoint respects use_agent

This commit is contained in:
Thomas Gelf 2015-12-18 11:55:42 +01:00
parent 53c0f94f27
commit 01be02fe9c

View File

@ -80,6 +80,15 @@ class IcingaService extends IcingaObject
return $this->renderRelationProperty('host', $this->host_id, 'host_name');
}
public function renderCommand_endpoint_id()
{
if ($this->use_agent === 'y') {
return $this->renderHost_id();
}
return $this->renderRelationProperty('command_endpoint', $this->command_endpoint_id);
}
public function renderUse_agent()
{
return '';