Object forms: group check execution elements
This commit is contained in:
parent
1456662023
commit
80fe9ccc11
|
@ -43,7 +43,7 @@ class IcingaHostForm extends DirectorObjectForm
|
|||
'description' => $this->translate('Usually your hosts main IPv6 address')
|
||||
));
|
||||
|
||||
$this->addCheckCommandElement()->addCheckFlagElements();
|
||||
$this->addCheckExecutionElements();
|
||||
} else {
|
||||
$this->getElement('imports')->setRequired();
|
||||
}
|
||||
|
|
|
@ -21,8 +21,7 @@ class IcingaServiceForm extends DirectorObjectForm
|
|||
$this->addImportsElement();
|
||||
|
||||
if ($this->isTemplate()) {
|
||||
$this->addCheckCommandElement()
|
||||
->addCheckFlagElements();
|
||||
$this->addCheckExecutionElements();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -464,17 +464,6 @@ abstract class DirectorObjectForm extends QuickForm
|
|||
return $this;
|
||||
}
|
||||
|
||||
protected function addCheckCommandElement()
|
||||
{
|
||||
$this->addElement('select', 'check_command_id', array(
|
||||
'label' => $this->translate('Check command'),
|
||||
'description' => $this->translate('Check command definition'),
|
||||
'multiOptions' => $this->optionalEnum($this->db->enumCheckCommands())
|
||||
));
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
protected function addImportsElement()
|
||||
{
|
||||
$this->addElement('multiselect', 'imports', array(
|
||||
|
@ -487,8 +476,16 @@ abstract class DirectorObjectForm extends QuickForm
|
|||
return $this;
|
||||
}
|
||||
|
||||
protected function addCheckFlagElements()
|
||||
protected function addCheckExecutionElements()
|
||||
{
|
||||
$this->addHtml('<h3>Check execution</h3>');
|
||||
|
||||
$this->addElement('select', 'check_command_id', array(
|
||||
'label' => $this->translate('Check command'),
|
||||
'description' => $this->translate('Check command definition'),
|
||||
'multiOptions' => $this->optionalEnum($this->db->enumCheckCommands())
|
||||
));
|
||||
|
||||
$this->optionalBoolean(
|
||||
'enable_active_checks',
|
||||
$this->translate('Execute active checks'),
|
||||
|
|
Loading…
Reference in New Issue