diff --git a/frontend/src/layouts/page.tsx b/frontend/src/layouts/page.tsx
index 8835fd8da..11ef2d989 100644
--- a/frontend/src/layouts/page.tsx
+++ b/frontend/src/layouts/page.tsx
@@ -1,6 +1,6 @@
import { ConfirmUpdate } from "@components/config/confirm-update";
import { Button } from "@ui/button";
-import { Settings, Save, History } from "lucide-react";
+import { Settings, History } from "lucide-react";
import { ReactNode } from "react";
interface PageProps {
diff --git a/frontend/src/pages/dashboard/components/servers-chart.tsx b/frontend/src/pages/dashboard/components/servers-chart.tsx
index 3fc27c074..99c568363 100644
--- a/frontend/src/pages/dashboard/components/servers-chart.tsx
+++ b/frontend/src/pages/dashboard/components/servers-chart.tsx
@@ -6,10 +6,12 @@ import { ServerStatus } from "@monitor/client/dist/types";
export const ServersChart = () => {
const { data } = useRead("ListServers", {});
- const running = data?.filter((d) => d.status === ServerStatus.Ok).length;
- const stopped = data?.filter((d) => d.status === ServerStatus.NotOk).length;
+ const running = data?.filter((d) => d.info.status === ServerStatus.Ok).length;
+ const stopped = data?.filter(
+ (d) => d.info.status === ServerStatus.NotOk
+ ).length;
const not_deployed = data?.filter(
- (d) => d.status === ServerStatus.Disabled
+ (d) => d.info.status === ServerStatus.Disabled
).length;
return (
diff --git a/frontend/src/resources/alerter/index.tsx b/frontend/src/resources/alerter/index.tsx
index fefa9af44..56632b711 100644
--- a/frontend/src/resources/alerter/index.tsx
+++ b/frontend/src/resources/alerter/index.tsx
@@ -32,7 +32,7 @@ export const AlerterCard = ({ id }: { id: string }) => {
}
>
diff --git a/frontend/src/resources/build/index.tsx b/frontend/src/resources/build/index.tsx
index 24fe0921e..979d2153b 100644
--- a/frontend/src/resources/build/index.tsx
+++ b/frontend/src/resources/build/index.tsx
@@ -41,7 +41,7 @@ export const BuildCard = ({ id }: { id: string }) => {
}
>
diff --git a/frontend/src/resources/build/util.tsx b/frontend/src/resources/build/util.tsx
index 130a60579..3ef045946 100644
--- a/frontend/src/resources/build/util.tsx
+++ b/frontend/src/resources/build/util.tsx
@@ -11,7 +11,7 @@ export const BuildName = ({ id }: { id: string | undefined }) => {
export const BuildVersion = ({ id }: { id: string }) => {
const builds = useRead("ListBuilds", {}).data;
const build = builds?.find((b) => b.id === id);
- return <>{version_to_string(build?.version) ?? "..."}>;
+ return <>{version_to_string(build?.info.version) ?? "..."}>;
};
export const BuildBuilder = ({ id }: { id: string }) => {
@@ -23,7 +23,7 @@ export const BuildBuilder = ({ id }: { id: string }) => {
export const BuildLastBuilt = ({ id }: { id: string }) => {
const builds = useRead("ListBuilds", {}).data;
const build = builds?.find((b) => b.id === id);
- const last = build?.last_built_at;
+ const last = build?.info.last_built_at;
return <>{last ? new Date(last).toLocaleString() : "not yet built"}>;
};
diff --git a/frontend/src/resources/deployment/components/actions.tsx b/frontend/src/resources/deployment/components/actions.tsx
index a6b3b5f15..578abd03a 100644
--- a/frontend/src/resources/deployment/components/actions.tsx
+++ b/frontend/src/resources/deployment/components/actions.tsx
@@ -14,7 +14,7 @@ export const RedeployContainer = ({ deployment_id }: DeploymentId) => {
const deployment = deployments?.find((d) => d.id === deployment_id);
return (
}
onClick={() => mutate({ deployment_id })}
@@ -61,9 +61,9 @@ export const StartOrStopContainer = ({ deployment_id }: DeploymentId) => {
const deployments = useRead("ListDeployments", {}).data;
const deployment = deployments?.find((d) => d.id === deployment_id);
- if (deployment?.state === DockerContainerState.NotDeployed) return null;
+ if (deployment?.info.state === DockerContainerState.NotDeployed) return null;
- if (deployment?.state === DockerContainerState.Running)
+ if (deployment?.info.state === DockerContainerState.Running)
return ;
return ;
};
@@ -74,7 +74,7 @@ export const RemoveContainer = ({ deployment_id }: DeploymentId) => {
const deployments = useRead("ListDeployments", {}).data;
const deployment = deployments?.find((d) => d.id === deployment_id);
- if (deployment?.state === DockerContainerState.NotDeployed) return null;
+ if (deployment?.info.state === DockerContainerState.NotDeployed) return null;
if (!d) return null;
return (
diff --git a/frontend/src/resources/deployment/components/deployment-logs.tsx b/frontend/src/resources/deployment/components/deployment-logs.tsx
index d056efed1..7450e6101 100644
--- a/frontend/src/resources/deployment/components/deployment-logs.tsx
+++ b/frontend/src/resources/deployment/components/deployment-logs.tsx
@@ -23,7 +23,7 @@ export const DeploymentLogs = ({
const deployments = useRead("ListDeployments", {}).data;
const deployment = deployments?.find((d) => d.id === deployment_id);
- if (deployment?.state === DockerContainerState.NotDeployed) return null;
+ if (deployment?.info.state === DockerContainerState.NotDeployed) return null;
return (
diff --git a/frontend/src/resources/server/config.tsx b/frontend/src/resources/server/config.tsx
index 888dcfd73..01d8a4467 100644
--- a/frontend/src/resources/server/config.tsx
+++ b/frontend/src/resources/server/config.tsx
@@ -5,13 +5,6 @@ import { useRead, useWrite } from "@hooks";
import { Section } from "@layouts/page";
import { Types } from "@monitor/client";
import { Button } from "@ui/button";
-import {
- Card,
- CardContent,
- CardDescription,
- CardHeader,
- CardTitle,
-} from "@ui/card";
import { Input } from "@ui/input";
import { Settings, Save, History } from "lucide-react";
import { useState } from "react";
@@ -21,7 +14,7 @@ type ServerUpdate = Partial;
export const SerCon = ({ id }: { id: string }) => {
const config = useRead("GetServer", { id }).data?.config;
- const { mutate, isLoading } = useWrite("UpdateServer");
+ const { mutate } = useWrite("UpdateServer");
const [update, set] = useState({});
const up = (
k: K,