remove resource bar from instance article
This commit is contained in:
parent
afaf6c678d
commit
6b2dbf2450
19
index.html
19
index.html
@ -25,25 +25,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<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">
|
<div class="btn-group">
|
||||||
<img id="power-btn">
|
<img id="power-btn">
|
||||||
<img id="configure-btn" alt="change instance configuration">
|
<img id="configure-btn" alt="change instance configuration">
|
||||||
|
@ -48,18 +48,6 @@ class Instance extends HTMLElement {
|
|||||||
nodeParagraph.innerText = data.node.name;
|
nodeParagraph.innerText = data.node.name;
|
||||||
this.node = 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");
|
let powerButton = this.shadowElement.querySelector("#power-btn");
|
||||||
powerButton.src = data.status === "running" ? "images/actions/stop.svg" : "images/actions/start.svg";
|
powerButton.src = data.status === "running" ? "images/actions/stop.svg" : "images/actions/start.svg";
|
||||||
powerButton.alt = data.status === "running" ? "shutdown instance" : "start instance";
|
powerButton.alt = data.status === "running" ? "shutdown instance" : "start instance";
|
||||||
|
Loading…
Reference in New Issue
Block a user