fix concat logic

This commit is contained in:
Arthur Lu 2022-12-14 13:40:19 -08:00
parent a1fd99e102
commit f12be4b2a9

View File

@ -15,9 +15,8 @@ async function init () {
for (let i = 0; i < nodes.data.length; i++) {
let qemu = await request(`/nodes/${nodes.data[i].node}/qemu`, "GET");
instances.concat(qemu.data);
let lxc = await request(`/nodes/${nodes.data[i].node}/lxc`, "GET");
instances.concat(lxc.data);
instances = instances.concat(qemu.data, lxc.data);
}
instances.sort((a, b) => (a.vmid > b.vmid) ? 1 : -1);