From 0b4f50c85c0fb40b0114fab3716fc21d2b1341d6 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 14 Dec 2022 13:48:29 -0800 Subject: [PATCH] fix instance node data assignment --- scripts/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/index.js b/scripts/index.js index 212d915..0b85e86 100644 --- a/scripts/index.js +++ b/scripts/index.js @@ -19,11 +19,13 @@ async function init () { let qemu = await request(`/nodes/${nodeName}/qemu`, "GET"); qemu.data.forEach((item) => { + item.node = {}; item.node.name = nodeName; item.node.status = nodeStatus; }); let lxc = await request(`/nodes/${nodeName}/lxc`, "GET"); lxc.data.forEach((item) => { + item.node = {}; item.node.name = nodeName; item.node.status = nodeStatus; });