Commit 60ba6ee6 by Dan Cech

interpolate variables in tags & values during autocomplete

parent 92086bc8
...@@ -286,7 +286,7 @@ export function GraphiteDatasource(instanceSettings, $q, backendSrv, templateSrv ...@@ -286,7 +286,7 @@ export function GraphiteDatasource(instanceSettings, $q, backendSrv, templateSrv
let httpOptions: any = { let httpOptions: any = {
method: 'GET', method: 'GET',
url: '/tags/' + tag, url: '/tags/' + templateSrv.replace(tag),
// for cancellations // for cancellations
requestId: options.requestId, requestId: options.requestId,
}; };
...@@ -317,7 +317,7 @@ export function GraphiteDatasource(instanceSettings, $q, backendSrv, templateSrv ...@@ -317,7 +317,7 @@ export function GraphiteDatasource(instanceSettings, $q, backendSrv, templateSrv
method: 'GET', method: 'GET',
url: '/tags/autoComplete/tags', url: '/tags/autoComplete/tags',
params: { params: {
expr: expressions, expr: _.map(expressions, expression => templateSrv.replace(expression)),
}, },
// for cancellations // for cancellations
requestId: options.requestId, requestId: options.requestId,
...@@ -352,8 +352,8 @@ export function GraphiteDatasource(instanceSettings, $q, backendSrv, templateSrv ...@@ -352,8 +352,8 @@ export function GraphiteDatasource(instanceSettings, $q, backendSrv, templateSrv
method: 'GET', method: 'GET',
url: '/tags/autoComplete/values', url: '/tags/autoComplete/values',
params: { params: {
expr: expressions, expr: _.map(expressions, expression => templateSrv.replace(expression)),
tag: tag, tag: templateSrv.replace(tag),
}, },
// for cancellations // for cancellations
requestId: options.requestId, requestId: options.requestId,
......
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