From 08dca0cb9e2d8b19ee72224e51ba66eaeb6023fb Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 14 Dec 2022 17:01:38 -0800 Subject: [PATCH] add implicit instance typing --- scripts/index.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/index.js b/scripts/index.js index 13f4850..9ba0c91 100644 --- a/scripts/index.js +++ b/scripts/index.js @@ -18,9 +18,15 @@ async function init () { let nodeStatus = nodes.data[i].status; let qemu = await request(`/nodes/${nodeName}/qemu`, "GET"); - qemu.data.forEach((item) => {item.node = {name: nodeName, status: nodeStatus}}); + qemu.data.forEach((item) => { + item.node = {name: nodeName, status: nodeStatus}; + item.type = "qemu"; + }); let lxc = await request(`/nodes/${nodeName}/lxc`, "GET"); - lxc.data.forEach((item) => {item.node = {name: nodeName, status: nodeStatus}}); + lxc.data.forEach((item) => { + item.node = {name: nodeName, status: nodeStatus}; + item.type = "lxc"; + }); instances = instances.concat(qemu.data, lxc.data); }