From 54fa98e754c1e2bbc42d44169d26b783075cc3e1 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 21 Dec 2022 15:39:09 -0800 Subject: [PATCH] add swap in config --- scripts/config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/config.js b/scripts/config.js index 7223136..bbf8542 100644 --- a/scripts/config.js +++ b/scripts/config.js @@ -28,6 +28,9 @@ async function populateForm (node, type, vmid) { addFormLine("name", "Name", {type: "text", value: config.data[name]}); addFormLine("resources", "Cores", {type: "number", value: config.data.cores, min: 1, max: 8192}, "Threads"); addFormLine("resources", "Memory", {type: "number", value: config.data.memory / 1024, min: 0, step: 0.001}, "GiB"); + if (type === "lxc") { + addFormLine("resources", "Swap", {type: "number", value: config.data.swap / 1024, min: 0, step: 0.001}, "GiB"); + } if (type === "qemu") { let i = 0;