Commit ebebbddb by Mitsuhiro Tanda

allow ":" character for metric name

parent 45a572eb
......@@ -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 = {};
......
......@@ -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 : "\\+|\\-|\\*|\\/|%|\\^|=|==|!=|<=|>=|<|>|=\\~|!\\~"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment