mirror of
https://github.com/bluewave-labs/Checkmate.git
synced 2026-05-20 08:28:48 -05:00
min values
This commit is contained in:
@@ -359,6 +359,7 @@ export const SettingsPage = () => {
|
||||
}}
|
||||
fieldLabel={t("pages.settings.form.thresholds.option.cpu.label")}
|
||||
type="number"
|
||||
inputProps={{ min: 0 }}
|
||||
placeholder={t(
|
||||
"pages.settings.form.thresholds.option.cpu.placeholder"
|
||||
)}
|
||||
@@ -383,6 +384,7 @@ export const SettingsPage = () => {
|
||||
}}
|
||||
fieldLabel={t("pages.settings.form.thresholds.option.memory.label")}
|
||||
type="number"
|
||||
inputProps={{ min: 0 }}
|
||||
placeholder={t(
|
||||
"pages.settings.form.thresholds.option.memory.placeholder"
|
||||
)}
|
||||
@@ -407,6 +409,7 @@ export const SettingsPage = () => {
|
||||
}}
|
||||
fieldLabel={t("pages.settings.form.thresholds.option.disk.label")}
|
||||
type="number"
|
||||
inputProps={{ min: 0 }}
|
||||
placeholder={t(
|
||||
"pages.settings.form.thresholds.option.disk.placeholder"
|
||||
)}
|
||||
@@ -433,6 +436,7 @@ export const SettingsPage = () => {
|
||||
"pages.settings.form.thresholds.option.temperature.label"
|
||||
)}
|
||||
type="number"
|
||||
inputProps={{ min: 0 }}
|
||||
placeholder={t(
|
||||
"pages.settings.form.thresholds.option.temperature.placeholder"
|
||||
)}
|
||||
|
||||
@@ -45,25 +45,25 @@ export const settingsSchema = z.object({
|
||||
cpu: z
|
||||
.number()
|
||||
.int()
|
||||
.min(1, "Please enter a value")
|
||||
.min(1, "Please enter a valid value")
|
||||
.max(100, "Maximum value is 100")
|
||||
.optional(),
|
||||
memory: z
|
||||
.number()
|
||||
.int()
|
||||
.min(1, "Please enter a value")
|
||||
.min(1, "Please enter a valid value")
|
||||
.max(100, "Maximum value is 100")
|
||||
.optional(),
|
||||
disk: z
|
||||
.number()
|
||||
.int()
|
||||
.min(1, "Please enter a value")
|
||||
.min(1, "Please enter a valid value")
|
||||
.max(100, "Maximum value is 100")
|
||||
.optional(),
|
||||
temperature: z
|
||||
.number()
|
||||
.int()
|
||||
.min(1, "Please enter a value")
|
||||
.min(1, "Please enter a valid value")
|
||||
.max(150, "Maximum value is 150")
|
||||
.optional(),
|
||||
})
|
||||
|
||||
@@ -1001,19 +1001,19 @@
|
||||
"option": {
|
||||
"cpu": {
|
||||
"label": "CPU Threshold (%)",
|
||||
"placeholder": "0 - 100"
|
||||
"placeholder": "1 - 100"
|
||||
},
|
||||
"memory": {
|
||||
"label": "Memory Threshold (%)",
|
||||
"placeholder": "0 - 100"
|
||||
"placeholder": "1 - 100"
|
||||
},
|
||||
"disk": {
|
||||
"label": "Disk Threshold (%)",
|
||||
"placeholder": "0 - 100"
|
||||
"placeholder": "1 - 100"
|
||||
},
|
||||
"temperature": {
|
||||
"label": "Temperature Threshold (°C)",
|
||||
"placeholder": "0 - 150"
|
||||
"placeholder": "1 - 150"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user