change volume contents includes to be specific to bus type
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
parent
c8141943f5
commit
1e035e878c
@ -4,15 +4,13 @@ window.addEventListener("DOMContentLoaded", init);
|
|||||||
|
|
||||||
let diskConfig = {
|
let diskConfig = {
|
||||||
lxc: {
|
lxc: {
|
||||||
storageContent: "rootdir",
|
|
||||||
prefixOrder: ["mp"],
|
prefixOrder: ["mp"],
|
||||||
mp: {name: "MP", limit: 255, used: {}, icon: "images/resources/drive.svg", resizable: true, hasPath: true, hasDiskImage: false}
|
mp: {name: "MP", limit: 255, used: {}, icon: "images/resources/drive.svg", storageContent: "rootdir",resizable: true, hasPath: true, hasDiskImage: false}
|
||||||
},
|
},
|
||||||
qemu: {
|
qemu: {
|
||||||
storageContent: "images",
|
|
||||||
prefixOrder: ["sata", "ide"],
|
prefixOrder: ["sata", "ide"],
|
||||||
ide: {name: "IDE", limit: 3, used: {}, icon: "images/resources/disk.svg", reziable: false, hasPath: false, hasDiskImage: true},
|
ide: {name: "IDE", limit: 3, used: {}, icon: "images/resources/disk.svg", storageContent: "iso", reziable: false, hasPath: false, hasDiskImage: true},
|
||||||
sata: {name: "SATA", limit: 5, used: {}, icon: "images/resources/drive.svg", resizable: true, hasPath: false, hasDiskImage: false}
|
sata: {name: "SATA", limit: 5, used: {}, icon: "images/resources/drive.svg", storageContent: "images", resizable: true, hasPath: false, hasDiskImage: false}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -131,7 +129,7 @@ function addDiskLine (fieldset, busPrefix, busName, device, storage, storageOpti
|
|||||||
|
|
||||||
let storageSelect = document.createElement("select");
|
let storageSelect = document.createElement("select");
|
||||||
storageOptions.data.forEach((element) => {
|
storageOptions.data.forEach((element) => {
|
||||||
if (element.content.includes(diskConfig[type].storageContent)) { // check if the storage contains rootdir or images content
|
if (element.content.includes(diskConfig[type][busPrefix].storageContent)) { // check if the storage contains rootdir or images content
|
||||||
storageSelect.add(new Option(element.storage));
|
storageSelect.add(new Option(element.storage));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user