mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Don't include time macros in field list (#10299)
They can only be used as the value
This commit is contained in:
@@ -65,6 +65,10 @@ class QueryBuilderFilter implements \JsonSerializable
|
||||
foreach ($macros as $key => $value) {
|
||||
$field = 'macros.' . $key;
|
||||
|
||||
if (preg_match('/^past_\d+m$/', $key)) {
|
||||
continue; // don't include the time based macros, they don't work like that
|
||||
}
|
||||
|
||||
if (ends_with($key, '_usage_perc')) {
|
||||
$this->filter[$field] = [
|
||||
'id' => $field,
|
||||
|
Reference in New Issue
Block a user