diff --git a/web/public/js/components.js b/web/public/js/components.js
index d611292a..781c1e7f 100644
--- a/web/public/js/components.js
+++ b/web/public/js/components.js
@@ -2148,8 +2148,8 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
已启用 / 空连接次数:{{config.minAttempts}}次/分钟 / 封禁时间:{{config.timeoutSeconds}}秒 / 忽略局域网访问
未启用
-`}),Vue.component("domains-box",{props:["v-domains"],data:function(){let e=this.vDomains;return{domains:e=null==e?[]:e,isAdding:!1,addingDomain:""}},methods:{add:function(){this.isAdding=!0;let e=this;setTimeout(function(){e.$refs.addingDomain.focus()},100)},confirm:function(){let t=this;if(this.addingDomain=this.addingDomain.replace(/\s/g,""),0==this.addingDomain.length)teaweb.warn("请输入要添加的域名",function(){t.$refs.addingDomain.focus()});else{if("~"==this.addingDomain[0]){var e=this.addingDomain.substring(1);try{new RegExp(e)}catch(e){return void teaweb.warn("正则表达式错误:"+e.message,function(){t.$refs.addingDomain.focus()})}}this.domains.push(this.addingDomain),this.cancel()}},remove:function(e){this.domains.$remove(e)},cancel:function(){this.isAdding=!1,this.addingDomain=""}},template:`
+
[正则]
@@ -4622,7 +4622,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
`}),Vue.component("second-menu",{template:' \t\t'}),Vue.component("loading-message",{template:``}),Vue.component("more-options-angle",{data:function(){return{isVisible:!1}},methods:{show:function(){this.isVisible=!this.isVisible,this.$emit("change",this.isVisible)}},template:'更多选项收起选项'}),Vue.component("inner-menu-item",{props:["href","active","code"],data:function(){var e,t=this.active;return void 0===t&&(e="",t=(e=void 0!==window.TEA.ACTION.data.firstMenuItem?window.TEA.ACTION.data.firstMenuItem:e)==this.code),{vHref:null==this.href?"":this.href,vActive:t}},template:'\t\t[] \t\t'}),Vue.component("health-check-config-box",{props:["v-health-check-config"],data:function(){let t=this.vHealthCheckConfig,i="http",s="",n="/",o="";if(null==t){t={isOn:!1,url:"",interval:{count:60,unit:"second"},statusCodes:[200],timeout:{count:10,unit:"second"},countTries:3,tryDelay:{count:100,unit:"ms"},autoDown:!0,countUp:1,countDown:3,userAgent:"",onlyBasicRequest:!0,accessLogIsOn:!0};let e=this;setTimeout(function(){e.changeURL()},500)}else{try{let e=new URL(t.url);i=e.protocol.substring(0,e.protocol.length-1);var a=(o="%24%7Bhost%7D"==(o=e.host)?"${host}":o).indexOf(":");0
+ `}),Vue.component("more-options-angle",{data:function(){return{isVisible:!1}},methods:{show:function(){this.isVisible=!this.isVisible,this.$emit("change",this.isVisible)}},template:'
更多选项收起选项'}),Vue.component("inner-menu-item",{props:["href","active","code"],data:function(){var e,t=this.active;return void 0===t&&(e="",t=(e=void 0!==window.TEA.ACTION.data.firstMenuItem?window.TEA.ACTION.data.firstMenuItem:e)==this.code),{vHref:null==this.href?"":this.href,vActive:t}},template:'\t\t
[] \t\t'}),Vue.component("health-check-config-box",{props:["v-health-check-config","v-check-domain-url"],data:function(){let t=this.vHealthCheckConfig,i="http",s="",n="/",o="";if(null==t){t={isOn:!1,url:"",interval:{count:60,unit:"second"},statusCodes:[200],timeout:{count:10,unit:"second"},countTries:3,tryDelay:{count:100,unit:"ms"},autoDown:!0,countUp:1,countDown:3,userAgent:"",onlyBasicRequest:!0,accessLogIsOn:!0};let e=this;setTimeout(function(){e.changeURL()},500)}else{try{let e=new URL(t.url);i=e.protocol.substring(0,e.protocol.length-1);var a=(o="%24%7Bhost%7D"==(o=e.host)?"${host}":o).indexOf(":");0
@@ -4656,8 +4656,8 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
| 域名 |
-
-
+
+
|
@@ -4814,7 +4814,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
`}),Vue.component("warning-message",{template:''});let checkboxId=0,radioId=(Vue.component("checkbox",{props:["name","value","v-value","id","checked"],data:function(){checkboxId++;let e=this.id,t=(null==e&&(e="checkbox"+checkboxId),this.vValue),i=(null==t&&(t="1"),this.value);return null==i&&"checked"==this.checked&&(i=t),{elementId:e,elementValue:t,newValue:i}},methods:{change:function(){this.$emit("input",this.newValue)},check:function(){this.newValue=this.elementValue},uncheck:function(){this.newValue=""},isChecked:function(){return this.newValue==this.elementValue}},watch:{value:function(e){"boolean"==typeof e&&(this.newValue=e)}},template:`
-
+
`}),Vue.component("network-addresses-view",{props:["v-addresses"],template:`
{{addr.protocol}}://{{addr.host.quoteIP()}}*:{{addr.portRange}}
@@ -5212,11 +5212,11 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
-`}),Vue.component("dns-domain-selector",{props:["v-domain-id","v-domain-name"],data:function(){let e=this.vDomainId,t=(null==e&&(e=0),this.vDomainName);return null==t&&(t=""),{domainId:e,domainName:t}},methods:{select:function(){let t=this;teaweb.popup("/dns/domains/selectPopup",{callback:function(e){t.domainId=e.data.domainId,t.domainName=e.data.domainName,t.change()}})},remove:function(){this.domainId=0,this.domainName="",this.change()},update:function(){let t=this;teaweb.popup("/dns/domains/selectPopup?domainId="+this.domainId,{callback:function(e){t.domainId=e.data.domainId,t.domainName=e.data.domainName,t.change()}})},change:function(){this.$emit("change",{id:this.domainId,name:this.domainName})}},template:`
+
`}),Vue.component("dns-domain-selector",{props:["v-domain-id","v-domain-name","v-provider-name"],data:function(){let e=this.vDomainId,t=(null==e&&(e=0),this.vDomainName),i=(null==t&&(t=""),this.vProviderName);return null==i&&(i=""),{domainId:e,domainName:t,providerName:i}},methods:{select:function(){let t=this;teaweb.popup("/dns/domains/selectPopup",{callback:function(e){t.domainId=e.data.domainId,t.domainName=e.data.domainName,t.providerName=e.data.providerName,t.change()}})},remove:function(){this.domainId=0,this.domainName="",this.change()},update:function(){let t=this;teaweb.popup("/dns/domains/selectPopup?domainId="+this.domainId,{callback:function(e){t.domainId=e.data.domainId,t.domainName=e.data.domainName,t.providerName=e.data.providerName,t.change()}})},change:function(){this.$emit("change",{id:this.domainId,name:this.domainName})}},template:`
- {{domainName}}
+ {{providerName}} » {{domainName}}
diff --git a/web/public/js/components.src.js b/web/public/js/components.src.js
index 661591d0..f45952b7 100755
--- a/web/public/js/components.src.js
+++ b/web/public/js/components.src.js
@@ -6462,16 +6462,22 @@ Vue.component("firewall-syn-flood-config-viewer", {
// 域名列表
Vue.component("domains-box", {
- props: ["v-domains"],
+ props: ["v-domains", "name"],
data: function () {
let domains = this.vDomains
if (domains == null) {
domains = []
}
+
+ let realName = "domainsJSON"
+ if (this.name != null && typeof this.name == "string") {
+ realName = this.name
+ }
return {
domains: domains,
isAdding: false,
- addingDomain: ""
+ addingDomain: "",
+ realName: realName
}
},
methods: {
@@ -6521,7 +6527,7 @@ Vue.component("domains-box", {
}
},
template: `
-
+
[正则]
@@ -14093,7 +14099,7 @@ Vue.component("inner-menu-item", {
});
Vue.component("health-check-config-box", {
- props: ["v-health-check-config"],
+ props: ["v-health-check-config", "v-check-domain-url"],
data: function () {
let healthCheckConfig = this.vHealthCheckConfig
let urlProtocol = "http"
@@ -14170,7 +14176,9 @@ Vue.component("health-check-config-box", {
urlHost: urlHost,
urlPort: urlPort,
urlRequestURI: urlRequestURI,
- urlIsEditing: healthCheckConfig.url.length == 0
+ urlIsEditing: healthCheckConfig.url.length == 0,
+
+ hostErr: ""
}
},
watch: {
@@ -14194,6 +14202,7 @@ Vue.component("health-check-config-box", {
},
urlHost: function () {
this.changeURL()
+ this.hostErr = ""
},
"healthCheck.countTries": function (v) {
let count = parseInt(v)
@@ -14241,6 +14250,24 @@ Vue.component("health-check-config-box", {
}
})
},
+ onChangeURLHost: function () {
+ let checkDomainURL = this.vCheckDomainUrl
+ if (checkDomainURL == null || checkDomainURL.length == 0) {
+ return
+ }
+
+ let that = this
+ Tea.action(checkDomainURL)
+ .params({host: this.urlHost})
+ .success(function (resp) {
+ if (!resp.data.isOk) {
+ that.hostErr = "在当前集群中找不到此域名,可能会影响健康检查结果。"
+ } else {
+ that.hostErr = ""
+ }
+ })
+ .post()
+ },
editURL: function () {
this.urlIsEditing = !this.urlIsEditing
}
@@ -14279,8 +14306,8 @@ Vue.component("health-check-config-box", {
| 域名 |
-
-
+
+
|
@@ -14828,7 +14855,7 @@ Vue.component("checkbox", {
},
template: `
-
+
`
})
@@ -16684,7 +16711,7 @@ Vue.component("dns-route-selector", {
})
Vue.component("dns-domain-selector", {
- props: ["v-domain-id", "v-domain-name"],
+ props: ["v-domain-id", "v-domain-name", "v-provider-name"],
data: function () {
let domainId = this.vDomainId
if (domainId == null) {
@@ -16694,9 +16721,16 @@ Vue.component("dns-domain-selector", {
if (domainName == null) {
domainName = ""
}
+
+ let providerName = this.vProviderName
+ if (providerName == null) {
+ providerName = ""
+ }
+
return {
domainId: domainId,
- domainName: domainName
+ domainName: domainName,
+ providerName: providerName
}
},
methods: {
@@ -16706,6 +16740,7 @@ Vue.component("dns-domain-selector", {
callback: function (resp) {
that.domainId = resp.data.domainId
that.domainName = resp.data.domainName
+ that.providerName = resp.data.providerName
that.change()
}
})
@@ -16721,6 +16756,7 @@ Vue.component("dns-domain-selector", {
callback: function (resp) {
that.domainId = resp.data.domainId
that.domainName = resp.data.domainName
+ that.providerName = resp.data.providerName
that.change()
}
})
@@ -16736,7 +16772,7 @@ Vue.component("dns-domain-selector", {
- {{domainName}}
+ {{providerName}} » {{domainName}}