2020-11-14 09:42:21 +08:00
|
|
|
Tea.context(function () {
|
2020-11-14 21:28:14 +08:00
|
|
|
this.updateCluster = function (clusterId) {
|
2020-11-14 09:42:21 +08:00
|
|
|
teaweb.popup("/dns/updateClusterPopup?clusterId=" + clusterId, {
|
2020-11-15 21:17:52 +08:00
|
|
|
height: "25em",
|
2020-11-14 09:42:21 +08:00
|
|
|
callback: function () {
|
|
|
|
|
teaweb.success("保存成功", function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2021-07-31 22:23:07 +08:00
|
|
|
this.updateNode = function (clusterId, nodeId) {
|
|
|
|
|
teaweb.popup("/dns/issues/updateNodePopup?clusterId=" + clusterId + "&nodeId=" + nodeId, {
|
2021-08-25 17:16:14 +08:00
|
|
|
width: "46em",
|
2020-11-16 13:03:45 +08:00
|
|
|
height: "26em",
|
2020-11-14 09:42:21 +08:00
|
|
|
callback: function () {
|
|
|
|
|
teaweb.success("保存成功", function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
2020-11-14 21:28:14 +08:00
|
|
|
|
|
|
|
|
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
|
2020-11-14 21:31:32 +08:00
|
|
|
that.dnsHasChanges = false
|
2020-11-14 21:28:14 +08:00
|
|
|
})
|
|
|
|
|
.success(function () {
|
|
|
|
|
teaweb.success("同步成功", function () {
|
|
|
|
|
teaweb.reload()
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
2020-11-14 09:42:21 +08:00
|
|
|
})
|