实现远程卸载节点功能

This commit is contained in:
刘祥超
2024-05-07 08:40:18 +08:00
parent 11496d7ffb
commit 2a6245333f
4 changed files with 58 additions and 1 deletions

View File

@@ -36,4 +36,24 @@ Tea.context(function () {
this.round = function (f) {
return Math.round(f * 100) / 100
}
this.moreOpsVisible = false
this.showMoreOps = function () {
this.moreOpsVisible = !this.moreOpsVisible
}
this.uninstallNode = function () {
let that = this
teaweb.confirm("html:确定要卸载当前节点吗?<br/>此操作将会删除节点上除缓存以外的相关文件。", function () {
that.$post("/clusters/cluster/node/uninstall")
.params({
nodeId: that.node.id
})
.success(function () {
teaweb.success("执行成功", function () {
teaweb.reload()
})
})
})
}
})