From 0b2bb51bdd73733106344e5ac72d8ec271cdce84 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;