mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-20 11:39:49 +00:00
Update homebridge, autobrr, truenas, tubearchivist, watchtower, pyload widgets
This commit is contained in:
parent
f473d324df
commit
00163d2f44
10 changed files with 40 additions and 14 deletions
|
@ -41,8 +41,9 @@ export default function Component({ service }) {
|
|||
const { data: alertData, error: alertError } = useWidgetAPI(widget, "alerts");
|
||||
const { data: statusData, error: statusError } = useWidgetAPI(widget, "status");
|
||||
|
||||
if (alertError || statusError) {
|
||||
return <Container error={t("widget.api_error")} />;
|
||||
if (alertError || alertData?.error || statusError || statusData?.error) {
|
||||
const finalError = alertError ?? alertData?.error ?? statusError ?? statusData?.error;
|
||||
return <Container error={finalError} />;
|
||||
}
|
||||
|
||||
if (!alertData || !statusData) {
|
||||
|
|
|
@ -14,6 +14,10 @@ const widget = {
|
|||
},
|
||||
status: {
|
||||
endpoint: "system/info",
|
||||
validate: [
|
||||
"loadavg",
|
||||
"uptime_seconds"
|
||||
]
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue