fix finding nodes in resources

Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
Arthur Lu 2023-01-17 12:26:49 -08:00
parent 18b70c4506
commit 5077dca134

View File

@ -32,7 +32,7 @@ async function populateInstances () {
resources.data.forEach((element) => { resources.data.forEach((element) => {
if (element.type === "lxc" || element.type === "qemu") { if (element.type === "lxc" || element.type === "qemu") {
let nodeName = element.node; let nodeName = element.node;
let nodeStatus = resources.find(iem => item.node === nodeName).status; let nodeStatus = resources.data.find(iem => item.node === nodeName).status;
element.node = {name: nodeName, status: nodeStatus}; element.node = {name: nodeName, status: nodeStatus};
instances.push(element); instances.push(element);
} }