[icinga-checkins] icinga.org: icingaweb2/feature/redesign-7144: Support filter editing in event history

git at icinga.org git at icinga.org
Wed Nov 19 08:12:46 CET 2014


Module: icingaweb2
Branch: feature/redesign-7144
Commit: a4f4c8d27fc5219032aa18baa17ceaf3b1f5d74d
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=a4f4c8d27fc5219032aa18baa17ceaf3b1f5d74d

Author: Matthias Jentsch <matthias.jentsch at netways.de>
Date:   Tue Nov 18 19:12:53 2014 +0100

Support filter editing in event history

Add a FilterEditor to the eventhistory view, fix CSS layout

resolves #6979

---

 .../application/controllers/ListController.php         |    2 +-
 .../application/views/scripts/list/eventhistory.phtml  |   10 +++++++---
 modules/monitoring/public/css/module.less              |   16 ++++++++++++++++
 public/css/icinga/forms.less                           |   16 ----------------
 4 files changed, 24 insertions(+), 20 deletions(-)

diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php
index 50eff1e..a58304c 100644
--- a/modules/monitoring/application/controllers/ListController.php
+++ b/modules/monitoring/application/controllers/ListController.php
@@ -541,7 +541,7 @@ class Monitoring_ListController extends Controller
         $form->handleRequest($this->getRequest());
         $this->view->form = $form;
 
-        if ($this->getRequest()->isPost()) {
+        if ($this->getRequest()->isPost() && !$this->getParam('modifyFilter')) {
             // update filter string
             $filters = $form->getFilter();
             $url = $this->_request->getUrl();
diff --git a/modules/monitoring/application/views/scripts/list/eventhistory.phtml b/modules/monitoring/application/views/scripts/list/eventhistory.phtml
index 62b6357..6bc06e2 100644
--- a/modules/monitoring/application/views/scripts/list/eventhistory.phtml
+++ b/modules/monitoring/application/views/scripts/list/eventhistory.phtml
@@ -5,11 +5,15 @@
     <?= $this->translate('Sort by'); ?> <?= $this->sortControl->render($this); ?>
   </div>
 
-  <?= $form ?>
-    <br/>
   <?= $this->widget('limiter', array('url' => $this->url, 'max' => $this->history->count())); ?>
   <?= $this->paginationControl($history, null, null, array('preserve' => $this->preserve)); ?>
-</div>
+
+  <br> <br>
+  <?= $form ?>
+
+  <div class="content">
+      <?= $this->filterEditor ?>
+  </div>
 <?php endif ?>
 
 <div class="content">
diff --git a/modules/monitoring/public/css/module.less b/modules/monitoring/public/css/module.less
index 1b2a5b6..384d1c9 100644
--- a/modules/monitoring/public/css/module.less
+++ b/modules/monitoring/public/css/module.less
@@ -158,3 +158,19 @@ table.avp .customvar ul {
 div.selection-info {
   padding-top:1em;
 }
+
+.optionbox {
+  margin-left: 0em;
+  margin-right: 3em;
+}
+
+.optionbox label {
+  max-width: 6.5em;
+  text-align: left;
+  vertical-align: middle;
+  margin-right: 0em;
+}
+
+.optionbox input {
+  vertical-align: middle;
+}
diff --git a/public/css/icinga/forms.less b/public/css/icinga/forms.less
index 33a7fdd..2acb3d4 100644
--- a/public/css/icinga/forms.less
+++ b/public/css/icinga/forms.less
@@ -195,19 +195,3 @@ textarea {
 input, select, textarea {
   display: inline;
 }
-
-.optionbox {
-  margin-left: 0em;
-  margin-right: 3em;
-}
-
-.optionbox label {
-  max-width: 6.5em;
-  text-align: left;
-  vertical-align: middle;
-  margin-right: 0em;
-}
-
-.optionbox input {
-  vertical-align: middle;
-}



More information about the icinga-checkins mailing list