Merge pull request #9561 from mtanda/prometheus_46_fix_range

(prometheus) fix to show vector range popup
This commit is contained in:
Carl Bergquist 2017-10-18 13:39:57 +02:00 committed by GitHub
commit e8da084baf
1 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ export class PromCompleter {
labelNameCache: any;
labelValueCache: any;
identifierRegexps = [/[\[\]a-zA-Z0-9_:=]/];
identifierRegexps = [/\[/, /[a-zA-Z0-9_:]/];
constructor(private datasource: PrometheusDatasource) {
this.labelQueryCache = {};
@ -73,7 +73,7 @@ export class PromCompleter {
});
}
if (prefix === '[') {
if (token.type === 'paren.lparen' && token.value === '[') {
var vectors = [];
for (let unit of ['s', 'm', 'h']) {
for (let value of [1,5,10,30]) {