mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-22 13:24:25 +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()));
|
$filter->setExpression(json_decode($filter->getExpression()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($filter->getExpression() === true) {
|
||||||
|
return '';
|
||||||
|
}
|
||||||
$dummy = IcingaObject::createByType($type);
|
$dummy = IcingaObject::createByType($type);
|
||||||
$col = $filter->getColumn();
|
$col = $filter->getColumn();
|
||||||
if ($dummy->hasProperty($col)) {
|
if ($dummy->hasProperty($col)) {
|
||||||
@ -224,8 +227,6 @@ class Zend_View_Helper_FormDataFilter extends Zend_View_Helper_FormElement
|
|||||||
$this->elementId('value', $filter),
|
$this->elementId('value', $filter),
|
||||||
$value
|
$value
|
||||||
);
|
);
|
||||||
|
|
||||||
$value = '(' . implode('|', $value) . ')';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->view->formText(
|
return $this->view->formText(
|
||||||
@ -298,7 +299,7 @@ class Zend_View_Helper_FormDataFilter extends Zend_View_Helper_FormElement
|
|||||||
'<=' => '<=',
|
'<=' => '<=',
|
||||||
'in' => 'in',
|
'in' => 'in',
|
||||||
'contains' => 'contains',
|
'contains' => 'contains',
|
||||||
// 'true' => 'is true (or set)',
|
'true' => 'is true (or set)',
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($filter === null) {
|
if ($filter === null) {
|
||||||
|
@ -133,6 +133,9 @@ class AssignRenderer
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
} elseif ($filter instanceof FilterMatch) {
|
} elseif ($filter instanceof FilterMatch) {
|
||||||
|
if ($rawExpression === true) {
|
||||||
|
return $column;
|
||||||
|
}
|
||||||
if (strpos($expression, '*') === false) {
|
if (strpos($expression, '*') === false) {
|
||||||
return $this->renderEquals($column, $expression);
|
return $this->renderEquals($column, $expression);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1386,8 +1386,8 @@ div.filter-expression {
|
|||||||
margin: 0 0.3em;
|
margin: 0 0.3em;
|
||||||
&.wide {
|
&.wide {
|
||||||
min-width: 6em;
|
min-width: 6em;
|
||||||
max-width: 6em;
|
max-width: 8em;
|
||||||
width: 6em;
|
width: 8em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user