From a4f4c8d27fc5219032aa18baa17ceaf3b1f5d74d Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Tue, 18 Nov 2014 19:12:53 +0100 Subject: [PATCH] Support filter editing in event history Add a FilterEditor to the eventhistory view, fix CSS layout resolves #6979 --- .../application/controllers/ListController.php | 2 +- .../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 50eff1ea6..a58304cd6 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 62b635763..6bc06e2c9 100644 --- a/modules/monitoring/application/views/scripts/list/eventhistory.phtml +++ b/modules/monitoring/application/views/scripts/list/eventhistory.phtml @@ -5,11 +5,15 @@ translate('Sort by'); ?> sortControl->render($this); ?> - -
widget('limiter', array('url' => $this->url, 'max' => $this->history->count())); ?> paginationControl($history, null, null, array('preserve' => $this->preserve)); ?> - + +

+ + +
+ filterEditor ?> +
diff --git a/modules/monitoring/public/css/module.less b/modules/monitoring/public/css/module.less index 1b2a5b67d..384d1c923 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 33a7fdd01..2acb3d4d2 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; -}