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

@@ -43,7 +43,7 @@ class PrometheusQueryCtrl extends QueryCtrl {
}
getCompleter(query) {
return new PromCompleter(this.datasource);
return new PromCompleter(this.datasource, this.templateSrv);
}
getDefaultFormat() {