mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge pull request #15970 from grafana/dashboard-rendering-error-handling
Improved error handling when rendering dashboard panels
This commit is contained in:
commit
d8c2264670
@ -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…
Reference in New Issue
Block a user