add implicit instance typing

This commit is contained in:
Arthur Lu 2022-12-14 17:01:38 -08:00
parent 52cb2a9a10
commit 0235760565

View File

@ -18,9 +18,15 @@ async function init () {
let nodeStatus = nodes.data[i].status; let nodeStatus = nodes.data[i].status;
let qemu = await request(`/nodes/${nodeName}/qemu`, "GET"); let qemu = await request(`/nodes/${nodeName}/qemu`, "GET");
qemu.data.forEach((item) => {item.node = {name: nodeName, status: nodeStatus}}); qemu.data.forEach((item) => {
item.node = {name: nodeName, status: nodeStatus};
item.type = "qemu";
});
let lxc = await request(`/nodes/${nodeName}/lxc`, "GET"); let lxc = await request(`/nodes/${nodeName}/lxc`, "GET");
lxc.data.forEach((item) => {item.node = {name: nodeName, status: nodeStatus}}); lxc.data.forEach((item) => {
item.node = {name: nodeName, status: nodeStatus};
item.type = "lxc";
});
instances = instances.concat(qemu.data, lxc.data); instances = instances.concat(qemu.data, lxc.data);
} }