mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-11-02 13:47:55 +00:00
Add Restart Node button
This commit is contained in:
@@ -156,6 +156,7 @@ class NodeManagement extends LitElement {
|
||||
<div class="node-card">
|
||||
<h2>${translate("nodepage.nchange1")} ${this.nodeDomain}</h2>
|
||||
<mwc-button style="float:right;" class="red" ?hidden="${(this.upTime === "offline")}" @click=${() => this.stopNode()}><mwc-icon>dangerous</mwc-icon> ${translate("nodepage.nchange31")}</mwc-button>
|
||||
<mwc-button style="float:right;" ?hidden="${(this.upTime === "offline")}" @click=${() => this.restartNode()}><mwc-icon>360</mwc-icon> ${translate("nodepage.nchange33")}</mwc-button>
|
||||
<span class="sblack"><br />${translate("nodepage.nchange2")} ${this.upTime}</span>
|
||||
<br /><br />
|
||||
<div id="minting">
|
||||
@@ -450,6 +451,18 @@ class NodeManagement extends LitElement {
|
||||
});
|
||||
}
|
||||
|
||||
restartNode() {
|
||||
parentEpml
|
||||
.request("apiCall", {
|
||||
url: `/admin/restart?apiKey=${this.getApiKey()}`,
|
||||
method: "GET"
|
||||
})
|
||||
.then((res) => {
|
||||
let err7string = get("nodepage.nchange34")
|
||||
parentEpml.request('showSnackBar', `${err7string}`);
|
||||
});
|
||||
}
|
||||
|
||||
onPageNavigation(pageUrl) {
|
||||
parentEpml.request("setPageUrl", pageUrl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user