Commit 119f5427 by Torkel Ödegaard

fix: fix cloudwatch metricFindQuery error that stopped it working completely, fixes #9876

parent 5b674ce2
......@@ -333,7 +333,7 @@ function (angular, _, moment, dateMath, kbn, templatingVariable) {
};
return backendSrv.datasourceRequest(options).then(function(result) {
return result;
return result.data;
});
};
......
......@@ -68,7 +68,7 @@ describe('CloudWatchDatasource', function() {
beforeEach(function() {
ctx.backendSrv.datasourceRequest = function(params) {
requestParams = params.data;
return ctx.$q.when(response);
return ctx.$q.when({data: response});
};
});
......@@ -213,7 +213,7 @@ describe('CloudWatchDatasource', function() {
beforeEach(function() {
ctx.backendSrv.datasourceRequest = function(params) {
requestParams = params.data;
return ctx.$q.when(response);
return ctx.$q.when({data: response});
};
});
......@@ -235,7 +235,7 @@ describe('CloudWatchDatasource', function() {
setupCallback();
ctx.backendSrv.datasourceRequest = args => {
scenario.request = args.data;
return ctx.$q.when(scenario.requestResponse);
return ctx.$q.when({data: scenario.requestResponse});
};
ctx.ds.metricFindQuery(query).then(args => {
scenario.result = args;
......
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