mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-06-03 22:05:03 -04:00
MonitoringRestrictions: Fix restriction validation
This commit is contained in:
parent
1c6376a967
commit
7e35b15ef2
1 changed files with 10 additions and 8 deletions
|
|
@ -65,15 +65,17 @@ class MonitoringRestrictions
|
|||
} elseif ($column === $condition->getColumn()) {
|
||||
return;
|
||||
}
|
||||
|
||||
throw new ConfigurationError(
|
||||
t('Cannot apply restriction %s using the filter %s.'
|
||||
. ' You can only use the following columns: %s'),
|
||||
$name,
|
||||
$queryString,
|
||||
implode(', ', array_keys($allowedColumns))
|
||||
);
|
||||
}
|
||||
|
||||
throw new ConfigurationError(
|
||||
t('Cannot apply restriction %s using the filter %s.'
|
||||
. ' You can only use the following columns: %s'),
|
||||
$name,
|
||||
$queryString,
|
||||
join(', ', array_map(function ($k, $v) {
|
||||
return is_string($k) ? $k : $v;
|
||||
}, array_keys($allowedColumns), $allowedColumns))
|
||||
);
|
||||
})->parse());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue