monitoring: Combine restrictions w/ OR
If a user has more than one filter for the same restriction, the filters will be combined w/ or. The combined filters will then be applied w/ AND to the query. refs #9009
This commit is contained in:
parent
41be32adff
commit
7793b61e4c
|
@ -58,9 +58,11 @@ class Controller extends IcingaWebController
|
|||
*/
|
||||
protected function applyRestriction($restriction, Filterable $view)
|
||||
{
|
||||
$restrictions = Filter::matchAny();
|
||||
foreach ($this->getRestrictions($restriction) as $filter) {
|
||||
$view->applyFilter(Filter::fromQueryString($filter));
|
||||
$restrictions->addFilter(Filter::fromQueryString($filter));
|
||||
}
|
||||
$view->applyFilter($restrictions);
|
||||
return $view;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue