AssignRenderer: support FilterMatchNot
This commit is contained in:
parent
dca6cc8a01
commit
8c54dcab81
|
@ -12,6 +12,7 @@ use Icinga\Data\Filter\FilterEqual;
|
|||
use Icinga\Data\Filter\FilterGreaterThan;
|
||||
use Icinga\Data\Filter\FilterLessThan;
|
||||
use Icinga\Data\Filter\FilterMatch;
|
||||
use Icinga\Data\Filter\FilterMatchNot;
|
||||
use Icinga\Data\Filter\FilterNotEqual;
|
||||
use Icinga\Exception\QueryException;
|
||||
|
||||
|
@ -79,6 +80,21 @@ class AssignRenderer
|
|||
);
|
||||
}
|
||||
|
||||
} elseif ($filter instanceof FilterMatchNot) {
|
||||
if (strpos($expression, '*') === false) {
|
||||
return sprintf(
|
||||
'%s != %s',
|
||||
$column,
|
||||
$expression
|
||||
);
|
||||
} else {
|
||||
return sprintf(
|
||||
'! match(%s, %s)',
|
||||
$expression,
|
||||
$column
|
||||
);
|
||||
}
|
||||
|
||||
} elseif ($filter instanceof FilterNotEqual) {
|
||||
return sprintf(
|
||||
'%s != %s',
|
||||
|
|
Loading…
Reference in New Issue