IcingaObject: scheduled downtime awareness

This is not optimal, but that's how it works right now
This commit is contained in:
Thomas Gelf 2019-04-10 17:30:19 +02:00
parent 54b62c7179
commit 9a21ace300
1 changed files with 3 additions and 1 deletions

View File

@ -2558,6 +2558,8 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
$type = 'templateChoiceHost';
} elseif ($type === 'service_template_choice') {
$type = 'TemplateChoiceService';
} elseif ($type === 'scheduled_downtime') {
$type = 'ScheduledDowntime';
}
return 'Icinga\\Module\\Director\\Objects\\' . $prefix . ucfirst($type);
@ -3013,7 +3015,7 @@ abstract class IcingaObject extends DbObject implements IcingaConfigRenderer
{
$params = array();
if ($this->isApplyRule()) {
if ($this->isApplyRule() && ! $this instanceof IcingaScheduledDowntime) {
$params['id'] = $this->get('id');
} else {
$params = array('name' => $this->getObjectName());