IP地址支持手动上线和从备用IP中恢复

This commit is contained in:
刘祥超
2021-09-13 13:45:39 +08:00
parent fa37b40435
commit 5e09ba302a
10 changed files with 46 additions and 21 deletions

View File

@@ -0,0 +1,23 @@
Tea.context(function () {
this.updateUp = function (addrId, isUp) {
let status = isUp ? "在线" : "离线"
teaweb.confirm("确定要手动将节点设置为" + status + "吗?", function () {
this.$post(".up")
.params({
addrId: addrId,
isUp: isUp ? 1 : 0
})
.refresh()
})
}
this.restoreBackup = function (addrId) {
teaweb.confirm("确定要恢复IP地址吗", function () {
this.$post(".restoreBackup")
.params({
addrId: addrId
})
.refresh()
})
}
})