From dd165d58a5e6870cf36f9a1ead56d3691aae644b Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Tue, 17 Jan 2023 12:45:16 -0800 Subject: [PATCH] hide instance actions if the node is offline Signed-off-by: Arthur Lu --- scripts/elements.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/elements.js b/scripts/elements.js index bde299f..a6353ef 100644 --- a/scripts/elements.js +++ b/scripts/elements.js @@ -141,6 +141,11 @@ class Instance extends HTMLElement { goToPage("config.html", {node: this.node, type: this.type, vmid: this.vmid}); } }) + + if (data.node.status !== "online") { + powerButton.classList.add("hidden"); + configButton.classList.add("hidden"); + } } }