add power button html and css
This commit is contained in:
parent
c45c9df406
commit
10526d1a67
@ -45,8 +45,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div>
|
<div class="btn-group">
|
||||||
|
<button type="button" id="power-btn"></button>
|
||||||
|
<button type="button" id="configure-btn">Config</button>
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</article>
|
||||||
</template>
|
</template>
|
||||||
|
@ -49,6 +49,9 @@ class Instance extends HTMLElement {
|
|||||||
|
|
||||||
let resourceDISK = this.shadowElement.querySelector("#resource-disk");
|
let resourceDISK = this.shadowElement.querySelector("#resource-disk");
|
||||||
resourceDISK.innerText = (data.maxdisk / 1073741824).toFixed(3);
|
resourceDISK.innerText = (data.maxdisk / 1073741824).toFixed(3);
|
||||||
|
|
||||||
|
let powerButton = this.shadowElement.querySelector("#power-btn");
|
||||||
|
powerButton.innerText = data.status === "running" ? "Shutdown" : "Start"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user