fix linting
This commit is contained in:
@@ -141,14 +141,14 @@ class InstanceCard extends HTMLElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setStatusLoading() {
|
setStatusLoading () {
|
||||||
this.status = "loading"
|
this.status = "loading";
|
||||||
let statusicon = this.shadowRoot.querySelector("#status")
|
const statusicon = this.shadowRoot.querySelector("#status");
|
||||||
let powerbtn = this.shadowRoot.querySelector("#power-btn")
|
const powerbtn = this.shadowRoot.querySelector("#power-btn");
|
||||||
setSVGSrc(statusicon, "images/status/loading.svg")
|
setSVGSrc(statusicon, "images/status/loading.svg");
|
||||||
setSVGAlt(statusicon, "instance is loading")
|
setSVGAlt(statusicon, "instance is loading");
|
||||||
setSVGSrc(powerbtn, "images/status/loading.svg")
|
setSVGSrc(powerbtn, "images/status/loading.svg");
|
||||||
setSVGAlt(powerbtn, "")
|
setSVGAlt(powerbtn, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
async handlePowerButton () {
|
async handlePowerButton () {
|
||||||
@@ -161,7 +161,7 @@ class InstanceCard extends HTMLElement {
|
|||||||
const targetAction = this.status === "running" ? "stop" : "start";
|
const targetAction = this.status === "running" ? "stop" : "start";
|
||||||
|
|
||||||
const result = await requestPVE(`/nodes/${this.node.name}/${this.type}/${this.vmid}/status/${targetAction}`, "POST", { node: this.node.name, vmid: this.vmid });
|
const result = await requestPVE(`/nodes/${this.node.name}/${this.type}/${this.vmid}/status/${targetAction}`, "POST", { node: this.node.name, vmid: this.vmid });
|
||||||
this.setStatusLoading()
|
this.setStatusLoading();
|
||||||
|
|
||||||
const waitFor = delay => new Promise(resolve => setTimeout(resolve, delay));
|
const waitFor = delay => new Promise(resolve => setTimeout(resolve, delay));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user