fix(beszel): add recovery button when live mode fails

When SSE connection fails, the error UI now shows a specific message
and a button to switch back to historical view, so users don't need
to reload the page to recover.
This commit is contained in:
Thomas Camlong committed 2026-06-15 16:01:14 +02:00
1 parent 2316f6e79d
commit c5b4cf9a0e
2 files changed
+11 -2

No files matched your search

+2
View File
@@ -3703,6 +3703,8 @@
"selectSystem": "Select system",
"error": {
"internalServerError": "Unable to connect to Beszel. Check your integration settings.",
"liveConnectionFailed": "Live connection failed. Your Beszel instance may not support real-time streaming.",
"switchToHistorical": "Switch to historical view",
"systemNotFound": "Selected system was not found. Choose a different system."
},
"chart": {
@@ -1,7 +1,7 @@
"use client";
import { useCallback, useMemo } from "react";
import { ActionIcon, Center, Menu, ScrollArea, Select, SimpleGrid, Stack, Text } from "@mantine/core";
import { ActionIcon, Button, Center, Menu, ScrollArea, Select, SimpleGrid, Stack, Text } from "@mantine/core";
import { IconPlugConnectedX, IconServer, IconQuestionMark } from "@tabler/icons-react";
import { clientApi } from "@homarr/api/client";
@@ -148,8 +148,15 @@ export default function BeszelSystemStatsWidget({
<Stack align="center" gap="sm" p="md">
<IconPlugConnectedX size={40} />
<Text size="sm" c="dimmed" ta="center">
{t("error.internalServerError")}
{t("error.liveConnectionFailed")}
</Text>
<Button
size="xs"
variant="light"
onClick={() => setOptions({ newOptions: { timePeriod: "1h" } })}
>
{t("error.switchToHistorical")}
</Button>
</Stack>
</Center>
);