Improved error handling when rendering dashboard panels, fixes #15913

pull/15970/head
Torkel Ödegaard 6 years ago
parent e31029adaa
commit 2333cf3fd1
  1. 12
      public/app/features/dashboard/containers/DashboardPage.tsx

@ -163,14 +163,20 @@ export class DashboardPage extends PureComponent<Props, State> {
fullscreenPanel: null,
scrollTop: this.state.rememberScrollTop,
},
() => {
dashboard.render();
}
this.triggerPanelsRendering.bind(this)
);
this.setPanelFullscreenClass(false);
}
triggerPanelsRendering() {
try {
this.props.dashboard.render();
} catch (err) {
this.props.notifyApp(createErrorNotification(`Panel rendering error`, err));
}
}
handleFullscreenPanelNotFound(urlPanelId: string) {
// Panel not found
this.props.notifyApp(createErrorNotification(`Panel with id ${urlPanelId} not found`));

Loading…
Cancel
Save