[icinga-checkins] icinga.org: icingaweb2/master: monitoring/list: remove old applyFilter function

git at icinga.org git at icinga.org
Sun Nov 16 00:38:44 CET 2014


Module: icingaweb2
Branch: master
Commit: 8e9da72918d9d7bd1a5a2122d54cc8e4d5fab86d
URL:    https://git.icinga.org/?p=icingaweb2.git;a=commit;h=8e9da72918d9d7bd1a5a2122d54cc8e4d5fab86d

Author: Thomas Gelf <thomas at gelf.net>
Date:   Sun Nov 16 00:24:17 2014 +0100

monitoring/list: remove old applyFilter function

---

 .../application/controllers/ListController.php     |   52 --------------------
 1 file changed, 52 deletions(-)

diff --git a/modules/monitoring/application/controllers/ListController.php b/modules/monitoring/application/controllers/ListController.php
index eb4c4d9..36db720 100644
--- a/modules/monitoring/application/controllers/ListController.php
+++ b/modules/monitoring/application/controllers/ListController.php
@@ -630,58 +630,6 @@ class Monitoring_ListController extends Controller
         return $query;
     }
 
-    protected function applyFilters($query)
-    {
-        $params = clone $this->params;
-        $request = $this->getRequest();
-
-        $limit   = $params->shift('limit');
-        $sort    = $params->shift('sort');
-        $dir     = $params->shift('dir');
-        $page    = $params->shift('page');
-        $format  = $params->shift('format');
-        $view    = $params->shift('view');
-        $backend = $params->shift('backend');
-        $modifyFilter = $params->shift('modifyFilter', false);
-        $removeFilter = $params->shift('removeFilter', false);
-
-        $filter = Filter::fromQueryString((string) $params);
-        $this->view->filterPreview = Widget::create('filterWidget', $filter);
-
-        if ($removeFilter) {
-            $redirect = $this->url->without('page');
-            if ($filter->getById($removeFilter)->isRootNode()) {
-                $redirect->setQueryString('');
-            } else {
-                $filter->removeId($removeFilter);
-                $redirect->setQueryString($filter->toQueryString())
-                    ->getParams()->add('modifyFilter');
-            }
-            $this->redirectNow($redirect);
-        }
-
-        if ($modifyFilter) {
-            if ($this->_request->isPost()) {
-                $filter = $filter->applyChanges($this->_request->getPost());
-                $this->redirectNow($this->url->without('page')->setQueryString($filter->toQueryString()));
-            }
-            $this->view->filterEditor = Widget::create('filterEditor', array(
-                'filter' => $filter,
-                'query'  => $query
-            ));
-        }
-        if (! $filter->isEmpty()) {
-            $query->applyFilter($filter);
-        }
-        $this->view->filter = $filter;
-        if ($sort) {
-            $query->order($sort, $dir);
-        }
-        $this->applyRestrictions($query);
-        $this->handleFormatRequest($query);
-        return $query;
-    }
-
     /**
      * Apply current user's `monitoring/filter' restrictions on the given data view
      */



More information about the icinga-checkins mailing list