diff --git a/client/src/Pages/CreateMonitor/index.tsx b/client/src/Pages/CreateMonitor/index.tsx index e7ceb52b1..76848d269 100644 --- a/client/src/Pages/CreateMonitor/index.tsx +++ b/client/src/Pages/CreateMonitor/index.tsx @@ -486,6 +486,114 @@ const CreateMonitorPage = () => { } /> + {/* Alert Thresholds - only for hardware type */} + {generalSettingsConfig.showSecret && ( + + ( + { + const val = e.target.value; + field.onChange(val === "" ? 0 : Number(val)); + }} + type="number" + fieldLabel={t( + "pages.createMonitor.form.thresholds.option.cpuThreshold.label" + )} + placeholder={t( + "pages.createMonitor.form.thresholds.option.cpuThreshold.placeholder" + )} + fullWidth + error={!!fieldState.error} + helperText={fieldState.error?.message ?? ""} + /> + )} + /> + ( + { + const val = e.target.value; + field.onChange(val === "" ? 0 : Number(val)); + }} + type="number" + fieldLabel={t( + "pages.createMonitor.form.thresholds.option.memoryThreshold.label" + )} + placeholder={t( + "pages.createMonitor.form.thresholds.option.memoryThreshold.placeholder" + )} + fullWidth + error={!!fieldState.error} + helperText={fieldState.error?.message ?? ""} + /> + )} + /> + ( + { + const val = e.target.value; + field.onChange(val === "" ? 0 : Number(val)); + }} + type="number" + fieldLabel={t( + "pages.createMonitor.form.thresholds.option.diskThreshold.label" + )} + placeholder={t( + "pages.createMonitor.form.thresholds.option.diskThreshold.placeholder" + )} + fullWidth + error={!!fieldState.error} + helperText={fieldState.error?.message ?? ""} + /> + )} + /> + ( + { + const val = e.target.value; + field.onChange(val === "" ? 0 : Number(val)); + }} + type="number" + fieldLabel={t( + "pages.createMonitor.form.thresholds.option.tempThreshold.label" + )} + placeholder={t( + "pages.createMonitor.form.thresholds.option.tempThreshold.placeholder" + )} + fullWidth + error={!!fieldState.error} + helperText={fieldState.error?.message ?? ""} + /> + )} + /> + + } + /> + )} +