DirectorObjectForm: Add flapping settings

refs #330
This commit is contained in:
Markus Frosch 2017-12-06 15:47:42 +01:00 committed by Thomas Gelf
parent 4902f694c1
commit 6c52a26281

View File

@ -1354,6 +1354,34 @@ abstract class DirectorObjectForm extends DirectorForm
$this->translate('Whether to process performance data provided by this object')
);
$this->optionalBoolean(
'enable_flapping',
$this->translate('Enable flap detection'),
$this->translate('Whether flap detection is enabled on this object')
);
$this->addElement(
'text',
'flapping_threshold_high',
array(
'label' => $this->translate('Flapping threshold (high)'),
'description' => $this->translate(
'Flapping upper bound in percent for a service to be considered flapping'
)
)
);
$this->addElement(
'text',
'flapping_threshold_low',
array(
'label' => $this->translate('Flapping threshold (low)'),
'description' => $this->translate(
'Flapping lower bound in percent for a service to be considered not flapping'
)
)
);
$this->optionalBoolean(
'volatile',
$this->translate('Volatile'),
@ -1371,6 +1399,9 @@ abstract class DirectorObjectForm extends DirectorForm
'enable_notifications',
'enable_event_handler',
'enable_perfdata',
'enable_flapping',
'flapping_threshold_high',
'flapping_threshold_low',
'volatile'
);
$this->addToCheckExecutionDisplayGroup($elements);