2020-07-30 22:41:35 +08:00
|
|
|
Tea.context(function () {
|
2021-07-07 15:17:41 +08:00
|
|
|
this.teaweb = teaweb
|
2021-02-24 19:27:33 +08:00
|
|
|
|
2021-07-07 15:17:41 +08:00
|
|
|
this.deleteNode = function (nodeId) {
|
2021-07-31 22:23:07 +08:00
|
|
|
teaweb.confirm("确定要从当前集群中删除这个节点吗?", function () {
|
2021-07-07 15:17:41 +08:00
|
|
|
this.$post("/nodes/delete")
|
|
|
|
|
.params({
|
2021-07-31 22:23:07 +08:00
|
|
|
clusterId: this.clusterId,
|
2021-07-07 15:17:41 +08:00
|
|
|
nodeId: nodeId
|
|
|
|
|
})
|
|
|
|
|
.refresh();
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.upNode = function (nodeId) {
|
|
|
|
|
teaweb.confirm("确定要手动上线此节点吗?", function () {
|
|
|
|
|
this.$post("/clusters/cluster/node/up")
|
|
|
|
|
.params({
|
|
|
|
|
nodeId: nodeId
|
|
|
|
|
})
|
|
|
|
|
.refresh()
|
|
|
|
|
})
|
|
|
|
|
}
|
2021-02-24 19:27:33 +08:00
|
|
|
})
|