utils cleanup, initial static generation
This commit is contained in:
1 parent
ec8700f3e9
commit
e1a3a82f75
86 files changed
+279
-261
No files matched your search
@@ -12,18 +12,10 @@ export default function Component({ service }) {
|
||||
const config = service.widget;
|
||||
|
||||
const { data: statusData, error: statusError } = useSWR(
|
||||
`/api/docker/status/${config.container}/${config.server || ""}`,
|
||||
{
|
||||
refreshInterval: 5000,
|
||||
}
|
||||
`/api/docker/status/${config.container}/${config.server || ""}`
|
||||
);
|
||||
|
||||
const { data: statsData, error: statsError } = useSWR(
|
||||
`/api/docker/stats/${config.container}/${config.server || ""}`,
|
||||
{
|
||||
refreshInterval: 5000,
|
||||
}
|
||||
);
|
||||
const { data: statsData, error: statsError } = useSWR(`/api/docker/stats/${config.container}/${config.server || ""}`);
|
||||
|
||||
if (statsError || statusError) {
|
||||
return <Widget error={t("widget.api_error")} />;
|
||||
|
||||
Reference in new issue
Block a user