fix storageSelect and sizeInput populating

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
Arthur Lu 2023-01-16 15:16:02 -08:00
parent f7a11046e0
commit 4512242336

View File

@ -137,14 +137,16 @@ function addDiskLine (fieldset, busPrefix, busName, device, storage, storageOpti
} }
}); });
storageSelect.value = storage; storageSelect.value = storage;
field.append(storageSelect);
let sizeInput = document.createElement("input"); let sizeInput = document.createElement("input");
sizeInput.type = "number"; sizeInput.type = "number";
sizeInput.min = 0; sizeInput.min = 0;
deviceInput.value = size; sizeInput.value = size;
if (!diskConfig[type][busPrefix].resizable) { if (!diskConfig[type][busPrefix].resizable) {
deviceInput.disabled = true; sizeInput.disabled = true;
} }
field.append(sizeInput);
} }
function getOrderedUsed(entry){ function getOrderedUsed(entry){