mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-27 15:54:03 +02:00
State/TypeFilterSet: add new event filter sets
This commit is contained in:
parent
bbcac7a00d
commit
5427df52e8
31
library/Director/IcingaConfig/StateFilterSet.php
Normal file
31
library/Director/IcingaConfig/StateFilterSet.php
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Icinga\Module\Director\IcingaConfig;
|
||||||
|
|
||||||
|
class StateFilterSet extends ExtensibleSet
|
||||||
|
{
|
||||||
|
protected $allowedValues = array(
|
||||||
|
'Up',
|
||||||
|
'Down',
|
||||||
|
'OK',
|
||||||
|
'Warning',
|
||||||
|
'Critical',
|
||||||
|
'Unknown',
|
||||||
|
);
|
||||||
|
|
||||||
|
public function enumAllowedValues()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
$this->translate('Hosts') => array(
|
||||||
|
'Up' => $this->translate('Up'),
|
||||||
|
'Down' => $this->translate('Down')
|
||||||
|
),
|
||||||
|
$this->translate('Services') => array(
|
||||||
|
'OK' => $this->translate('OK'),
|
||||||
|
'Warning' => $this->translate('Warning'),
|
||||||
|
'Critical' => $this->translate('Critical'),
|
||||||
|
'Unknown' => $this->translate('Unknown'),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
39
library/Director/IcingaConfig/TypeFilterSet.php
Normal file
39
library/Director/IcingaConfig/TypeFilterSet.php
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Icinga\Module\Director\IcingaConfig;
|
||||||
|
|
||||||
|
class TypeFilterSet extends ExtensibleSet
|
||||||
|
{
|
||||||
|
protected $allowedValues = array(
|
||||||
|
'Problem',
|
||||||
|
'Recovery',
|
||||||
|
'Custom',
|
||||||
|
'Acknowledgement',
|
||||||
|
'DowntimeStart',
|
||||||
|
'DowntimeEnd',
|
||||||
|
'DowntimeRemoved',
|
||||||
|
'FlappingStart',
|
||||||
|
'FlappingEnd',
|
||||||
|
);
|
||||||
|
|
||||||
|
public function enumAllowedValues()
|
||||||
|
{
|
||||||
|
return array(
|
||||||
|
$this->translate('State changes') => array(
|
||||||
|
'Problem' => $this->translate('Problem'),
|
||||||
|
'Recovery' => $this->translate('Recovery'),
|
||||||
|
'Custom' => $this->translate('Custom notification'),
|
||||||
|
),
|
||||||
|
$this->translate('Problem handling') => array(
|
||||||
|
'Acknowledgement' => $this->translate('Acknowledgement'),
|
||||||
|
'DowntimeStart' => $this->translate('Downtime starts'),
|
||||||
|
'DowntimeEnd' => $this->translate('Downtime ends'),
|
||||||
|
'DowntimeRemoved' => $this->translate('Downtime removed'),
|
||||||
|
),
|
||||||
|
$this->translate('Flapping') => array(
|
||||||
|
'FlappingStart' => $this->translate('Flapping ends'),
|
||||||
|
'FlappingEnd' => $this->translate('Flapping starts')
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user