2020-10-27 12:33:27 +08:00
|
|
|
Tea.context(function () {
|
|
|
|
|
this.isStarting = false
|
|
|
|
|
this.startNode = function () {
|
|
|
|
|
this.isStarting = true
|
2021-05-26 14:43:29 +08:00
|
|
|
this.$post("/ns/clusters/cluster/node/start")
|
2020-10-27 12:33:27 +08:00
|
|
|
.params({
|
|
|
|
|
nodeId: this.node.id
|
|
|
|
|
})
|
|
|
|
|
.success(function () {
|
|
|
|
|
teaweb.success("启动成功", function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
.done(function () {
|
|
|
|
|
this.isStarting = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.isStopping = false
|
|
|
|
|
this.stopNode = function () {
|
|
|
|
|
this.isStopping = true
|
2021-05-26 14:43:29 +08:00
|
|
|
this.$post("/ns/clusters/cluster/node/stop")
|
2020-10-27 12:33:27 +08:00
|
|
|
.params({
|
|
|
|
|
nodeId: this.node.id
|
|
|
|
|
})
|
|
|
|
|
.success(function () {
|
|
|
|
|
teaweb.success("执行成功", function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
.done(function () {
|
|
|
|
|
this.isStopping = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|