From 94bf131c431687e50daf2a38dc770a428a4d7353 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Tue, 17 Jan 2023 12:26:19 -0800 Subject: [PATCH] fix instance population Signed-off-by: Arthur Lu --- scripts/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/index.js b/scripts/index.js index cf22b58..c32e699 100644 --- a/scripts/index.js +++ b/scripts/index.js @@ -27,13 +27,14 @@ async function populateInstances () { let instanceContainer = document.getElementById("instance-container") - instances = []; + let instances = []; resources.data.forEach((element) => { if (element.type === "lxc" || element.type === "qemu") { let nodeName = element.node; let nodeStatus = resources.find(iem => item.node === nodeName).status; element.node = {name: nodeName, status: nodeStatus}; + instances.push(element); } });