[icinga-checkins] icinga.org: icingaweb2-module-director/master: IcingaNotificationForm: still incomplete

git at icinga.org git at icinga.org
Sun Feb 28 17:12:41 CET 2016


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

Author: Thomas Gelf <thomas at gelf.net>
Date:   Sun Feb 28 17:02:28 2016 +0100

IcingaNotificationForm: still incomplete

---

 application/forms/IcingaNotificationForm.php |   36 ++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/application/forms/IcingaNotificationForm.php b/application/forms/IcingaNotificationForm.php
new file mode 100644
index 0000000..9b7b7ba
--- /dev/null
+++ b/application/forms/IcingaNotificationForm.php
@@ -0,0 +1,36 @@
+<?php
+
+namespace Icinga\Module\Director\Forms;
+
+use Icinga\Module\Director\Web\Form\DirectorObjectForm;
+
+class IcingaNotificationForm extends DirectorObjectForm
+{
+    public function setup()
+    {
+        $this->addObjectTypeElement();
+
+        $this->addElement('text', 'object_name', array(
+            'label'       => $this->translate('Notification'),
+            'required'    => true,
+            'description' => $this->translate('Icinga object name for this notification')
+        ));
+ 
+        $this->addElement('multiselect', 'states', array(
+            'label'        => $this->translate('States'),
+            'description'  => $this->translate('The host/service states you want to get notifications for'),
+            'multiOptions' => $this->enumStateFilters(),
+            'size'         => 6,
+        ));
+
+        $this->addElement('multiselect', 'types', array(
+            'label'        => $this->translate('Event types'),
+            'description'  => $this->translate('The event types you want to get notifications for'),
+            'multiOptions' => $this->enumTypeFilters(),
+            'size'         => 6,
+        ));
+
+        $this->addDisabledElement();
+        $this->setButtons();
+    }
+}



More information about the icinga-checkins mailing list