Merge pull request #15970 from grafana/dashboard-rendering-error-handling

Improved error handling when rendering dashboard panels
This commit is contained in:
Torkel Ödegaard 2019-03-13 12:19:58 +01:00 committed by GitHub
commit d8c2264670
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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`));