Files
waf-platform/EdgeAdmin/web/views/@default/httpdns/clusters/create.js
2026-02-28 18:55:33 +08:00

29 lines
868 B
JavaScript

Tea.context(function () {
this.isOn = true
this.defaultClusterEnabled = false
this.defaultClusterRole = "primary"
this.syncDefaultClusterEnabled = function () {
if (!this.isOn) {
this.defaultClusterEnabled = false
this.defaultClusterRole = "primary"
}
}
this.success = function (resp) {
let clusterId = 0
if (resp != null && resp.data != null && typeof resp.data.clusterId != "undefined") {
clusterId = resp.data.clusterId
}
if (clusterId > 0) {
teaweb.success("保存成功", function () {
window.location = "/httpdns/clusters/cluster?clusterId=" + clusterId
})
return
}
teaweb.success("保存成功", function () {
window.location = "/httpdns/clusters"
})
}
})