|
@@ -9,7 +9,7 @@ export class MysqlDatasource {
|
|
|
queryModel: MysqlQuery;
|
|
queryModel: MysqlQuery;
|
|
|
|
|
|
|
|
/** @ngInject **/
|
|
/** @ngInject **/
|
|
|
- constructor(instanceSettings, private backendSrv, private $q, private templateSrv) {
|
|
|
|
|
|
|
+ constructor(instanceSettings, private backendSrv, private $q, private templateSrv, private timeSrv) {
|
|
|
this.name = instanceSettings.name;
|
|
this.name = instanceSettings.name;
|
|
|
this.id = instanceSettings.id;
|
|
this.id = instanceSettings.id;
|
|
|
this.responseParser = new ResponseParser(this.$q);
|
|
this.responseParser = new ResponseParser(this.$q);
|
|
@@ -108,8 +108,11 @@ export class MysqlDatasource {
|
|
|
format: 'table',
|
|
format: 'table',
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ const range = this.timeSrv.timeRange();
|
|
|
const data = {
|
|
const data = {
|
|
|
queries: [interpolatedQuery],
|
|
queries: [interpolatedQuery],
|
|
|
|
|
+ from: range.from.valueOf().toString(),
|
|
|
|
|
+ to: range.to.valueOf().toString(),
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
if (optionalOptions && optionalOptions.range && optionalOptions.range.from) {
|
|
if (optionalOptions && optionalOptions.range && optionalOptions.range.from) {
|