fix disk populating bugs
This commit is contained in:
parent
d43363c066
commit
ba97c056d8
@ -73,12 +73,11 @@ async function populateForm (node, type, vmid) {
|
|||||||
diskConfig[type].prefixOrder.forEach(element => {
|
diskConfig[type].prefixOrder.forEach(element => {
|
||||||
addDiskBus.add(new Option(diskConfig[type][element].name, element));
|
addDiskBus.add(new Option(diskConfig[type][element].name, element));
|
||||||
});
|
});
|
||||||
let def = diskConfig[type].prefixOrder[0];
|
addDiskBus.value = diskConfig[type].prefixOrder[0];
|
||||||
addDiskBus.value = def;
|
|
||||||
handleDiskBusChange(diskConfig);
|
handleDiskBusChange(diskConfig);
|
||||||
|
|
||||||
addDiskBus.addEventListener("change", handleDiskBusChange());
|
addDiskBus.addEventListener("change", handleDiskBusChange());
|
||||||
|
|
||||||
|
let addDiskDevice = document.querySelector("#add-disk #device");
|
||||||
addDiskDevice.addEventListener("input", handleDiskDeviceChange());
|
addDiskDevice.addEventListener("input", handleDiskDeviceChange());
|
||||||
addDiskDevice.addEventListener("focus", handleDiskDeviceChange());
|
addDiskDevice.addEventListener("focus", handleDiskDeviceChange());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user