mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
Fix: Improve error handling for Glances widgets when host is unreachable (#3657)
--------- Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { useTranslation } from "next-i18next";
|
||||
|
||||
import Error from "../components/error";
|
||||
import Container from "../components/container";
|
||||
import Block from "../components/block";
|
||||
|
||||
@@ -84,20 +83,13 @@ export default function Component({ service }) {
|
||||
refreshInterval: defaultSystemInterval,
|
||||
});
|
||||
|
||||
if (quicklookError) {
|
||||
return (
|
||||
<Container chart={chart}>
|
||||
<Error error={quicklookError} />
|
||||
</Container>
|
||||
);
|
||||
if (quicklookError || (quicklookData && quicklookData.error)) {
|
||||
const qlError = quicklookError || quicklookData.error;
|
||||
return <Container error={qlError} widget={widget} />;
|
||||
}
|
||||
|
||||
if (systemError) {
|
||||
return (
|
||||
<Container chart={chart}>
|
||||
<Error error={systemError} />
|
||||
</Container>
|
||||
);
|
||||
return <Container error={systemError} service={service} />;
|
||||
}
|
||||
|
||||
const dataCharts = [];
|
||||
|
||||
Reference in New Issue
Block a user