diff --git a/index.html b/index.html
index 3201a02..ae76ce6 100644
--- a/index.html
+++ b/index.html
@@ -12,15 +12,20 @@
diff --git a/scripts/index.js b/scripts/index.js
index 883cb0c..86eba52 100644
--- a/scripts/index.js
+++ b/scripts/index.js
@@ -33,7 +33,18 @@ async function populateInstances () {
instances.sort((a, b) => (a.vmid > b.vmid) ? 1 : -1);
- instanceContainer.innerText = "";
+ instanceContainer.innerHTML = `
+
+ `;
for(let i = 0; i < instances.length; i++) {
let newInstance = document.createElement("instance-obj");
newInstance.data = instances[i];
diff --git a/scripts/instance.js b/scripts/instance.js
index 55a6a0a..c2d64af 100644
--- a/scripts/instance.js
+++ b/scripts/instance.js
@@ -10,15 +10,13 @@ export class Instance extends HTMLElement {
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -44,21 +42,23 @@ export class Instance extends HTMLElement {
}
update () {
- let typeImg = this.shadowElement.querySelector("#instance-type");
- typeImg.src = `images/instances/${this.type}/${this.status}.svg`;
- typeImg.alt = `${this.status} instance`;
-
let vmidParagraph = this.shadowElement.querySelector("#instance-id");
vmidParagraph.innerText = this.vmid;
let nameParagraph = this.shadowElement.querySelector("#instance-name");
nameParagraph.innerText = this.name ? this.name : "";
- let nodeImg = this.shadowElement.querySelector("#node-status");
- nodeImg.src = `images/nodes/${this.node.status}.svg`;
+ let typeParagraph = this.shadowElement.querySelector("#instance-type");
+ typeParagraph.innerText = this.type;
- let nodeParagraph = this.shadowElement.querySelector("#node-name");
- nodeParagraph.innerText = this.node.name;
+ let statusParagraph = this.shadowElement.querySelector("#instance-status");
+ statusParagraph.innerText = this.status;
+
+ let nodeNameParagraph = this.shadowElement.querySelector("#node-name");
+ nodeNameParagraph.innerText = this.node.name;
+
+ let nodeStatusParagraph = this.shadowElement.querySelector("#node-status");
+ nodeStatusParagraph.innerText = this.node.status;
let powerButton = this.shadowElement.querySelector("#power-btn");
powerButton.src = instances[this.status].powerButtonSrc;