mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-26 23:34:08 +02:00
monitoring/list: add new filterQuery method
This commit is contained in:
parent
e0bf021fb9
commit
e3f6b4f27e
@ -610,6 +610,25 @@ class Monitoring_ListController extends Controller
|
|||||||
$this->view->verticalPaginator = $pivot->paginateYAxis();
|
$this->view->verticalPaginator = $pivot->paginateYAxis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function filterQuery($query)
|
||||||
|
{
|
||||||
|
$editor = Widget::create('filterEditor')
|
||||||
|
->setQuery($query)
|
||||||
|
->preserveParams('limit', 'sort', 'dir', 'format', 'view', 'backend')
|
||||||
|
->ignoreParams('page')
|
||||||
|
->handleRequest($this->getRequest());
|
||||||
|
$query->applyFilter($editor->getFilter());
|
||||||
|
|
||||||
|
$this->view->filterEditor = $editor;
|
||||||
|
|
||||||
|
if ($sort = $this->params->get('sort')) {
|
||||||
|
$query->order($sort, $this->params->get('dir'));
|
||||||
|
}
|
||||||
|
$this->applyRestrictions($query);
|
||||||
|
$this->handleFormatRequest($query);
|
||||||
|
return $query;
|
||||||
|
}
|
||||||
|
|
||||||
protected function applyFilters($query)
|
protected function applyFilters($query)
|
||||||
{
|
{
|
||||||
$params = clone $this->params;
|
$params = clone $this->params;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user