fix disk populating issue

This commit is contained in:
Arthur Lu 2023-01-09 23:51:11 -08:00
parent ff31563f88
commit fff454ea0e

View File

@ -52,7 +52,7 @@ async function populateForm (node, type, vmid) {
let disks = {}; let disks = {};
Object.keys(config.data).forEach(element => { Object.keys(config.data).forEach(element => {
if (element.startsWith(prefix)) { if (element.startsWith(prefix)) {
element.replace(prefix, "") = config.data[element]; disks[element.replace(prefix, "")] = config.data[element];
} }
}); });
let ordered_keys = Object.keys(disks).sort((a,b) => {parseInt(a) - parseInt(b)}); // ordered integer list let ordered_keys = Object.keys(disks).sort((a,b) => {parseInt(a) - parseInt(b)}); // ordered integer list