mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
initial render/refresh timing issues
This commit is contained in:
parent
100ab0ba23
commit
df822a660b
@ -60,6 +60,7 @@ class MetricsPanelCtrl extends PanelCtrl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private onMetricsPanelRefresh() {
|
private onMetricsPanelRefresh() {
|
||||||
|
console.log('metrics_panel_ctrl:onRefresh');
|
||||||
// ignore fetching data if another panel is in fullscreen
|
// ignore fetching data if another panel is in fullscreen
|
||||||
if (this.otherPanelInFullscreenMode()) {
|
if (this.otherPanelInFullscreenMode()) {
|
||||||
return;
|
return;
|
||||||
|
@ -57,12 +57,9 @@ export class PanelCtrl {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
init() {
|
|
||||||
this.dashboard.panelInitialized(this.panel);
|
|
||||||
}
|
|
||||||
|
|
||||||
panelDidMount() {
|
panelDidMount() {
|
||||||
this.events.emit('component-did-mount');
|
this.events.emit('component-did-mount');
|
||||||
|
this.dashboard.panelInitialized(this.panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
renderingCompleted() {
|
renderingCompleted() {
|
||||||
@ -248,6 +245,7 @@ export class PanelCtrl {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render(payload?) {
|
render(payload?) {
|
||||||
|
console.log('panel_ctrl:render');
|
||||||
this.timing.renderStart = new Date().getTime();
|
this.timing.renderStart = new Date().getTime();
|
||||||
this.events.emit('render', payload);
|
this.events.emit('render', payload);
|
||||||
}
|
}
|
||||||
|
@ -209,9 +209,8 @@ function pluginDirectiveLoader($compile, datasourceSrv, $rootScope, $q, $http, $
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
elem.append(child);
|
elem.append(child);
|
||||||
scope.$applyAsync(() => {
|
scope.$applyAsync(() => {
|
||||||
|
console.log('post appendAndCompile, broadcast refresh', scope.panel);
|
||||||
scope.$broadcast('component-did-mount');
|
scope.$broadcast('component-did-mount');
|
||||||
scope.$broadcast('refresh');
|
|
||||||
console.log('appendAndCompile', scope.panel);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -80,6 +80,7 @@ class GraphElement {
|
|||||||
this.annotations = this.ctrl.annotations || [];
|
this.annotations = this.ctrl.annotations || [];
|
||||||
this.buildFlotPairs(this.data);
|
this.buildFlotPairs(this.data);
|
||||||
const graphHeight = this.elem.height();
|
const graphHeight = this.elem.height();
|
||||||
|
console.log('graphHeight', graphHeight);
|
||||||
updateLegendValues(this.data, this.panel, graphHeight);
|
updateLegendValues(this.data, this.panel, graphHeight);
|
||||||
|
|
||||||
this.ctrl.events.emit('render-legend');
|
this.ctrl.events.emit('render-legend');
|
||||||
|
Loading…
Reference in New Issue
Block a user