Commit c86cdb18 by Mathieu Payeur Levallois Committed by Torkel Ödegaard

opentsdb: apply templating on filters (#4594)

parent bd155343
...@@ -376,11 +376,16 @@ function (angular, _, dateMath) { ...@@ -376,11 +376,16 @@ function (angular, _, dateMath) {
if (target.filters && target.filters.length > 0) { if (target.filters && target.filters.length > 0) {
query.filters = angular.copy(target.filters); query.filters = angular.copy(target.filters);
if(query.filters){
for(var filter_key in query.filters){
query.filters[filter_key].filter = templateSrv.replace(query.filters[filter_key].filter, options.scopedVars, 'pipe');
}
}
} else { } else {
query.tags = angular.copy(target.tags); query.tags = angular.copy(target.tags);
if(query.tags){ if(query.tags){
for(var key in query.tags){ for(var tag_key in query.tags){
query.tags[key] = templateSrv.replace(query.tags[key], options.scopedVars, 'pipe'); query.tags[tag_key] = templateSrv.replace(query.tags[tag_key], options.scopedVars, 'pipe');
} }
} }
} }
......
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