mirror of
https://github.com/grafana/grafana.git
synced 2025-08-06 01:00:24 +08:00
Extension Sidebar: Prevent plugin errors from breaking Grafana (#104983)
feat(extensionsidebar): add an errorboundary to prevent crashing entire app if plugin goes pop
This commit is contained in:
@ -2,7 +2,7 @@ import { css } from '@emotion/css';
|
||||
|
||||
import { GrafanaTheme2 } from '@grafana/data';
|
||||
import { usePluginComponents } from '@grafana/runtime';
|
||||
import { useTheme2 } from '@grafana/ui';
|
||||
import { ErrorBoundaryAlert, useTheme2 } from '@grafana/ui';
|
||||
|
||||
import {
|
||||
EXTENSION_SIDEBAR_EXTENSION_POINT_ID,
|
||||
@ -45,7 +45,9 @@ export function ExtensionSidebar() {
|
||||
return (
|
||||
<div className={styles.sidebarWrapper}>
|
||||
<div className={styles.content}>
|
||||
<ExtensionComponent {...props} />
|
||||
<ErrorBoundaryAlert>
|
||||
<ExtensionComponent {...props} />
|
||||
</ErrorBoundaryAlert>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
Reference in New Issue
Block a user