Commit 91285bae by Torkel Ödegaard

feat(cloudwatch): fixed failing unit tests

parent 875d80aa
...@@ -254,7 +254,7 @@ function (angular, _) { ...@@ -254,7 +254,7 @@ function (angular, _) {
var result = []; var result = [];
_.each(allResponse, function(response, index) { _.each(allResponse, function(response, index) {
var metrics = transformMetricData(response.data, options.targets[index]); var metrics = transformMetricData(response, options.targets[index]);
result = result.concat(metrics); result = result.concat(metrics);
}); });
...@@ -309,7 +309,7 @@ function (angular, _) { ...@@ -309,7 +309,7 @@ function (angular, _) {
} }
return cloudwatch.listMetrics(params).then(function(result) { return cloudwatch.listMetrics(params).then(function(result) {
return _.chain(result.data.Metrics).map(function(metric) { return _.chain(result.Metrics).map(function(metric) {
return metric.Dimensions; return metric.Dimensions;
}).reject(function(metric) { }).reject(function(metric) {
return _.isEmpty(metric); return _.isEmpty(metric);
...@@ -448,7 +448,9 @@ function (angular, _) { ...@@ -448,7 +448,9 @@ function (angular, _) {
data: data data: data
}; };
return $http(options); return $http(options).then(function(result) {
return result.data;
});
}; };
}; };
......
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