disable bus when lxc,
disable path when qemu
This commit is contained in:
parent
a1727eebdc
commit
d0482e867f
@ -23,11 +23,12 @@
|
||||
<legend>Disks</legend>
|
||||
<div class="input-grid" id="disks" style="grid-template-columns: repeat(3, auto) 1fr;"></div>
|
||||
<hr>
|
||||
<div class="input-grid btn-group" id="add-disk" style="grid-template-columns: repeat(8, auto) 1fr;">
|
||||
<div class="input-grid btn-group" id="add-disk" style="grid-template-columns: repeat(10, auto) 1fr;">
|
||||
<label for="bus">Bus</label><select id="bus"></select>
|
||||
<label for="device">Device</label><input id="device" type="number" step="1" min="0" max="0" value="0">
|
||||
<label for="storage">Storage</label><select id="storage"></select>
|
||||
<label for="size">Size(GiB)</label><input id="size" type="number" step="1" min="0" max="0" value="0">
|
||||
<label for="size">Path</label><input id="path">
|
||||
<div style="width: 100%; display: flex; justify-content: flex-end; align-items: center;"><img id="disk-add" src="images/actions/create.svg"></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
@ -145,6 +145,9 @@ async function populateAddDisk () {
|
||||
});
|
||||
addDiskBus.value = diskConfig[type].prefixOrder[0];
|
||||
handleDiskBusChange(diskConfig);
|
||||
if (type === "lxc") {
|
||||
addDiskBus.disabled = true;
|
||||
}
|
||||
addDiskBus.addEventListener("change", handleDiskBusChange);
|
||||
|
||||
let addDiskDevice = document.querySelector("#add-disk #device");
|
||||
@ -158,7 +161,13 @@ async function populateAddDisk () {
|
||||
addDiskStorage.add(new Option(element.storage));
|
||||
}
|
||||
});
|
||||
|
||||
let addDiskSize = document.querySelector("#add-disk #size");
|
||||
|
||||
let addDiskPath = document.querySelector("#add-disk #path");
|
||||
if (type === "qemu") {
|
||||
addDiskPath.disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
function handleDiskBusChange () {
|
||||
|
Loading…
Reference in New Issue
Block a user