IcingaCommand: correctly render notification cmds

This commit is contained in:
Thomas Gelf 2016-05-19 17:04:28 +02:00
parent 839527a2e1
commit 9b731641c4
1 changed files with 14 additions and 0 deletions

View File

@ -56,6 +56,20 @@ class IcingaCommand extends IcingaObject
return c::renderKeyValue('execute', $this->methods_execute);
}
protected function renderObjectHeader()
{
if ($this->getResolvedProperty('methods_execute') === 'PluginNotification') {
return sprintf(
"%s %s %s {\n",
$this->getObjectTypeName(),
'NotificationCommand',
c::renderString($this->getObjectName())
);
} else {
return parent::renderObjectHeader();
}
}
public function mungeCommand($value)
{
if (is_array($value)) {