* Graph: Workaround for DashboardQueryRunner race condition
* Removed deepClone
(cherry picked from commit 6f38883583)
This commit is contained in:
@@ -19,12 +19,13 @@ import { PanelModel } from 'app/features/dashboard/state';
|
||||
import { PanelQueryRunner } from '../query/state/PanelQueryRunner';
|
||||
|
||||
class MetricsPanelCtrl extends PanelCtrl {
|
||||
datasource: DataSourceApi;
|
||||
declare datasource: DataSourceApi;
|
||||
declare range: TimeRange;
|
||||
|
||||
contextSrv: ContextSrv;
|
||||
datasourceSrv: any;
|
||||
timeSrv: any;
|
||||
templateSrv: any;
|
||||
range: TimeRange;
|
||||
interval: any;
|
||||
intervalMs: any;
|
||||
resolution: any;
|
||||
@@ -98,7 +99,6 @@ class MetricsPanelCtrl extends PanelCtrl {
|
||||
// load datasource service
|
||||
return this.datasourceSrv
|
||||
.get(this.panel.datasource, this.panel.scopedVars)
|
||||
.then(this.updateTimeRange.bind(this))
|
||||
.then(this.issueQueries.bind(this))
|
||||
.catch((err: any) => {
|
||||
this.processDataError(err);
|
||||
@@ -178,11 +178,11 @@ class MetricsPanelCtrl extends PanelCtrl {
|
||||
const newTimeData = applyPanelTimeOverrides(this.panel, this.range);
|
||||
this.timeInfo = newTimeData.timeInfo;
|
||||
this.range = newTimeData.timeRange;
|
||||
|
||||
return this.datasource;
|
||||
}
|
||||
|
||||
issueQueries(datasource: DataSourceApi) {
|
||||
this.updateTimeRange(datasource);
|
||||
|
||||
this.datasource = datasource;
|
||||
|
||||
const panel = this.panel as PanelModel;
|
||||
|
||||
@@ -184,10 +184,6 @@ export class GraphCtrl extends MetricsPanelCtrl {
|
||||
actions.push({ text: 'Toggle legend', click: 'ctrl.toggleLegend()', shortcut: 'p l' });
|
||||
}
|
||||
|
||||
issueQueries(datasource: any) {
|
||||
return super.issueQueries(datasource);
|
||||
}
|
||||
|
||||
zoomOut(evt: any) {
|
||||
appEvents.publish(new ZoomOutEvent(2));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user