Commit 1f3fafb1 by Paresh

mssql: pass timerange for template variable queries

parent 9e33f8b7
......@@ -107,13 +107,24 @@ export class MssqlDatasource {
format: 'table',
};
const data = {
queries: [interpolatedQuery],
};
if (optionalOptions && optionalOptions.range) {
if (optionalOptions.range.from) {
data['from'] = optionalOptions.range.from.valueOf().toString();
}
if (optionalOptions.range.to) {
data['to'] = optionalOptions.range.to.valueOf().toString();
}
}
return this.backendSrv
.datasourceRequest({
url: '/api/tsdb/query',
method: 'POST',
data: {
queries: [interpolatedQuery],
},
data: data,
})
.then(data => this.responseParser.parseMetricFindQueryResult(refId, 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