4
1
mirror of https://github.com/Qortal/qortal-ui.git synced 2025-02-11 17:55:51 +00:00

Merge pull request #7 from QuickMythril/stop-node-button

add Stop Node button
This commit is contained in:
AlphaX-Projects 2022-04-14 23:45:44 -07:00 committed by GitHub
commit e3af99948c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 34 additions and 7 deletions

View File

@ -536,7 +536,9 @@
"nchange27": "Prägeknoten erfolgreich hinzugefügt!",
"nchange28": "Prägeknoten konnte nicht hinzugefügt werden!",
"nchange29": "Prägekonto erfolgreich entfernt!",
"nchange30": "Fehler beim Entfernen des Prägekontos!"
"nchange30": "Fehler beim Entfernen des Prägekontos!",
"nchange31": "Stop Node",
"nchange32": "Successfully Sent Stop Request!"
},
"transpage": {
"tchange1": "Transaktionsanfrage",

View File

@ -536,7 +536,9 @@
"nchange27": "Minting Node Added Successfully!",
"nchange28": "Failed to Add Minting Node!",
"nchange29": "Successfully Removed Minting Account!",
"nchange30": "Failed to Remove Minting Account!"
"nchange30": "Failed to Remove Minting Account!",
"nchange31": "Stop Node",
"nchange32": "Successfully Sent Stop Request!"
},
"transpage": {
"tchange1": "Transaction request",

View File

@ -536,7 +536,9 @@
"nchange27": "Minting Node Added Successfully!",
"nchange28": "Failed to Add Minting Node!",
"nchange29": "Successfully Removed Minting Account!",
"nchange30": "Failed to Remove Minting Account!"
"nchange30": "Failed to Remove Minting Account!",
"nchange31": "Stop Node",
"nchange32": "Successfully Sent Stop Request!"
},
"transpage": {
"tchange1": "Transaction request",

View File

@ -536,7 +536,9 @@
"nchange27": "Minting Node Added Successfully!",
"nchange28": "Failed to Add Minting Node!",
"nchange29": "Successfully Removed Minting Account!",
"nchange30": "Failed to Remove Minting Account!"
"nchange30": "Failed to Remove Minting Account!",
"nchange31": "Stop Node",
"nchange32": "Successfully Sent Stop Request!"
},
"transpage": {
"tchange1": "Transaction request",

View File

@ -536,7 +536,9 @@
"nchange27": "Minting Node Added Successfully!",
"nchange28": "Failed to Add Minting Node!",
"nchange29": "Successfully Removed Minting Account!",
"nchange30": "Failed to Remove Minting Account!"
"nchange30": "Failed to Remove Minting Account!",
"nchange31": "Stop Node",
"nchange32": "Successfully Sent Stop Request!"
},
"transpage": {
"tchange1": "Transaction request",

View File

@ -537,7 +537,9 @@
"nchange27": "铸币节点添加成功!",
"nchange28": "添加铸币节点失败!",
"nchange29": "成功从此节点中移除铸币账号!",
"nchange30": "未能从此节点中移除铸币账号!"
"nchange30": "未能从此节点中移除铸币账号!",
"nchange31": "Stop Node",
"nchange32": "Successfully Sent Stop Request!"
},
"transpage": {
"tchange1": "请求交易",

View File

@ -537,7 +537,9 @@
"nchange27": "鑄幣節點添加成功!",
"nchange28": "添加鑄幣節點失敗!",
"nchange29": "成功從此節點中移除鑄幣賬號!",
"nchange30": "未能從此節點中移除鑄幣賬號!"
"nchange30": "未能從此節點中移除鑄幣賬號!",
"nchange31": "Stop Node",
"nchange32": "Successfully Sent Stop Request!"
},
"transpage": {
"tchange1": "請求交易",

View File

@ -152,6 +152,7 @@ class NodeManagement extends LitElement {
<div id="node-management-page">
<div class="node-card">
<h2>${translate("nodepage.nchange1")} ${this.nodeDomain}</h2>
<mwc-button style="float:right;" class="red" ?disabled="${(this.upTime === "offline")}" @click=${() => this.stopNode()}><mwc-icon>dangerous</mwc-icon>&nbsp;${translate("nodepage.nchange31")}</mwc-button>
<span class="sblack"><br />${translate("nodepage.nchange2")} ${this.upTime}</span>
<br /><br />
<div id="minting">
@ -444,6 +445,18 @@ class NodeManagement extends LitElement {
});
}
stopNode() {
parentEpml
.request("apiCall", {
url: `/admin/stop?apiKey=${this.getApiKey()}`,
method: "GET"
})
.then((res) => {
let err5string = get("nodepage.nchange32")
parentEpml.request('showSnackBar', `${err5string}`);
});
}
onPageNavigation(pageUrl) {
parentEpml.request("setPageUrl", pageUrl);
}