mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-24 22:34:25 +02:00
FieldLoader: fix 'show based on filter' for...
...CustomVariables of type Array fixes #983
This commit is contained in:
parent
b1bf944c59
commit
5388520551
@ -123,7 +123,7 @@ abstract class ObjectApplyMatches
|
||||
return $objects;
|
||||
}
|
||||
|
||||
protected static function fixFilterColumns(Filter $filter)
|
||||
public static function fixFilterColumns(Filter $filter)
|
||||
{
|
||||
if ($filter->isExpression()) {
|
||||
static::fixFilterExpressionColumn($filter);
|
||||
|
@ -12,6 +12,7 @@ use Icinga\Module\Director\Objects\IcingaHost;
|
||||
use Icinga\Module\Director\Objects\IcingaObject;
|
||||
use Icinga\Module\Director\Objects\DirectorDatafield;
|
||||
use Icinga\Module\Director\Objects\IcingaService;
|
||||
use Icinga\Module\Director\Objects\ObjectApplyMatches;
|
||||
use stdClass;
|
||||
use Zend_Db_Select as ZfSelect;
|
||||
use Zend_Form_Element as ZfElement;
|
||||
@ -253,7 +254,7 @@ class IcingaObjectFieldLoader
|
||||
$vars = $object::fromPlainObject(
|
||||
$object->toPlainObject(true),
|
||||
$object->getConnection()
|
||||
)->vars()->flatten();
|
||||
)->getVars();
|
||||
|
||||
$prefixedVars = (object) array();
|
||||
foreach ($vars as $k => $v) {
|
||||
@ -261,6 +262,7 @@ class IcingaObjectFieldLoader
|
||||
}
|
||||
|
||||
foreach ($filters as $key => $filter) {
|
||||
ObjectApplyMatches::fixFilterColumns($filter);
|
||||
/** @var $filter FilterChain|FilterExpression */
|
||||
foreach ($filter->listFilteredColumns() as $column) {
|
||||
$column = substr($column, strlen($prefix));
|
||||
|
Loading…
x
Reference in New Issue
Block a user