Some changes in ui
This commit is contained in:
1 parent
dbea93f9ba
commit
af010e138d
1 file changed
+10
-11
@@ -26,17 +26,16 @@ const SettingsGlobalThresholds = ({
|
|||||||
temperature: "",
|
temperature: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
// Load existing thresholds from settingsData on first render or when settingsData changes
|
// Load existing thresholds from settingsData
|
||||||
useEffect(() => {
|
|
||||||
if (settingsData?.settings?.globalThresholds) {
|
if (settingsData?.settings?.globalThresholds) {
|
||||||
setThresholds({
|
setThresholds({
|
||||||
cpu: settingsData.settings.globalThresholds.cpu || "",
|
cpu: settingsData.settings.globalThresholds.cpu || "",
|
||||||
memory: settingsData.settings.globalThresholds.memory || "",
|
memory: settingsData.settings.globalThresholds.memory || "",
|
||||||
disk: settingsData.settings.globalThresholds.disk || "",
|
disk: settingsData.settings.globalThresholds.disk || "",
|
||||||
temperature: settingsData.settings.globalThresholds.temperature || "",
|
temperature: settingsData.settings.globalThresholds.temperature || "",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}, [settingsData]);
|
|
||||||
|
|
||||||
// Handles input change and updates state & parent data
|
// Handles input change and updates state & parent data
|
||||||
const handleChange = (e, min, max) => {
|
const handleChange = (e, min, max) => {
|
||||||
|
|||||||
Reference in new issue
Block a user