diff --git a/internal/web/actions/actionutils/parent_action.go b/internal/web/actions/actionutils/parent_action.go index 9a2b9edb..fcc7c379 100644 --- a/internal/web/actions/actionutils/parent_action.go +++ b/internal/web/actions/actionutils/parent_action.go @@ -49,7 +49,11 @@ func (this *ParentAction) ErrorText(err string) { } func (this *ParentAction) NotFound(name string, itemId int64) { - this.ErrorPage(errors.New(name + " id: '" + strconv.FormatInt(itemId, 10) + "' is not found")) + if itemId > 0 { + this.ErrorPage(errors.New(name + " id: '" + strconv.FormatInt(itemId, 10) + "' is not found")) + } else { + this.ErrorPage(errors.New(name + " is not found")) + } } func (this *ParentAction) NewPage(total int64, size ...int64) *Page { diff --git a/web/public/js/components.js b/web/public/js/components.js index 6cc0b52a..f1bfd71a 100644 --- a/web/public/js/components.js +++ b/web/public/js/components.js @@ -1183,7 +1183,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio - 是否开启统计 + 启用统计
@@ -2212,7 +2212,7 @@ Vue.component("traffic-map-box",{props:["v-stats","v-is-attack"],mounted:functio - 启用配置 + 启用Websocket
@@ -2428,7 +2428,7 @@ example2.com  
-

支持普通域名(example.com)、泛域名(*.example.com、域名后缀(以点号开头,如.example.com)和正则表达式(以波浪号开头,如~.*.example.com

+

支持普通域名(example.com)、泛域名(*.example.com、域名后缀(以点号开头,如.example.com)和正则表达式(以波浪号开头,如~.*.example.com;如果域名后有端口,请加上端口号。

只支持普通域名(example.comwww.example.com)。

@@ -3173,13 +3173,13 @@ example2.com
-`}),Vue.component("http-compression-config-box",{props:["v-compression-config","v-is-location","v-is-group"],mounted:function(){let e=this;sortLoad(function(){e.initSortableTypes()})},data:function(){let t=this.vCompressionConfig,e=(null==(t=null==t?{isPrior:!1,isOn:!1,useDefaultTypes:!0,types:["brotli","gzip","zstd","deflate"],level:5,decompressData:!1,gzipRef:null,deflateRef:null,brotliRef:null,minLength:{count:0,unit:"kb"},maxLength:{count:0,unit:"kb"},mimeTypes:["text/*","application/*","font/*"],extensions:[".js",".json",".html",".htm",".xml",".css",".woff2",".txt"],conds:null}:t).types&&(t.types=[]),null==t.mimeTypes&&(t.mimeTypes=[]),null==t.extensions&&(t.extensions=[]),[{name:"Gzip",code:"gzip",isOn:!0},{name:"Deflate",code:"deflate",isOn:!0},{name:"Brotli",code:"brotli",isOn:!0},{name:"ZSTD",code:"zstd",isOn:!0}]),i=[];return t.types.forEach(function(t){e.forEach(function(e){t==e.code&&(e.isOn=!0,i.push(e))})}),e.forEach(function(e){t.types.$contains(e.code)||(e.isOn=!1,i.push(e))}),{config:t,moreOptionsVisible:!1,allTypes:i}},watch:{"config.level":function(e){let t=parseInt(e);isNaN(t)||t<1?t=1:10 +`}),Vue.component("http-compression-config-box",{props:["v-compression-config","v-is-location","v-is-group"],mounted:function(){let e=this;sortLoad(function(){e.initSortableTypes()})},data:function(){let t=this.vCompressionConfig,e=(null==(t=null==t?{isPrior:!1,isOn:!1,useDefaultTypes:!0,types:["brotli","gzip","zstd","deflate"],level:5,decompressData:!1,gzipRef:null,deflateRef:null,brotliRef:null,minLength:{count:0,unit:"kb"},maxLength:{count:0,unit:"kb"},mimeTypes:["text/*","application/javascript","application/json","application/atom+xml","application/rss+xml","application/xhtml+xml","font/*","image/svg+xml"],extensions:[".js",".json",".html",".htm",".xml",".css",".woff2",".txt"],conds:null}:t).types&&(t.types=[]),null==t.mimeTypes&&(t.mimeTypes=[]),null==t.extensions&&(t.extensions=[]),[{name:"Gzip",code:"gzip",isOn:!0},{name:"Deflate",code:"deflate",isOn:!0},{name:"Brotli",code:"brotli",isOn:!0},{name:"ZSTD",code:"zstd",isOn:!0}]),i=[];return t.types.forEach(function(t){e.forEach(function(e){t==e.code&&(e.isOn=!0,i.push(e))})}),e.forEach(function(e){t.types.$contains(e.code)||(e.isOn=!1,i.push(e))}),{config:t,moreOptionsVisible:!1,allTypes:i}},watch:{"config.level":function(e){let t=parseInt(e);isNaN(t)||t<1?t=1:10 - + - + - + - + - + - + - + - + - + - + - + - +
启用启用内容压缩
@@ -3288,7 +3288,7 @@ example2.com
启用启用字符编码
@@ -3405,7 +3405,7 @@ example2.com
开启访问日志启用访问日志
@@ -3919,7 +3919,7 @@ example2.com
-
+
@@ -3975,7 +3975,7 @@ example2.com
是否开启静态资源分发启用静态资源分发
@@ -4046,7 +4046,7 @@ example2.com
启用启用WebP压缩
@@ -5123,7 +5123,7 @@ example2.com
`}),Vue.component("not-found-box",{props:["message"],template:`

{{message}}

-
`}),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("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"boolean"==typeof this.newValue&&this.newValue||this.newValue==this.elementValue}},watch:{value:function(e){"boolean"==typeof e&&(this.newValue=e)}},template:`
`}),Vue.component("network-addresses-view",{props:["v-addresses"],template:`
diff --git a/web/public/js/components.src.js b/web/public/js/components.src.js index 34e37412..7bce80f2 100755 --- a/web/public/js/components.src.js +++ b/web/public/js/components.src.js @@ -3435,7 +3435,7 @@ Vue.component("http-stat-config-box", {
是否开启统计启用统计
@@ -6680,7 +6680,7 @@ Vue.component("http-websocket-box", {
启用配置启用Websocket
@@ -7276,7 +7276,7 @@ Vue.component("domains-box", {  
-

支持普通域名(example.com)、泛域名(*.example.com、域名后缀(以点号开头,如.example.com)和正则表达式(以波浪号开头,如~.*.example.com

+

支持普通域名(example.com)、泛域名(*.example.com、域名后缀(以点号开头,如.example.com)和正则表达式(以波浪号开头,如~.*.example.com;如果域名后有端口,请加上端口号。

只支持普通域名(example.comwww.example.com)。

@@ -9107,7 +9107,7 @@ Vue.component("http-compression-config-box", { brotliRef: null, minLength: {count: 0, "unit": "kb"}, maxLength: {count: 0, "unit": "kb"}, - mimeTypes: ["text/*", "application/*", "font/*"], + mimeTypes: ["text/*", "application/javascript", "application/json", "application/atom+xml", "application/rss+xml", "application/xhtml+xml", "font/*", "image/svg+xml"], extensions: [".js", ".json", ".html", ".htm", ".xml", ".css", ".woff2", ".txt"], conds: null } @@ -9238,7 +9238,7 @@ Vue.component("http-compression-config-box", {
启用启用内容压缩
@@ -9433,7 +9433,7 @@ Vue.component("http-charsets-box", {
启用启用字符编码
@@ -10064,7 +10064,7 @@ Vue.component("http-access-log-config-box", {
开启访问日志启用访问日志
@@ -11181,7 +11181,7 @@ Vue.component("http-access-log-search-box", {
-
+
@@ -11447,7 +11447,7 @@ Vue.component("http-web-root-box", {
是否开启静态资源分发启用静态资源分发
@@ -11586,7 +11586,7 @@ Vue.component("http-webp-config-box", {
启用启用WebP压缩
@@ -15697,7 +15697,7 @@ Vue.component("checkbox", { this.newValue = "" }, isChecked: function () { - return this.newValue == this.elementValue + return (typeof (this.newValue) == "boolean" && this.newValue) || this.newValue == this.elementValue } }, watch: {