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