ensure node search returns a node
Signed-off-by: Arthur Lu <learthurgo@gmail.com>
This commit is contained in:
parent
80be88c6b9
commit
6a20785b7c
@ -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.data.find(item => item.node === nodeName).status;
|
let nodeStatus = resources.data.find(item => item.node === nodeName && item.type === "node").status;
|
||||||
element.node = {name: nodeName, status: nodeStatus};
|
element.node = {name: nodeName, status: nodeStatus};
|
||||||
instances.push(element);
|
instances.push(element);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user