From 216c7753b4a8504e4d37641ef09088afa0da0338 Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Thu, 19 Feb 2026 17:33:28 +0000 Subject: [PATCH] add global thresholds configbox --- client/src/Pages/Settings/index.tsx | 85 ++++++++++++++++++++++++++++- client/src/locales/en.json | 22 ++++++++ 2 files changed, 106 insertions(+), 1 deletion(-) diff --git a/client/src/Pages/Settings/index.tsx b/client/src/Pages/Settings/index.tsx index 270e0a26f..b5d93b12e 100644 --- a/client/src/Pages/Settings/index.tsx +++ b/client/src/Pages/Settings/index.tsx @@ -327,11 +327,93 @@ export const SettingsPage = () => { color="error" onClick={() => setIsStatsDialogOpen(true)} > - {t("common.buttons.clear")} + {t("pages.settings.form.stats.buttonText")} } /> )} + + {/* Global Thresholds */} + {isAdmin && ( + + ( + + )} + /> + ( + + )} + /> + ( + + )} + /> + ( + + )} + /> + + } + /> + )} {/* Clear Stats Confirmation Dialog */} @@ -370,6 +452,7 @@ export const SettingsPage = () => { {t("common.buttons.save")} +
{JSON.stringify(form.formState.isValid, null, 2)}
); }; diff --git a/client/src/locales/en.json b/client/src/locales/en.json index 2af79c1f7..ef7ea8591 100644 --- a/client/src/locales/en.json +++ b/client/src/locales/en.json @@ -994,6 +994,28 @@ "title": "Clear all monitoring history?", "description": "This cannot be undone" } + }, + "thresholds": { + "title": "Global Thresholds", + "description": "Set global CPU, Memory, Disk, and Temperature thresholds for infrastructure monitoring. These apply to all hardware monitors unless overridden.", + "option": { + "cpu": { + "label": "CPU Threshold (%)", + "placeholder": "0 - 100" + }, + "memory": { + "label": "Memory Threshold (%)", + "placeholder": "0 - 100" + }, + "disk": { + "label": "Disk Threshold (%)", + "placeholder": "0 - 100" + }, + "temperature": { + "label": "Temperature Threshold (°C)", + "placeholder": "0 - 150" + } + } } } },