diff --git a/web/public/js/components/dns/dns-domain-selector.js b/web/public/js/components/dns/dns-domain-selector.js
index d5287cc6..c175be7f 100644
--- a/web/public/js/components/dns/dns-domain-selector.js
+++ b/web/public/js/components/dns/dns-domain-selector.js
@@ -21,12 +21,14 @@ Vue.component("dns-domain-selector", {
callback: function (resp) {
that.domainId = resp.data.domainId
that.domainName = resp.data.domainName
+ that.change()
}
})
},
remove: function() {
this.domainId = 0
this.domainName = ""
+ this.change()
},
update: function () {
let that = this
@@ -34,8 +36,15 @@ Vue.component("dns-domain-selector", {
callback: function (resp) {
that.domainId = resp.data.domainId
that.domainName = resp.data.domainName
+ that.change()
}
})
+ },
+ change: function () {
+ this.$emit("change", {
+ id: this.domainId,
+ name: this.domainName
+ })
}
},
template: `
diff --git a/web/views/@default/clusters/cluster/settings/dns/index.html b/web/views/@default/clusters/cluster/settings/dns/index.html
index ea0e3a8e..c05c3d60 100644
--- a/web/views/@default/clusters/cluster/settings/dns/index.html
+++ b/web/views/@default/clusters/cluster/settings/dns/index.html
@@ -11,7 +11,7 @@
| 选择主域名 * |
-
+
|
@@ -20,7 +20,8 @@
- .主域名
+ .{{domain.name}}
+ .主域名
|
diff --git a/web/views/@default/clusters/cluster/settings/dns/index.js b/web/views/@default/clusters/cluster/settings/dns/index.js
index 295a9aaf..114ba045 100644
--- a/web/views/@default/clusters/cluster/settings/dns/index.js
+++ b/web/views/@default/clusters/cluster/settings/dns/index.js
@@ -1,3 +1,9 @@
Tea.context(function () {
this.success = NotifyReloadSuccess("保存成功")
+
+ this.domain = {id: this.domainId, name: this.domainName}
+ this.changeDomain = function (domain) {
+ this.domain.id = domain.id
+ this.domain.name = domain.name
+ }
})
\ No newline at end of file
diff --git a/web/views/@default/clusters/create.html b/web/views/@default/clusters/create.html
index 470ea26a..f8d1e3ee 100644
--- a/web/views/@default/clusters/create.html
+++ b/web/views/@default/clusters/create.html
@@ -56,7 +56,7 @@
| 选择主域名 |
-
+
|
@@ -65,7 +65,8 @@
- .主域名
+ .{{domain.name}}
+ .主域名
|
diff --git a/web/views/@default/clusters/create.js b/web/views/@default/clusters/create.js
index ea2d4391..1f9f54fc 100644
--- a/web/views/@default/clusters/create.js
+++ b/web/views/@default/clusters/create.js
@@ -2,6 +2,12 @@ Tea.context(function () {
this.success = function (resp) {
teaweb.success("集群创建成功", function () {
window.location = "/clusters/cluster/nodes?clusterId=" + resp.data.clusterId
- } )
+ })
+ }
+
+ this.domain = {id: 0, name: ""}
+ this.changeDomain = function (domain) {
+ this.domain.id = domain.id
+ this.domain.name = domain.name
}
})
\ No newline at end of file