simplify instacne node assignment
This commit is contained in:
parent
0b4f50c85c
commit
5c0176dc98
@ -18,17 +18,9 @@ async function init () {
|
||||
let nodeStatus = nodes.data[i].status;
|
||||
|
||||
let qemu = await request(`/nodes/${nodeName}/qemu`, "GET");
|
||||
qemu.data.forEach((item) => {
|
||||
item.node = {};
|
||||
item.node.name = nodeName;
|
||||
item.node.status = nodeStatus;
|
||||
});
|
||||
qemu.data.forEach((item) => {item.node = {name: nodeName, status: nodeStatus}});
|
||||
let lxc = await request(`/nodes/${nodeName}/lxc`, "GET");
|
||||
lxc.data.forEach((item) => {
|
||||
item.node = {};
|
||||
item.node.name = nodeName;
|
||||
item.node.status = nodeStatus;
|
||||
});
|
||||
lxc.data.forEach((item) => {item.node = {name: nodeName, status: nodeStatus}});
|
||||
instances = instances.concat(qemu.data, lxc.data);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user