@@ -38,6 +38,9 @@ |
||
| 38 | 38 | return json_encode(self::generateMacroFilter('alert.macros.rule', self::generateTableFilter())); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | + /** |
|
| 42 | + * @param string $setting |
|
| 43 | + */ |
|
| 41 | 44 | private static function generateMacroFilter($setting, $filter = []) |
| 42 | 45 | { |
| 43 | 46 | foreach (Settings::get($setting, []) as $key => $value) { |
@@ -177,7 +177,7 @@ |
||
| 177 | 177 | } |
| 178 | 178 | |
| 179 | 179 | foreach (Settings::get('alert.macros.group', []) as $macro => $value) { |
| 180 | - $value = str_replace(['%', '&&', '||'], ['', 'AND', 'OR'], $value); // this might need something more complex |
|
| 180 | + $value = str_replace(['%', '&&', '||'], ['', 'AND', 'OR'], $value); // this might need something more complex |
|
| 181 | 181 | if (!str_contains($macro, ' ')) { |
| 182 | 182 | $pattern = str_replace('macros.'.$macro, '('.$value.')', $pattern); |
| 183 | 183 | } |