fix instance population
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
parent
1d4981c93f
commit
94bf131c43
@ -27,13 +27,14 @@ async function populateInstances () {
|
|||||||
|
|
||||||
let instanceContainer = document.getElementById("instance-container")
|
let instanceContainer = document.getElementById("instance-container")
|
||||||
|
|
||||||
instances = [];
|
let instances = [];
|
||||||
|
|
||||||
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.find(iem => item.node === nodeName).status;
|
||||||
element.node = {name: nodeName, status: nodeStatus};
|
element.node = {name: nodeName, status: nodeStatus};
|
||||||
|
instances.push(element);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user