mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
wip: major change for refresh and render events flow
This commit is contained in:
@@ -200,6 +200,34 @@ export class DashboardModel {
|
||||
this.events.emit('view-mode-changed', panel);
|
||||
}
|
||||
|
||||
startRefresh() {
|
||||
this.events.emit('refresh');
|
||||
|
||||
for (const panel of this.panels) {
|
||||
if (!this.otherPanelInFullscreen(panel)) {
|
||||
panel.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
this.events.emit('render');
|
||||
|
||||
for (const panel of this.panels) {
|
||||
panel.render();
|
||||
}
|
||||
}
|
||||
|
||||
panelInitialized(panel: PanelModel) {
|
||||
if (!this.otherPanelInFullscreen(panel)) {
|
||||
panel.refresh();
|
||||
}
|
||||
}
|
||||
|
||||
otherPanelInFullscreen(panel: PanelModel) {
|
||||
return this.meta.fullscreen && !panel.fullscreen;
|
||||
}
|
||||
|
||||
private ensureListExist(data) {
|
||||
if (!data) {
|
||||
data = {};
|
||||
|
||||
Reference in New Issue
Block a user