mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-16 13:40:24 +08:00
增加节点列表
This commit is contained in:
37
web/views/@default/clusters/nodes.js
Normal file
37
web/views/@default/clusters/nodes.js
Normal file
@@ -0,0 +1,37 @@
|
||||
Tea.context(function () {
|
||||
this.teaweb = teaweb
|
||||
|
||||
this.deleteNode = function (nodeId) {
|
||||
teaweb.confirm("确定要删除这个节点吗?", function () {
|
||||
this.$post("/cluster/nodes/delete")
|
||||
.params({
|
||||
clusterId: this.clusterId,
|
||||
nodeId: nodeId
|
||||
})
|
||||
.refresh();
|
||||
})
|
||||
}
|
||||
|
||||
this.upNode = function (nodeId) {
|
||||
teaweb.confirm("确定要手动上线此节点吗?", function () {
|
||||
this.$post("/clusters/cluster/node/up")
|
||||
.params({
|
||||
nodeId: nodeId
|
||||
})
|
||||
.refresh()
|
||||
})
|
||||
}
|
||||
|
||||
this.updateNodeDNS = function (nodeId) {
|
||||
let that = this
|
||||
teaweb.popup("/clusters/cluster/node/updateDNSPopup?clusterId=" + this.clusterId + "&nodeId=" + nodeId, {
|
||||
width: "46em",
|
||||
height: "26em",
|
||||
callback: function () {
|
||||
teaweb.success("保存成功", function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user