This commit is contained in:
2026-02-14 14:28:41 +01:00
parent b088f19b18
commit e1e717a54c
9 changed files with 90 additions and 43 deletions
+14 -5
View File
@@ -17,12 +17,21 @@ import { getDeployments } from "@/lib/dockship/deploy";
import { useAsync, useAsyncInterval } from "@/hooks/use-async";
export default function OverviewPage() {
const { value: nodes } = useAsyncInterval([], getLiveNodes, 3000);
const { value: dockerNodes } = useAsync([], async () => getDocker(nodes), [
nodes,
]);
const { value: apps } = useAsyncInterval([], getApps, 3000);
const { value: nodes } = useAsyncInterval(
"liveNodes",
[],
getLiveNodes,
3000,
);
const { value: dockerNodes } = useAsync(
"docker",
[],
async () => getDocker(nodes),
[nodes],
);
const { value: apps } = useAsyncInterval("apps", [], getApps, 3000);
const { value: deployments } = useAsyncInterval(
"deployments",
[],
async () => (await getDeployments()).filter((d) => d !== null),
3000,