实现节点看板(仅对企业版开放)

This commit is contained in:
GoEdgeLab
2021-07-06 20:06:20 +08:00
parent b86453408c
commit 4599fc2709
34 changed files with 1313 additions and 296 deletions

View File

@@ -0,0 +1,35 @@
Tea.context(function () {
this.isStarting = false
this.startNode = function () {
this.isStarting = true
this.$post("/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("/clusters/cluster/node/stop")
.params({
nodeId: this.node.id
})
.success(function () {
teaweb.success("执行成功", function () {
teaweb.reload()
})
})
.done(function () {
this.isStopping = false
})
}
})