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:
2 files changed
+11
-2
No files matched your search
@@ -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>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user