@@ -2025,16 +2024,19 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
[选择用户]
{{user.fullname}} ({{user.username}})
-
`}),Vue.component("uam-config-box",{props:["v-uam-config"],data:function(){let e=this.vUamConfig;return{config:e=null==e?{isOn:!1}:e}},template:`
@@ -2725,8 +2727,8 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
`}),Vue.component("ssl-certs-view",{props:["v-certs"],data:function(){let e=this.vCerts;return{certs:e=null==e?[]:e}},methods:{formatTime:function(e){return new Date(1e3*e).format("Y-m-d")},viewCert:function(e){teaweb.popup("/servers/certs/certPopup?certId="+e,{height:"28em",width:"48em"})}},template:`
-
- {{cert.name}} / {{cert.dnsNames}} / 有效至{{formatTime(cert.timeEndAt)}}
+
+ {{cert.name}} / {{cert.dnsNames}} / 有效至{{formatTime(cert.timeEndAt)}}
`}),Vue.component("reverse-proxy-box",{props:["v-reverse-proxy-ref","v-reverse-proxy-config","v-is-location","v-is-group","v-family"],data:function(){let e=this.vReverseProxyRef,t=(null==e&&(e={isPrior:!1,isOn:!1,reverseProxyId:0}),this.vReverseProxyConfig),i=(null==(t=null==t?{requestPath:"",stripPrefix:"",requestURI:"",requestHost:"",requestHostType:0,addHeaders:[],connTimeout:{count:0,unit:"second"},readTimeout:{count:0,unit:"second"},idleTimeout:{count:0,unit:"second"},maxConns:0,maxIdleConns:0,followRedirects:!1}:t).addHeaders&&(t.addHeaders=[]),null==t.connTimeout&&(t.connTimeout={count:0,unit:"second"}),null==t.readTimeout&&(t.readTimeout={count:0,unit:"second"}),null==t.idleTimeout&&(t.idleTimeout={count:0,unit:"second"}),null==t.proxyProtocol&&Vue.set(t,"proxyProtocol",{isOn:!1,version:1}),[{name:"X-Real-IP",isChecked:!1},{name:"X-Forwarded-For",isChecked:!1},{name:"X-Forwarded-By",isChecked:!1},{name:"X-Forwarded-Host",isChecked:!1},{name:"X-Forwarded-Proto",isChecked:!1}]);return i.forEach(function(e){e.isChecked=t.addHeaders.$contains(e.name)}),{reverseProxyRef:e,reverseProxyConfig:t,advancedVisible:!1,family:this.vFamily,forwardHeaders:i}},watch:{"reverseProxyConfig.requestHostType":function(e){let t=parseInt(e);isNaN(t)&&(t=0),this.reverseProxyConfig.requestHostType=t},"reverseProxyConfig.connTimeout.count":function(e){let t=parseInt(e);(isNaN(t)||t<0)&&(t=0),this.reverseProxyConfig.connTimeout.count=t},"reverseProxyConfig.readTimeout.count":function(e){let t=parseInt(e);(isNaN(t)||t<0)&&(t=0),this.reverseProxyConfig.readTimeout.count=t},"reverseProxyConfig.idleTimeout.count":function(e){let t=parseInt(e);(isNaN(t)||t<0)&&(t=0),this.reverseProxyConfig.idleTimeout.count=t},"reverseProxyConfig.maxConns":function(e){let t=parseInt(e);(isNaN(t)||t<0)&&(t=0),this.reverseProxyConfig.maxConns=t},"reverseProxyConfig.maxIdleConns":function(e){let t=parseInt(e);(isNaN(t)||t<0)&&(t=0),this.reverseProxyConfig.maxIdleConns=t},"reverseProxyConfig.proxyProtocol.version":function(e){let t=parseInt(e);isNaN(t)&&(t=1),this.reverseProxyConfig.proxyProtocol.version=t}},methods:{isOn:function(){return(!this.vIsLocation&&!this.vIsGroup||this.reverseProxyRef.isPrior)&&this.reverseProxyRef.isOn},changeAdvancedVisible:function(e){this.advancedVisible=e},changeAddHeader:function(){this.reverseProxyConfig.addHeaders=this.forwardHeaders.filter(function(e){return e.isChecked}).map(function(e){return e.name})}},template:`
diff --git a/web/public/js/components.src.js b/web/public/js/components.src.js
index 82bb0115..cbee772c 100755
--- a/web/public/js/components.src.js
+++ b/web/public/js/components.src.js
@@ -3255,8 +3255,7 @@ Vue.component("http-request-conds-view", {
})
return {
- initConds: conds,
- version: 0 // 为了让组件能及时更新加入此变量
+ initConds: conds
}
},
computed: {
@@ -3275,18 +3274,20 @@ Vue.component("http-request-conds-view", {
}
return cond.param + " " + cond.operator
},
+ updateConds: function (conds) {
+ this.initConds = conds
+ },
notifyChange: function () {
- this.version++
let that = this
this.initConds.groups.forEach(function (group) {
group.conds.forEach(function (cond) {
cond.typeName = that.typeName(cond)
})
})
+ this.$forceUpdate()
}
},
template: `
-
{{version}}
@@ -4386,6 +4387,8 @@ Vue.component("http-cache-refs-config-box", {
resp.data.cacheRef.id = that.refs[index].id
Vue.set(that.refs, index, resp.data.cacheRef)
that.change()
+ that.$refs.cacheRef[index].updateConds(resp.data.cacheRef.conds)
+ that.$refs.cacheRef[index].notifyChange()
}
})
},
@@ -4428,6 +4431,8 @@ Vue.component("http-cache-refs-config-box", {
return unit
},
change: function () {
+ this.$forceUpdate()
+
// 自动保存
if (this.vCachePolicyId != null && this.vCachePolicyId > 0) { // 缓存策略
Tea.action("/servers/components/cache/updateRefs")
@@ -6249,11 +6254,12 @@ Vue.component("user-selector", {
// UAM模式配置
Vue.component("uam-config-box", {
- props: ["v-uam-config"],
+ props: ["v-uam-config", "v-is-location", "v-is-group"],
data: function () {
let config = this.vUamConfig
if (config == null) {
config = {
+ isPrior: false,
isOn: false
}
}
@@ -6264,13 +6270,16 @@ Vue.component("uam-config-box", {
template: `
-
- 启用5秒盾
-
-
-
-
-
+
+
+
+ 启用5秒盾
+
+
+
+
+
+
`
@@ -7809,8 +7818,8 @@ Vue.component("ssl-certs-view", {
},
template: `
-
- {{cert.name}} / {{cert.dnsNames}} / 有效至{{formatTime(cert.timeEndAt)}}
+
+ {{cert.name}} / {{cert.dnsNames}} / 有效至{{formatTime(cert.timeEndAt)}}
`
diff --git a/web/public/js/components/server/http-cache-refs-config-box.js b/web/public/js/components/server/http-cache-refs-config-box.js
index 03e11652..a982f3b3 100644
--- a/web/public/js/components/server/http-cache-refs-config-box.js
+++ b/web/public/js/components/server/http-cache-refs-config-box.js
@@ -98,6 +98,8 @@ Vue.component("http-cache-refs-config-box", {
resp.data.cacheRef.id = that.refs[index].id
Vue.set(that.refs, index, resp.data.cacheRef)
that.change()
+ that.$refs.cacheRef[index].updateConds(resp.data.cacheRef.conds)
+ that.$refs.cacheRef[index].notifyChange()
}
})
},
@@ -140,6 +142,8 @@ Vue.component("http-cache-refs-config-box", {
return unit
},
change: function () {
+ this.$forceUpdate()
+
// 自动保存
if (this.vCachePolicyId != null && this.vCachePolicyId > 0) { // 缓存策略
Tea.action("/servers/components/cache/updateRefs")
diff --git a/web/public/js/components/server/http-request-conds-view.js b/web/public/js/components/server/http-request-conds-view.js
index cc86c6c7..d3c362b7 100644
--- a/web/public/js/components/server/http-request-conds-view.js
+++ b/web/public/js/components/server/http-request-conds-view.js
@@ -19,8 +19,7 @@ Vue.component("http-request-conds-view", {
})
return {
- initConds: conds,
- version: 0 // 为了让组件能及时更新加入此变量
+ initConds: conds
}
},
computed: {
@@ -39,18 +38,20 @@ Vue.component("http-request-conds-view", {
}
return cond.param + " " + cond.operator
},
+ updateConds: function (conds) {
+ this.initConds = conds
+ },
notifyChange: function () {
- this.version++
let that = this
this.initConds.groups.forEach(function (group) {
group.conds.forEach(function (cond) {
cond.typeName = that.typeName(cond)
})
})
+ this.$forceUpdate()
}
},
template: `
-
{{version}}
diff --git a/web/public/js/components/server/ssl-certs-view.js b/web/public/js/components/server/ssl-certs-view.js
index 87e33427..562ab8f3 100644
--- a/web/public/js/components/server/ssl-certs-view.js
+++ b/web/public/js/components/server/ssl-certs-view.js
@@ -25,8 +25,8 @@ Vue.component("ssl-certs-view", {
},
template: `
-
- {{cert.name}} / {{cert.dnsNames}} / 有效至{{formatTime(cert.timeEndAt)}}
+
+ {{cert.name}} / {{cert.dnsNames}} / 有效至{{formatTime(cert.timeEndAt)}}
`