Skip to content

Commit 540436e

Browse files
committed
inject templateSrv
1 parent 490141d commit 540436e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

public/app/plugins/datasource/cloudwatch/datasource.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function (angular, _, moment, dateMath, CloudWatchAnnotationQuery) {
2323

2424
var queries = [];
2525
options = angular.copy(options);
26-
options.targets = this.expandTemplateVariable(options.targets);
26+
options.targets = this.expandTemplateVariable(options.targets, templateSrv);
2727
_.each(options.targets, function(target) {
2828
if (target.hide || !target.namespace || !target.metricName || _.isEmpty(target.statistics)) {
2929
return;
@@ -338,7 +338,7 @@ function (angular, _, moment, dateMath, CloudWatchAnnotationQuery) {
338338
});
339339
}
340340

341-
this.expandTemplateVariable = function(targets) {
341+
this.expandTemplateVariable = function(targets, templateSrv) {
342342
return _.chain(targets)
343343
.map(function(target) {
344344
var dimensionKey = null;

0 commit comments

Comments
 (0)