From 5e03f48ba69ed15e828a406e0111db7a57e421d7 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Tue, 17 Jan 2023 10:18:22 -0800 Subject: [PATCH] min input content, disable disk device reassignment for all disks Signed-off-by: Arthur Lu --- css/form.css | 1 + scripts/config.js | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/css/form.css b/css/form.css index 203814c..badff4f 100644 --- a/css/form.css +++ b/css/form.css @@ -24,6 +24,7 @@ input, label, legend { input { border: solid white 1px; + width: min-content; } input:focus { diff --git a/scripts/config.js b/scripts/config.js index eb0ec32..3ea4826 100644 --- a/scripts/config.js +++ b/scripts/config.js @@ -122,6 +122,10 @@ function addDiskLine (fieldset, busPrefix, busName, device, diskDataParsed, stor deviceInput.disabled = true; deviceInput.classList.add("hidden"); } + // for now, disable disk device reassignment + deviceInput.disabled = true; + // + deviceInput.addEventListener("change", handleDeviceChange); field.append(deviceInput); let storage = diskDataParsed.storage; @@ -164,6 +168,11 @@ function addDiskLine (fieldset, busPrefix, busName, device, diskDataParsed, stor field.append(deleteDiv); } +function handleDeviceChange () { + let newDevice = this.value; + if () {} +} + function getOrderedUsed(entry){ let ordered_keys = Object.keys(entry.used).sort((a,b) => {parseInt(a) - parseInt(b)}); // ordered integer list return ordered_keys;