State/TypeFilterSet: add new event filter sets
This commit is contained in:
parent
bbcac7a00d
commit
5427df52e8
|
@ -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'),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
|
@ -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…
Reference in New Issue