From 589ecc1f9e4d75d5ae7757053a5486a93dfb2a26 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Tue, 20 Dec 2022 15:37:04 -0800 Subject: [PATCH] add populating sata drives --- scripts/config.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/config.js b/scripts/config.js index 174ab86..9595b8b 100644 --- a/scripts/config.js +++ b/scripts/config.js @@ -21,6 +21,11 @@ async function populateForm (node, type, vmid) { addFormLine("cores", "Cores", {type: "number", value: config.data.cores, min: 1, max: 8192}); addFormLine("memory", "Memory", {type: "number", value: config.data.memory, min: 16}); + + let i = 0; + while(Object.hasOwn(config.data, `sata${i}`)){ + addFormLine(`sata${i}`, `SATA ${i}`, {type: "text", value: config.data[`sata${i}`]}); + } } function addFormLine (id, labelName, inputAttr) {