allow ":" character for metric name

This commit is contained in:
Mitsuhiro Tanda 2017-10-17 19:26:16 +09:00
parent 45a572ebd8
commit ebebbddb2d
2 changed files with 2 additions and 2 deletions

View File

@ -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 = {};

View File

@ -43,7 +43,7 @@ var PrometheusHighlightRules = function() {
regex : "\\d+[smhdwy]"
}, {
token : keywordMapper,
regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b"
regex : "[a-zA-Z_:][a-zA-Z0-9_:]*"
}, {
token : "keyword.operator",
regex : "\\+|\\-|\\*|\\/|%|\\^|=|==|!=|<=|>=|<|>|=\\~|!\\~"