Merge pull request #13656 from olshansky/fix-label-values-regex

fix: label values regex for single letter labels
This commit is contained in:
Torkel Ödegaard 2018-10-13 06:53:33 +02:00 committed by GitHub
commit 193829adac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,7 +12,7 @@ export default class PrometheusMetricFindQuery {
}
process() {
const labelValuesRegex = /^label_values\((?:(.+),\s*)?([a-zA-Z_][a-zA-Z0-9_]+)\)\s*$/;
const labelValuesRegex = /^label_values\((?:(.+),\s*)?([a-zA-Z_][a-zA-Z0-9_]*)\)\s*$/;
const metricNamesRegex = /^metrics\((.+)\)\s*$/;
const queryResultRegex = /^query_result\((.+)\)\s*$/;