mirror of
https://github.com/grafana/grafana.git
synced 2024-11-28 19:54:10 -06:00
fix, add targetContainsTemplate()
This commit is contained in:
parent
8d6513a564
commit
5850ae51b1
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user