mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-15 13:00:25 +08:00
实现最基本的域名服务节点管理
This commit is contained in:
35
web/views/@default/ns/clusters/cluster/node/index.js
Normal file
35
web/views/@default/ns/clusters/cluster/node/index.js
Normal file
@@ -0,0 +1,35 @@
|
||||
Tea.context(function () {
|
||||
this.isStarting = false
|
||||
this.startNode = function () {
|
||||
this.isStarting = true
|
||||
this.$post("/ns/clusters/cluster/node/start")
|
||||
.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
|
||||
this.$post("/ns/clusters/cluster/node/stop")
|
||||
.params({
|
||||
nodeId: this.node.id
|
||||
})
|
||||
.success(function () {
|
||||
teaweb.success("执行成功", function () {
|
||||
teaweb.reload()
|
||||
})
|
||||
})
|
||||
.done(function () {
|
||||
this.isStopping = false
|
||||
})
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user