add swap in config

This commit is contained in:
Arthur Lu 2022-12-21 15:39:09 -08:00
parent a98057ae39
commit 54fa98e754

View File

@ -28,6 +28,9 @@ async function populateForm (node, type, vmid) {
addFormLine("name", "Name", {type: "text", value: config.data[name]}); 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", "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"); 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") { if (type === "qemu") {
let i = 0; let i = 0;