mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-06-09 08:42:14 -04:00
Adjust usages of filter property columnLabel
This commit is contained in:
parent
e09bcc1379
commit
f0368b404d
2 changed files with 6 additions and 3 deletions
|
|
@ -86,7 +86,7 @@ class ObjectSuggestions extends Suggestions
|
|||
$quickFilter = Filter::any();
|
||||
foreach ($model->getSearchColumns() as $column) {
|
||||
$where = Filter::equal($model->getTableName() . '.' . $column, $searchTerm);
|
||||
$where->columnLabel = $model->getMetaData()[$column];
|
||||
$where->metaData()->set('columnLabel', $model->getMetaData()[$column]);
|
||||
$quickFilter->add($where);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -146,14 +146,17 @@ class Controller extends CompatController
|
|||
list($target, $varName) = explode('.vars.', $path);
|
||||
if (strpos($target, '.') === false) {
|
||||
// Programmatically translated since the full definition is available in class ObjectSuggestions
|
||||
$condition->columnLabel = sprintf(t(ucfirst($target) . ' %s', '..<customvar-name>'), $varName);
|
||||
$condition->metaData()->set(
|
||||
'columnLabel',
|
||||
sprintf(t(ucfirst($target) . ' %s', '..<customvar-name>'), $varName)
|
||||
);
|
||||
}
|
||||
} else {
|
||||
$metaData = iterator_to_array(
|
||||
ObjectSuggestions::collectFilterColumns($query->getModel(), $query->getResolver())
|
||||
);
|
||||
if (isset($metaData[$path])) {
|
||||
$condition->columnLabel = $metaData[$path];
|
||||
$condition->metaData()->set('columnLabel', $metaData[$path]);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue