Prometheus: Correctly format multi values variables in queries (#26896)

This commit is contained in:
Ivana Huckova
2020-08-10 15:36:15 +02:00
committed by GitHub
parent 0a40862af5
commit ad33734424
2 changed files with 3 additions and 3 deletions

View File

@@ -159,7 +159,7 @@ export class PrometheusDatasource extends DataSourceApi<PromQuery, PromOptions>
}
const escapedValues = value.map(val => prometheusSpecialRegexEscape(val));
return escapedValues.join('|');
return '(' + escapedValues.join('|') + ')';
}
targetContainsTemplate(target: PromQuery) {