remove resource bar from instance article

This commit is contained in:
Arthur Lu 2022-12-21 15:31:31 -08:00
parent afaf6c678d
commit 6b2dbf2450
2 changed files with 0 additions and 31 deletions

View File

@ -25,25 +25,6 @@
</div>
</div>
<hr>
<div>
<div>
<img src="images/resources/cpu.svg" alt="instance processor cores">
<p id="resource-cpu"></p>
</div>
<div>
<img src="images/resources/ram.svg" alt="instance memory">
<p id="resource-ram"></p>
</div>
<div>
<img src="images/resources/swap.svg" alt="instance swap space">
<p id="resource-swap"></p>
</div>
<div>
<img src="images/resources/disk.svg" alt="instance disk space">
<p id="resource-disk"></p>
</div>
</div>
<hr>
<div class="btn-group">
<img id="power-btn">
<img id="configure-btn" alt="change instance configuration">

View File

@ -48,18 +48,6 @@ class Instance extends HTMLElement {
nodeParagraph.innerText = data.node.name;
this.node = data.node.name;
let resourceCPU = this.shadowElement.querySelector("#resource-cpu");
resourceCPU.innerText = data.cpus;
let resourceRAM = this.shadowElement.querySelector("#resource-ram");
resourceRAM.innerText = (data.maxmem / 1073741824).toFixed(3);
let resourceSWAP = this.shadowElement.querySelector("#resource-swap");
resourceSWAP.innerText = (data.maxswap / 1073741824).toFixed(3);
let resourceDISK = this.shadowElement.querySelector("#resource-disk");
resourceDISK.innerText = (data.maxdisk / 1073741824).toFixed(3);
let powerButton = this.shadowElement.querySelector("#power-btn");
powerButton.src = data.status === "running" ? "images/actions/stop.svg" : "images/actions/start.svg";
powerButton.alt = data.status === "running" ? "shutdown instance" : "start instance";