mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-21 04:44:26 +02:00
AssignRenderer and Form: "is true/set" operator
refs #339 fixes #729 fixes #739
This commit is contained in:
parent
ee21c6320a
commit
99eb6acd63
@ -167,6 +167,9 @@ class Zend_View_Helper_FormDataFilter extends Zend_View_Helper_FormElement
|
||||
$filter->setExpression(json_decode($filter->getExpression()));
|
||||
}
|
||||
|
||||
if ($filter->getExpression() === true) {
|
||||
return '';
|
||||
}
|
||||
$dummy = IcingaObject::createByType($type);
|
||||
$col = $filter->getColumn();
|
||||
if ($dummy->hasProperty($col)) {
|
||||
@ -224,8 +227,6 @@ class Zend_View_Helper_FormDataFilter extends Zend_View_Helper_FormElement
|
||||
$this->elementId('value', $filter),
|
||||
$value
|
||||
);
|
||||
|
||||
$value = '(' . implode('|', $value) . ')';
|
||||
}
|
||||
|
||||
return $this->view->formText(
|
||||
@ -298,7 +299,7 @@ class Zend_View_Helper_FormDataFilter extends Zend_View_Helper_FormElement
|
||||
'<=' => '<=',
|
||||
'in' => 'in',
|
||||
'contains' => 'contains',
|
||||
// 'true' => 'is true (or set)',
|
||||
'true' => 'is true (or set)',
|
||||
);
|
||||
|
||||
if ($filter === null) {
|
||||
|
@ -133,6 +133,9 @@ class AssignRenderer
|
||||
);
|
||||
}
|
||||
} elseif ($filter instanceof FilterMatch) {
|
||||
if ($rawExpression === true) {
|
||||
return $column;
|
||||
}
|
||||
if (strpos($expression, '*') === false) {
|
||||
return $this->renderEquals($column, $expression);
|
||||
} else {
|
||||
|
@ -1386,8 +1386,8 @@ div.filter-expression {
|
||||
margin: 0 0.3em;
|
||||
&.wide {
|
||||
min-width: 6em;
|
||||
max-width: 6em;
|
||||
width: 6em;
|
||||
max-width: 8em;
|
||||
width: 8em;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user