IcingaNotification: render host_id as host_name

Does not affect apply rules, just those who enforce host_id via sync
This commit is contained in:
Thomas Gelf 2019-09-27 15:09:00 +02:00
parent a428811e28
commit ab8c8b041d

View File

@ -230,6 +230,20 @@ class IcingaNotification extends IcingaObject implements ExportInterface
}
}
/**
* Render host_id as host_name
*
* Avoid complaints for method names with underscore:
* @codingStandardsIgnoreStart
*
* @return string
*/
public function renderHost_id()
{
// @codingStandardsIgnoreEnd
return $this->renderRelationProperty('host', $this->get('host_id'), 'host_name');
}
protected function setKey($key)
{
if (is_int($key)) {