- | {{condComponent.paramsTitle}} * |
+ {{condComponent.paramsTitle}} * |
@@ -1869,7 +1870,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
- | 不区分大小写 |
+ 不区分大小写 |
@@ -1892,19 +1893,19 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
|
- | 缓存Key * |
-
-
-
- |
-
-
- | 忽略URI参数 |
+ 忽略URI参数 |
|
+
+ | 缓存Key * |
+
+
+
+ |
+
|
@@ -2234,8 +2235,8 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
`});let defaultGeneralHeaders=["Cache-Control","Connection","Date","Pragma","Trailer","Transfer-Encoding","Upgrade","Via","Warning"];Vue.component("http-cond-general-header-length",{props:["v-checkpoint"],data:function(){let e=null,t=null;var i;null!=window.parent.UPDATING_RULE&&(null!=(i=window.parent.UPDATING_RULE.checkpointOptions).headers&&Array.$isArray(i.headers)&&(e=i.headers),null!=i.length&&(t=i.length)),null==e&&(e=defaultGeneralHeaders),null==t&&(t=128);let n=this;return setTimeout(function(){n.change()},100),{headers:e,length:t}},watch:{length:function(e){let t=parseInt(e);(t=isNaN(t)?0:t)<0&&(t=0),this.length=t,this.change()}},methods:{change:function(){this.vCheckpoint.options=[{code:"headers",value:this.headers},{code:"length",value:this.length}]}},template:`
@@ -2402,7 +2403,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
- +添加不缓存条件
+ +添加不缓存条件
`}),Vue.component("origin-list-box",{props:["v-primary-origins","v-backup-origins","v-server-type","v-params"],data:function(){return{primaryOrigins:this.vPrimaryOrigins,backupOrigins:this.vBackupOrigins}},methods:{createPrimaryOrigin:function(){teaweb.popup("/servers/server/settings/origins/addPopup?originType=primary&"+this.vParams,{width:"45em",height:"27em",callback:function(e){teaweb.success("保存成功",function(){window.location.reload()})}})},createBackupOrigin:function(){teaweb.popup("/servers/server/settings/origins/addPopup?originType=backup&"+this.vParams,{width:"45em",height:"27em",callback:function(e){teaweb.success("保存成功",function(){window.location.reload()})}})},updateOrigin:function(e,t){teaweb.popup("/servers/server/settings/origins/updatePopup?originType="+t+"&"+this.vParams+"&originId="+e,{width:"45em",height:"27em",callback:function(e){teaweb.success("保存成功",function(){window.location.reload()})}})},deleteOrigin:function(e,t){let i=this;teaweb.confirm("确定要删除此源站吗?",function(){Tea.action("/servers/server/settings/origins/delete?"+i.vParams+"&originId="+e+"&originType="+t).post().success(function(){teaweb.success("删除成功",function(){window.location.reload()})})})}},template:`
@@ -2423,28 +2424,31 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio
| 操作 |
-
-
由于已经在当前服务分组中进行了对应的配置,在这里的配置将不会生效。
+
由于已经在当前网站分组中进行了对应的配置,在这里的配置将不会生效。
@@ -9699,7 +9703,7 @@ Vue.component("http-header-policy-box", {
-
由于已经在当前服务分组中进行了对应的配置,在这里的配置将不会生效。
+
由于已经在当前网站分组中进行了对应的配置,在这里的配置将不会生效。
@@ -13478,6 +13482,36 @@ Vue.component("http-cond-url-eq-index", {
`
})
+// 全站
+Vue.component("http-cond-url-all", {
+ props: ["v-cond"],
+ data: function () {
+ let cond = {
+ isRequest: true,
+ param: "${requestPath}",
+ operator: "prefix",
+ value: "/",
+ isCaseInsensitive: false
+ }
+ if (this.vCond != null && typeof this.vCond.value == "string") {
+ cond.value = this.vCond.value
+ }
+ return {
+ cond: cond
+ }
+ },
+ methods: {
+ changeCaseInsensitive: function (isCaseInsensitive) {
+ this.cond.isCaseInsensitive = isCaseInsensitive
+ }
+ },
+ template: `
+
+
+
+
`
+})
+
// URL精准匹配
Vue.component("http-cond-url-eq", {
props: ["v-cond"],
@@ -15346,7 +15380,7 @@ Vue.component("api-node-addresses-box", {
// 添加IP地址
addAddr: function () {
let that = this;
- teaweb.popup("/api/node/createAddrPopup", {
+ teaweb.popup("/settings/api/node/createAddrPopup", {
height: "16em",
callback: function (resp) {
that.addrs.push(resp.data.addr);
@@ -15358,7 +15392,7 @@ Vue.component("api-node-addresses-box", {
updateAddr: function (index, addr) {
let that = this;
window.UPDATING_ADDR = addr
- teaweb.popup("/api/node/updateAddrPopup?addressId=", {
+ teaweb.popup("/settings/api/node/updateAddrPopup?addressId=", {
callback: function (resp) {
Vue.set(that.addrs, index, resp.data.addr);
}
@@ -18626,7 +18660,8 @@ Vue.component("node-schedule-conds-box", {
},
valueCPU: 80,
valueMemory: 90,
- valueLoad: 20
+ valueLoad: 20,
+ valueRate: 0
}
},
watch: {
@@ -18732,6 +18767,16 @@ Vue.component("node-schedule-conds-box", {
}
value = load
break
+ case "rate":
+ let rate = parseInt(this.valueRate.toString())
+ if (isNaN(rate)) {
+ rate = 0
+ }
+ if (rate < 0) {
+ rate = 0
+ }
+ value = rate
+ break
}
this.condsConfig.conds.push({
@@ -18770,6 +18815,9 @@ Vue.component("node-schedule-conds-box", {
case "load":
cond.valueFormat = cond.value
return
+ case "rate":
+ cond.valueFormat = cond.value + "/秒"
+ return
}
})
}
@@ -18866,7 +18914,15 @@ Vue.component("node-schedule-conds-box", {
-
+
+
+
+
+
@@ -19767,6 +19823,9 @@ Vue.component("node-schedule-conds-viewer", {
case "load":
cond.valueFormat = cond.value
return
+ case "rate":
+ cond.valueFormat = cond.value + "/秒"
+ return
}
})
}
@@ -20024,6 +20083,90 @@ Vue.component("dns-resolver-config-box", {
`
})
+Vue.component("dns-resolvers-config-box", {
+ props: ["value", "name"],
+ data: function () {
+ let resolvers = this.value
+ if (resolvers == null) {
+ resolvers = []
+ }
+
+ let name = this.name
+ if (name == null || name.length == 0) {
+ name = "dnsResolversJSON"
+ }
+
+ return {
+ formName: name,
+ resolvers: resolvers,
+
+ host: "",
+
+ isAdding: false
+ }
+ },
+ methods: {
+ add: function () {
+ this.isAdding = true
+ let that = this
+ setTimeout(function () {
+ that.$refs.hostRef.focus()
+ })
+ },
+ confirm: function () {
+ let host = this.host.trim()
+ if (host.length == 0) {
+ let that = this
+ setTimeout(function () {
+ that.$refs.hostRef.focus()
+ })
+ return
+ }
+ this.resolvers.push({
+ host: host,
+ port: 0, // TODO
+ protocol: "" // TODO
+ })
+ this.cancel()
+ },
+ cancel: function () {
+ this.isAdding = false
+ this.host = ""
+ this.port = 0
+ this.protocol = ""
+ },
+ remove: function (index) {
+ this.resolvers.$remove(index)
+ }
+ },
+ template: `
+
+
+
+
{{resolver.protocol}}{{resolver.host}}
:{{resolver.port}}
+
+
+
+
+
+
+
+
+
+
+
`
+})
+
Vue.component("ad-instance-objects-box", {
props: ["v-objects", "v-user-id"],
mounted: function () {
@@ -20277,7 +20420,7 @@ Vue.component("grant-selector", {
`
})
-window.REQUEST_COND_COMPONENTS = [{"type":"url-extension","name":"URL扩展名","description":"根据URL中的文件路径扩展名进行过滤","component":"http-cond-url-extension","paramsTitle":"扩展名列表","isRequest":true,"caseInsensitive":false},{"type":"url-eq-index","name":"首页","description":"检查URL路径是为\"/\"","component":"http-cond-url-eq-index","paramsTitle":"URL完整路径","isRequest":true,"caseInsensitive":false},{"type":"url-prefix","name":"URL前缀","description":"根据URL中的文件路径前缀进行过滤","component":"http-cond-url-prefix","paramsTitle":"URL前缀","isRequest":true,"caseInsensitive":true},{"type":"url-eq","name":"URL完整路径","description":"检查URL中的文件路径是否一致","component":"http-cond-url-eq","paramsTitle":"URL完整路径","isRequest":true,"caseInsensitive":true},{"type":"url-regexp","name":"URL正则匹配","description":"使用正则表达式检查URL中的文件路径是否一致","component":"http-cond-url-regexp","paramsTitle":"正则表达式","isRequest":true,"caseInsensitive":true},{"type":"user-agent-regexp","name":"User-Agent正则匹配","description":"使用正则表达式检查User-Agent中是否含有某些浏览器和系统标识","component":"http-cond-user-agent-regexp","paramsTitle":"正则表达式","isRequest":true,"caseInsensitive":true},{"type":"params","name":"参数匹配","description":"根据参数值进行匹配","component":"http-cond-params","paramsTitle":"参数配置","isRequest":true,"caseInsensitive":false},{"type":"url-not-extension","name":"排除:URL扩展名","description":"根据URL中的文件路径扩展名进行过滤","component":"http-cond-url-not-extension","paramsTitle":"扩展名列表","isRequest":true,"caseInsensitive":false},{"type":"url-not-prefix","name":"排除:URL前缀","description":"根据URL中的文件路径前缀进行过滤","component":"http-cond-url-not-prefix","paramsTitle":"URL前缀","isRequest":true,"caseInsensitive":true},{"type":"url-not-eq","name":"排除:URL完整路径","description":"检查URL中的文件路径是否一致","component":"http-cond-url-not-eq","paramsTitle":"URL完整路径","isRequest":true,"caseInsensitive":true},{"type":"url-not-regexp","name":"排除:URL正则匹配","description":"使用正则表达式检查URL中的文件路径是否一致,如果一致,则不匹配","component":"http-cond-url-not-regexp","paramsTitle":"正则表达式","isRequest":true,"caseInsensitive":true},{"type":"user-agent-not-regexp","name":"排除:User-Agent正则匹配","description":"使用正则表达式检查User-Agent中是否含有某些浏览器和系统标识,如果含有,则不匹配","component":"http-cond-user-agent-not-regexp","paramsTitle":"正则表达式","isRequest":true,"caseInsensitive":true},{"type":"mime-type","name":"内容MimeType","description":"根据服务器返回的内容的MimeType进行过滤。注意:当用于缓存条件时,此条件需要结合别的请求条件使用。","component":"http-cond-mime-type","paramsTitle":"MimeType列表","isRequest":false,"caseInsensitive":false}]
+window.REQUEST_COND_COMPONENTS = [{"type":"url-extension","name":"文件扩展名","description":"根据URL中的文件路径扩展名进行过滤","component":"http-cond-url-extension","paramsTitle":"扩展名列表","isRequest":true,"caseInsensitive":false},{"type":"url-eq-index","name":"首页","description":"检查URL路径是为\"/\"","component":"http-cond-url-eq-index","paramsTitle":"URL完整路径","isRequest":true,"caseInsensitive":false},{"type":"url-all","name":"全站","description":"全站所有URL","component":"http-cond-url-all","paramsTitle":"URL完整路径","isRequest":true,"caseInsensitive":false},{"type":"url-prefix","name":"URL前缀","description":"根据URL中的文件路径前缀进行过滤","component":"http-cond-url-prefix","paramsTitle":"URL前缀","isRequest":true,"caseInsensitive":true},{"type":"url-eq","name":"URL完整路径","description":"检查URL中的文件路径是否一致","component":"http-cond-url-eq","paramsTitle":"URL完整路径","isRequest":true,"caseInsensitive":true},{"type":"url-regexp","name":"URL正则匹配","description":"使用正则表达式检查URL中的文件路径是否一致","component":"http-cond-url-regexp","paramsTitle":"正则表达式","isRequest":true,"caseInsensitive":true},{"type":"user-agent-regexp","name":"User-Agent正则匹配","description":"使用正则表达式检查User-Agent中是否含有某些浏览器和系统标识","component":"http-cond-user-agent-regexp","paramsTitle":"正则表达式","isRequest":true,"caseInsensitive":true},{"type":"params","name":"参数匹配","description":"根据参数值进行匹配","component":"http-cond-params","paramsTitle":"参数配置","isRequest":true,"caseInsensitive":false},{"type":"url-not-extension","name":"排除:URL扩展名","description":"根据URL中的文件路径扩展名进行过滤","component":"http-cond-url-not-extension","paramsTitle":"扩展名列表","isRequest":true,"caseInsensitive":false},{"type":"url-not-prefix","name":"排除:URL前缀","description":"根据URL中的文件路径前缀进行过滤","component":"http-cond-url-not-prefix","paramsTitle":"URL前缀","isRequest":true,"caseInsensitive":true},{"type":"url-not-eq","name":"排除:URL完整路径","description":"检查URL中的文件路径是否一致","component":"http-cond-url-not-eq","paramsTitle":"URL完整路径","isRequest":true,"caseInsensitive":true},{"type":"url-not-regexp","name":"排除:URL正则匹配","description":"使用正则表达式检查URL中的文件路径是否一致,如果一致,则不匹配","component":"http-cond-url-not-regexp","paramsTitle":"正则表达式","isRequest":true,"caseInsensitive":true},{"type":"user-agent-not-regexp","name":"排除:User-Agent正则匹配","description":"使用正则表达式检查User-Agent中是否含有某些浏览器和系统标识,如果含有,则不匹配","component":"http-cond-user-agent-not-regexp","paramsTitle":"正则表达式","isRequest":true,"caseInsensitive":true},{"type":"mime-type","name":"内容MimeType","description":"根据服务器返回的内容的MimeType进行过滤。注意:当用于缓存条件时,此条件需要结合别的请求条件使用。","component":"http-cond-mime-type","paramsTitle":"MimeType列表","isRequest":false,"caseInsensitive":false}]
window.REQUEST_COND_OPERATORS = [{"description":"判断是否正则表达式匹配","name":"正则表达式匹配","op":"regexp"},{"description":"判断是否正则表达式不匹配","name":"正则表达式不匹配","op":"not regexp"},{"description":"使用字符串对比参数值是否相等于某个值","name":"字符串等于","op":"eq"},{"description":"参数值包含某个前缀","name":"字符串前缀","op":"prefix"},{"description":"参数值包含某个后缀","name":"字符串后缀","op":"suffix"},{"description":"参数值包含另外一个字符串","name":"字符串包含","op":"contains"},{"description":"参数值不包含另外一个字符串","name":"字符串不包含","op":"not contains"},{"description":"使用字符串对比参数值是否不相等于某个值","name":"字符串不等于","op":"not"},{"description":"判断参数值在某个列表中","name":"在列表中","op":"in"},{"description":"判断参数值不在某个列表中","name":"不在列表中","op":"not in"},{"description":"判断小写的扩展名(不带点)在某个列表中","name":"扩展名","op":"file ext"},{"description":"判断MimeType在某个列表中,支持类似于image/*的语法","name":"MimeType","op":"mime type"},{"description":"判断版本号在某个范围内,格式为version1,version2","name":"版本号范围","op":"version range"},{"description":"将参数转换为整数数字后进行对比","name":"整数等于","op":"eq int"},{"description":"将参数转换为可以有小数的浮点数字进行对比","name":"浮点数等于","op":"eq float"},{"description":"将参数转换为数字进行对比","name":"数字大于","op":"gt"},{"description":"将参数转换为数字进行对比","name":"数字大于等于","op":"gte"},{"description":"将参数转换为数字进行对比","name":"数字小于","op":"lt"},{"description":"将参数转换为数字进行对比","name":"数字小于等于","op":"lte"},{"description":"对整数参数值取模,除数为10,对比值为余数","name":"整数取模10","op":"mod 10"},{"description":"对整数参数值取模,除数为100,对比值为余数","name":"整数取模100","op":"mod 100"},{"description":"对整数参数值取模,对比值格式为:除数,余数,比如10,1","name":"整数取模","op":"mod"},{"description":"将参数转换为IP进行对比","name":"IP等于","op":"eq ip"},{"description":"将参数转换为IP进行对比","name":"IP大于","op":"gt ip"},{"description":"将参数转换为IP进行对比","name":"IP大于等于","op":"gte ip"},{"description":"将参数转换为IP进行对比","name":"IP小于","op":"lt ip"},{"description":"将参数转换为IP进行对比","name":"IP小于等于","op":"lte ip"},{"description":"IP在某个范围之内,范围格式可以是英文逗号分隔的\u003ccode-label\u003e开始IP,结束IP\u003c/code-label\u003e,比如\u003ccode-label\u003e192.168.1.100,192.168.2.200\u003c/code-label\u003e,或者CIDR格式的ip/bits,比如\u003ccode-label\u003e192.168.2.1/24\u003c/code-label\u003e","name":"IP范围","op":"ip range"},{"description":"对IP参数值取模,除数为10,对比值为余数","name":"IP取模10","op":"ip mod 10"},{"description":"对IP参数值取模,除数为100,对比值为余数","name":"IP取模100","op":"ip mod 100"},{"description":"对IP参数值取模,对比值格式为:除数,余数,比如10,1","name":"IP取模","op":"ip mod"},{"description":"判断参数值解析后的文件是否存在","name":"文件存在","op":"file exist"},{"description":"判断参数值解析后的文件是否不存在","name":"文件不存在","op":"file not exist"}]