fix(client): validate hardware alert thresholds on the wizard's second step
This commit is contained in:
1 parent
01c3870b22
commit
8572065ef7
1 file changed
+8
-4
@@ -128,19 +128,23 @@ const hardwareSchema = baseSchema.extend({
|
|||||||
cpuAlertThreshold: z
|
cpuAlertThreshold: z
|
||||||
.number()
|
.number()
|
||||||
.min(0, "CPU threshold must be at least 0")
|
.min(0, "CPU threshold must be at least 0")
|
||||||
.max(100, "CPU threshold must be at most 100"),
|
.max(100, "CPU threshold must be at most 100")
|
||||||
|
.register(monitorStepRegistry, { step: 1 }),
|
||||||
memoryAlertThreshold: z
|
memoryAlertThreshold: z
|
||||||
.number()
|
.number()
|
||||||
.min(0, "Memory threshold must be at least 0")
|
.min(0, "Memory threshold must be at least 0")
|
||||||
.max(100, "Memory threshold must be at most 100"),
|
.max(100, "Memory threshold must be at most 100")
|
||||||
|
.register(monitorStepRegistry, { step: 1 }),
|
||||||
diskAlertThreshold: z
|
diskAlertThreshold: z
|
||||||
.number()
|
.number()
|
||||||
.min(0, "Disk threshold must be at least 0")
|
.min(0, "Disk threshold must be at least 0")
|
||||||
.max(100, "Disk threshold must be at most 100"),
|
.max(100, "Disk threshold must be at most 100")
|
||||||
|
.register(monitorStepRegistry, { step: 1 }),
|
||||||
tempAlertThreshold: z
|
tempAlertThreshold: z
|
||||||
.number()
|
.number()
|
||||||
.min(0, "Temperature threshold must be at least 0")
|
.min(0, "Temperature threshold must be at least 0")
|
||||||
.max(150, "Temperature threshold must be at most 150"),
|
.max(150, "Temperature threshold must be at most 150")
|
||||||
|
.register(monitorStepRegistry, { step: 1 }),
|
||||||
selectedDisks: z.array(z.string()),
|
selectedDisks: z.array(z.string()),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user