diff --git a/frontend/packages/dashboard/src/core.js b/frontend/packages/dashboard/src/core.js index 6644fff0..fca57613 100644 --- a/frontend/packages/dashboard/src/core.js +++ b/frontend/packages/dashboard/src/core.js @@ -373,7 +373,14 @@ function renderContainerLoad(rows) { const cpuInput = document.createElement("input"); cpuInput.type = "text"; cpuInput.className = "cload-cpu-input"; - cpuInput.placeholder = cv ? cv.cpu_quota : "e.g. 200%"; + // Pre-fill with the current *effective* value (not just a placeholder) + // so submitting after editing only the other field round-trips this one + // unchanged. The form always posts both fields, and the server treats + // an empty field as "clear this override" — a placeholder-only hint + // reads as filled to the eye but posts as empty, silently resetting + // whichever field the user didn't touch. + cpuInput.value = cv ? cv.cpu_quota : ""; + cpuInput.placeholder = "e.g. 200%"; cpuInput.title = 'systemd CPUQuota= value (e.g. "400%"). empty = use hive default'; cpuLabel.append(cpuInput); @@ -384,7 +391,9 @@ function renderContainerLoad(rows) { const memInput = document.createElement("input"); memInput.type = "text"; memInput.className = "cload-mem-input"; - memInput.placeholder = cv ? cv.memory_max : "e.g. 8G"; + // Same reasoning as cpuInput above. + memInput.value = cv ? cv.memory_max : ""; + memInput.placeholder = "e.g. 8G"; memInput.title = 'systemd MemoryMax= value (e.g. "8G", "50%", "infinity"). empty = use hive default'; memLabel.append(memInput);