增加本地API节点需要升级提示

This commit is contained in:
GoEdgeLab
2022-07-21 19:22:18 +08:00
parent f996215f26
commit 8e5019d8d2
6 changed files with 295 additions and 50 deletions

View File

@@ -3,6 +3,7 @@ Tea.context(function () {
this.trafficTab = "hourly"
this.metricCharts = []
this.dashboard = {}
this.localLowerVersionAPINode = null
this.$delay(function () {
this.$post("$")
@@ -193,4 +194,29 @@ Tea.context(function () {
}
}
}
// 重启本地API节点
this.isRestartingLocalAPINode = false
this.restartAPINode = function () {
if (this.isRestartingLocalAPINode) {
return
}
if (this.localLowerVersionAPINode == null) {
return
}
this.isRestartingLocalAPINode = true
this.localLowerVersionAPINode.isRestarting = true
this.$post("/dashboard/restartLocalAPINode")
.params({
"exePath": this.localLowerVersionAPINode.exePath
})
.timeout(300)
.success(function () {
teaweb.reload()
})
.done(function () {
this.isRestartingLocalAPINode = false
this.localLowerVersionAPINode.isRestarting = false
})
}
})