prometheus editor: variable autocomplete support (PR #9988)

* prometheus ace editor, template variable support

* minor fix

* support [[var]] notation

* don't remove last ] if token type is string

* Revert "don't remove last ] if token type is string"

This reverts commit bce5b2d56e.

* Revert "support [[var]] notation"

This reverts commit 10012f8ffe.

* fix token type and regex
This commit is contained in:
Mitsuhiro Tanda
2018-03-16 02:17:51 +09:00
committed by Alexander Zobnin
parent eef01e3703
commit c6fa0b90a7
4 changed files with 40 additions and 8 deletions

View File

@@ -50,6 +50,9 @@ var PrometheusHighlightRules = function() {
token : "keyword.control",
regex : "by|without|on|ignoring|group_left|group_right",
next : "start-label-list-matcher"
}, {
token : "variable",
regex : "\\$[A-Za-z0-9_]+"
}, {
token : keywordMapper,
regex : "[a-zA-Z_:][a-zA-Z0-9_:]*"