mirror of
https://github.com/grafana/grafana.git
synced 2024-12-02 13:39:19 -06:00
NewPanelEditor: bring back queries not being run on editmode navigation (#23837)
This commit is contained in:
parent
2f5bea27b1
commit
6320e5c91f
@ -315,14 +315,18 @@ export class DashboardModel {
|
||||
panelInitialized(panel: PanelModel) {
|
||||
panel.initialized();
|
||||
|
||||
// refresh new panels unless we are in fullscreen / edit mode
|
||||
if (!this.otherPanelInFullscreen(panel)) {
|
||||
panel.refresh();
|
||||
}
|
||||
|
||||
// refresh if panel is in edit mode and there is no last result
|
||||
if (this.panelInEdit === panel && !this.panelInEdit.getQueryRunner().getLastResult()) {
|
||||
panel.refresh();
|
||||
if (this.panelInEdit === panel) {
|
||||
if (this.panelInEdit.getQueryRunner().getLastResult()) {
|
||||
return;
|
||||
} else {
|
||||
// refresh if panel is in edit mode and there is no last result
|
||||
panel.refresh();
|
||||
}
|
||||
} else {
|
||||
// refresh new panels unless we are in fullscreen / edit mode
|
||||
if (!this.otherPanelInFullscreen(panel)) {
|
||||
panel.refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user