mirror of
https://github.com/grafana/grafana.git
synced 2025-02-14 01:23:32 -06:00
updating state if no panel
This commit is contained in:
parent
5082b66e3d
commit
c9cab9b677
@ -72,7 +72,6 @@ export class DashboardViewStateSrv {
|
||||
}
|
||||
|
||||
_.extend(this.state, state);
|
||||
this.dashboard.meta.fullscreen = this.state.fullscreen;
|
||||
|
||||
if (!this.state.fullscreen) {
|
||||
this.state.fullscreen = null;
|
||||
@ -117,10 +116,20 @@ export class DashboardViewStateSrv {
|
||||
}
|
||||
|
||||
syncState() {
|
||||
if (this.dashboard.meta.fullscreen) {
|
||||
if (this.state.fullscreen) {
|
||||
const panel = this.dashboard.getPanelById(this.state.panelId);
|
||||
|
||||
if (!panel) {
|
||||
this.state.fullscreen = null;
|
||||
this.state.panelId = null;
|
||||
this.state.edit = null;
|
||||
|
||||
this.update(this.state);
|
||||
|
||||
setTimeout(() => {
|
||||
appEvents.emit('alert-error', ['Error', 'Panel not found']);
|
||||
}, 100);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user