实现完整的集群、域名同步

This commit is contained in:
刘祥超
2020-11-14 21:28:14 +08:00
parent a4417f5367
commit b86315a68c
17 changed files with 279 additions and 61 deletions

View File

@@ -1,5 +1,5 @@
Tea.context(function () {
this.updateClusterDNS = function (clusterId) {
this.updateCluster = function (clusterId) {
teaweb.popup("/dns/updateClusterPopup?clusterId=" + clusterId, {
height: "22em",
callback: function () {
@@ -19,4 +19,22 @@ Tea.context(function () {
}
})
}
this.isSyncing = false
this.syncCluster = function (clusterId) {
let that = this
teaweb.confirm("确定要执行数据同步吗?", function () {
that.isSyncing = true
that.$post(".sync")
.params({clusterId: clusterId})
.done(function () {
that.isSyncing = false
})
.success(function () {
teaweb.success("同步成功", function () {
teaweb.reload()
})
})
})
}
})