support regex expansion in templating "Regex" field (#6565)

This commit is contained in:
Mitsuhiro Tanda 2017-01-31 23:21:53 +09:00 committed by Torkel Ödegaard
parent 4f5dc6104f
commit 91999851cb

View File

@ -136,7 +136,7 @@ export class QueryVariable implements Variable {
options = [];
if (this.regex) {
regex = kbn.stringToJsRegex(this.templateSrv.replace(this.regex));
regex = kbn.stringToJsRegex(this.templateSrv.replace(this.regex, {}, 'regex'));
}
for (i = 0; i < metricNames.length; i++) {