fix vector range

(cherry picked from commit 8a43d4e25c)
This commit is contained in:
Mitsuhiro Tanda
2017-10-18 14:07:44 +02:00
committed by bergquist
parent 34bc19359d
commit c8f5d39d97
@@ -8,7 +8,7 @@ export class PromCompleter {
labelNameCache: any;
labelValueCache: any;
identifierRegexps = [/[\[\]a-zA-Z_0-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]) {