add better label text for rootfs

This commit is contained in:
Arthur Lu 2022-12-21 15:08:21 -08:00
parent 3748fcdd99
commit 2375263a9a

View File

@ -47,7 +47,7 @@ async function populateForm (node, type, vmid) {
rootfs = JSON.parse(rootfs);
let sizeNum = +(rootfs.size.replaceAll("G", "").replaceAll("M", ""));
let sizeUnit = rootfs.size.includes("G") ? "GiB" : "MiB";
addFormLine("resources", "rootfs", {type: "number", value: sizeUnit === "GiB" ? sizeNum.toFixed(3) : (sizeNum / 1024).toFixed(3), min: 0.016}, "GiB");
addFormLine("resources", "Root FS", {type: "number", value: sizeUnit === "GiB" ? sizeNum.toFixed(3) : (sizeNum / 1024).toFixed(3), min: 0.016}, "GiB");
}
}