Commit 5850ae51 by Mitsuhiro Tanda

fix, add targetContainsTemplate()

parent 8d6513a5
......@@ -300,6 +300,15 @@ function (angular, _, moment, dateMath, kbn, templatingVariable) {
});
};
this.targetContainsTemplate = function(target) {
return templateSrv.variableExists(target.region) ||
templateSrv.variableExists(target.namespace) ||
templateSrv.variableExists(target.metricName) ||
_.find(target.dimensions, function(v, k) {
return templateSrv.variableExists(k) || templateSrv.variableExists(v);
});
};
this.testDatasource = function() {
/* use billing metrics for test */
var region = this.defaultRegion;
......
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