mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-28 16:24:05 +02:00
DirectorObjectForm: provide check_period element
This commit is contained in:
parent
19d56fc546
commit
f2dc9c59e5
@ -575,6 +575,11 @@ class Db extends DbConnection
|
|||||||
return $this->enumIcingaObjects('command');
|
return $this->enumIcingaObjects('command');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function enumTimeperiods()
|
||||||
|
{
|
||||||
|
return $this->enumIcingaObjects('timeperiod');
|
||||||
|
}
|
||||||
|
|
||||||
public function enumCheckcommands()
|
public function enumCheckcommands()
|
||||||
{
|
{
|
||||||
$filters = array(
|
$filters = array(
|
||||||
|
@ -1153,6 +1153,23 @@ abstract class DirectorObjectForm extends QuickForm
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$periods = $this->db->enumTimeperiods();
|
||||||
|
if (!empty($periods)) {
|
||||||
|
|
||||||
|
$this->addElement(
|
||||||
|
'select',
|
||||||
|
'check_period_id',
|
||||||
|
array(
|
||||||
|
'label' => $this->translate('Check period'),
|
||||||
|
'description' => $this->translate(
|
||||||
|
'The name of a time period which determines when this'
|
||||||
|
. ' object should be monitored. Not limited by default.'
|
||||||
|
),
|
||||||
|
'multiOptions' => $this->optionalEnum($periods),
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
$this->optionalBoolean(
|
$this->optionalBoolean(
|
||||||
'enable_active_checks',
|
'enable_active_checks',
|
||||||
$this->translate('Execute active checks'),
|
$this->translate('Execute active checks'),
|
||||||
@ -1192,6 +1209,7 @@ abstract class DirectorObjectForm extends QuickForm
|
|||||||
$elements = array(
|
$elements = array(
|
||||||
'check_interval',
|
'check_interval',
|
||||||
'retry_interval',
|
'retry_interval',
|
||||||
|
'check_period_id',
|
||||||
'enable_active_checks',
|
'enable_active_checks',
|
||||||
'enable_passive_checks',
|
'enable_passive_checks',
|
||||||
'enable_notifications',
|
'enable_notifications',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user