IcingaService: use booleans, drop custom renderers

This commit is contained in:
Thomas Gelf 2015-12-18 11:52:00 +01:00
parent e2fad6eb79
commit 53c0f94f27
1 changed files with 11 additions and 40 deletions

View File

@ -45,6 +45,17 @@ class IcingaService extends IcingaObject
'zone' => 'IcingaZone',
);
protected $booleans = array(
'enable_notifications',
'enable_active_checks',
'enable_passive_checks',
'enable_event_handler',
'enable_flapping',
'enable_perfdata',
'volatile',
'use_agent',
);
protected $supportsGroups = true;
protected $supportsCustomVars = true;
@ -88,44 +99,4 @@ class IcingaService extends IcingaObject
{
return $this->getResolvedProperty('check_command_id') !== null;
}
protected function renderCheck_command_id()
{
return $this->renderCommandProperty($this->check_command_id);
}
protected function renderEnable_notifications()
{
return $this->renderBooleanProperty('enable_notifications');
}
protected function renderEnable_active_checks()
{
return $this->renderBooleanProperty('enable_active_checks');
}
protected function renderEnable_passive_checks()
{
return $this->renderBooleanProperty('enable_passive_checks');
}
protected function renderEnable_event_handler()
{
return $this->renderBooleanProperty('enable_event_handler');
}
protected function renderEnable_flapping()
{
return $this->renderBooleanProperty('enable_flapping');
}
protected function renderEnable_perfdata()
{
return $this->renderBooleanProperty('enable_perfdata');
}
protected function renderVolatile()
{
return $this->renderBooleanProperty('volatile');
}
}