diff --git a/apps/ui/package.json b/apps/ui/package.json index 88b06a24..24fc2816 100644 --- a/apps/ui/package.json +++ b/apps/ui/package.json @@ -25,6 +25,7 @@ "monaco-editor": "^0.41.0", "react": "^18.2.0", "react-dom": "^18.2.0", + "react-error-boundary": "^6.0.0", "react-hook-form": "7.51.1", "react-hot-toast": "^2.4.0", "react-i18next": "^14.1.0", diff --git a/apps/ui/src/views/organization/Performance.tsx b/apps/ui/src/views/organization/Performance.tsx index 3e9ac3f9..bc52f49e 100644 --- a/apps/ui/src/views/organization/Performance.tsx +++ b/apps/ui/src/views/organization/Performance.tsx @@ -5,7 +5,7 @@ import { Series } from '../../types' import Tile, { TileGrid } from '../../ui/Tile' import PageContent from '../../ui/PageContent' import { SingleSelect } from '../../ui/form/SingleSelect' -import { Button, DataTable, JsonPreview, Modal } from '../../ui' +import { Alert, Button, DataTable, JsonPreview, Modal } from '../../ui' import { useSearchParams } from 'react-router' import { CartesianGrid, Legend, Line, LineChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts' import { format } from 'date-fns' @@ -13,6 +13,7 @@ import './Performance.css' import { PreferencesContext } from '../../ui/PreferencesContext' import { formatDate } from '../../utils' import { useTranslation } from 'react-i18next' +import { ErrorBoundary } from 'react-error-boundary' interface ChartProps { series: Series[] @@ -188,22 +189,24 @@ export default function Performance() { {failed.length && <> -
- { - const date = new Date(timestamp) - return date.toLocaleString() + Failed to load failed jobs.}> +
+ { + const date = new Date(timestamp) + return date.toLocaleString() + }, }, - }, - ]} onSelectRow={row => setSelectedFailed(row) }/> -
+ ]} onSelectRow={row => setSelectedFailed(row) }/> +
+ } =16.13.1' + react-error-overlay@6.1.0: resolution: {integrity: sha512-SN/U6Ytxf1QGkw/9ve5Y+NxBbZM6Ht95tuXNMKs8EJyFa/Vy/+Co3stop3KBHARfn/giv+Lj1uUnTfOJ3moFEQ==} @@ -18567,6 +18575,11 @@ snapshots: react: 18.3.1 scheduler: 0.23.2 + react-error-boundary@6.0.0(react@18.3.1): + dependencies: + '@babel/runtime': 7.27.6 + react: 18.3.1 + react-error-overlay@6.1.0: {} react-fast-compare@3.2.2: {}