[icinga-checkins] icinga.org: icingaweb2-module-director/master: DirectorObjectForm: provide filter enums

git at icinga.org git at icinga.org
Fri Feb 26 15:52:24 CET 2016


Module: icingaweb2-module-director
Branch: master
Commit: da2ad842fa51db38edc38c6d7801be2374e380fa
URL:    https://git.icinga.org/?p=icingaweb2-module-director.git;a=commit;h=da2ad842fa51db38edc38c6d7801be2374e380fa

Author: Thomas Gelf <thomas at gelf.net>
Date:   Fri Feb 26 15:52:03 2016 +0100

DirectorObjectForm: provide filter enums

---

 library/Director/Web/Form/DirectorObjectForm.php |   37 ++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/library/Director/Web/Form/DirectorObjectForm.php b/library/Director/Web/Form/DirectorObjectForm.php
index 65ece75..9654d57 100644
--- a/library/Director/Web/Form/DirectorObjectForm.php
+++ b/library/Director/Web/Form/DirectorObjectForm.php
@@ -973,6 +973,43 @@ abstract class DirectorObjectForm extends QuickForm
         return $tpl;
     }
 
+    protected function enumStateFilters()
+    {
+        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'),
+            ),
+        );
+    }
+
+    protected function enumTypeFilters()
+    {
+        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')
+            )
+          );
+    }
+
     private function dummyForTranslation()
     {
         $this->translate('Host');



More information about the icinga-checkins mailing list