Skip to content

Commit 91285ba

Browse files
committed
feat(cloudwatch): fixed failing unit tests
1 parent 875d80a commit 91285ba

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ function (angular, _) {
254254
var result = [];
255255

256256
_.each(allResponse, function(response, index) {
257-
var metrics = transformMetricData(response.data, options.targets[index]);
257+
var metrics = transformMetricData(response, options.targets[index]);
258258
result = result.concat(metrics);
259259
});
260260

@@ -309,7 +309,7 @@ function (angular, _) {
309309
}
310310

311311
return cloudwatch.listMetrics(params).then(function(result) {
312-
return _.chain(result.data.Metrics).map(function(metric) {
312+
return _.chain(result.Metrics).map(function(metric) {
313313
return metric.Dimensions;
314314
}).reject(function(metric) {
315315
return _.isEmpty(metric);
@@ -448,7 +448,9 @@ function (angular, _) {
448448
data: data
449449
};
450450

451-
return $http(options);
451+
return $http(options).then(function(result) {
452+
return result.data;
453+
});
452454
};
453455
};
454456

0 commit comments

Comments
 (0)