mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
AssignRenderer: make filters look better, fix not
This commit is contained in:
parent
05f745c3dc
commit
93eccc52a6
@ -134,13 +134,21 @@ class AssignRenderer
|
||||
if (! $filter->isEmpty()) {
|
||||
foreach ($filter->filters() as $f) {
|
||||
if ($f->isChain()) {
|
||||
$parts[] = '(' . $this->renderFilter($f) . ')';
|
||||
if ($f instanceof FilterNot) {
|
||||
$parts[] = '! (' . $this->renderFilter($f) . ')';
|
||||
} else {
|
||||
$parts[] = '(' . $this->renderFilter($f) . ')';
|
||||
}
|
||||
} else {
|
||||
$parts[] = $this->renderFilter($f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return implode($op, $parts);
|
||||
if ($filter instanceof FilterNot) {
|
||||
return implode(' && ', $parts);
|
||||
} else {
|
||||
return implode($op, $parts);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user