infra thresholds FE

This commit is contained in:
Alex Holliday committed 2025-12-07 03:34:33 +00:00
1 parent 7631e65cd2
commit 0453b790af
9 files changed
+191 -25

No files matched your search

+8 -1
View File
@@ -17,7 +17,8 @@ export const useInitForm = ({
}
}
const defaults: z.infer<typeof monitorSchemaInfra> = {
type InfraValues = z.infer<typeof monitorSchemaInfra>;
const defaults: InfraValues = {
type: "infrastructure",
url: initialData?.url || "",
secret: initialData?.secret || "",
@@ -26,6 +27,12 @@ export const useInitForm = ({
name: initialData?.name || "",
interval: humanInterval,
rejectUnauthorized: true,
thresholds: initialData?.thresholds ?? {
cpu: 100,
memory: 100,
disk: 100,
temperature: 100,
},
};
return { defaults };
}, [initialData]);