State/TypeFilterSet: add new event filter sets

This commit is contained in:
Thomas Gelf 2016-02-29 15:40:18 +01:00
parent bbcac7a00d
commit 5427df52e8
2 changed files with 70 additions and 0 deletions

View 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'),
),
);
}
}

View 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')
)
);
}
}