From 71803f7d3b83a671d84955db9e6cc31c02d950a5 Mon Sep 17 00:00:00 2001 From: zhangwei Date: Tue, 13 Nov 2018 11:14:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=BC=93=E5=AD=98=E7=AD=96?= =?UTF-8?q?=E7=95=A5=E5=8F=82=E6=95=B0=E9=AA=8C=E8=AF=81=E4=B8=8E=E5=A4=84?= =?UTF-8?q?=E7=90=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/messages/message_en.properties | 5 +- .../resources/messages/message_ru.properties | 7 +- .../messages/message_zh_CN.properties | 7 +- .../WEB-INF/views/cfg/proxy/cache/form.jsp | 88 +++++++++++++------ 4 files changed, 77 insertions(+), 30 deletions(-) diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index 229c64ee7..9837aefee 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -1351,7 +1351,7 @@ cache_whitelist=Cache Bypass cache_key=Cache key ignore_query_string=Ignore Query String in URL include_cookie=Include Cookie Values -no_revalidate=Cache Revalidate +no_revalidate=No Revalidate cache_dyn_url=Cache Dynamic Content cache_cookied_cont=Cache Cookied Content ignore_req_nocache=Ignore Request no-cache Headers @@ -1362,3 +1362,6 @@ pinning_time=Cache Pinning Time max_cache_size=Max Cache Size inactive_time=Inactive Time max_cache_obj_size=Max Cache Object Size +cache_time_error=Cache time can not exceed 24 hours(1440 minutes,86400 seconds). +cache_size_error=Cache size can not exceed 1024TB(1048576GB,1073741824MB). +ignore_qs_error=Ignore query string has invisible character or comma \ No newline at end of file diff --git a/src/main/resources/messages/message_ru.properties b/src/main/resources/messages/message_ru.properties index 35f230c57..0ec3e3f38 100644 --- a/src/main/resources/messages/message_ru.properties +++ b/src/main/resources/messages/message_ru.properties @@ -1341,7 +1341,7 @@ cache_whitelist=Cache Bypass cache_key=Cache key ignore_query_string=Ignore Query String in URL include_cookie=Include Cookie Values -no_revalidate=Cache Revalidate +no_revalidate=No Revalidate cache_dyn_url=Cache Dynamic Content cache_cookied_cont=Cache Cookied Content ignore_req_nocache=Ignore Request no-cache Headers @@ -1351,4 +1351,7 @@ min_use=Minimum Use pinning_time=Cache Pinning Time max_cache_size=Max Cache Size inactive_time=Inactive Time -max_cache_obj_size=Max Cache Object Size \ No newline at end of file +max_cache_obj_size=Max Cache Object Size +cache_time_error=Cache time can not exceed 24 hours(1440 minutes,86400 seconds). +cache_size_error=Cache size can not exceed 1024TB(1048576GB,1073741824MB). +ignore_qs_error=Ignore query string has invisible character or comma \ No newline at end of file diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index face500f8..b308e88c6 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -1344,7 +1344,7 @@ cache_whitelist=\u7F13\u5B58\u767D\u540D\u5355 cache_key=\u7F13\u5B58\u7B97\u6CD5 ignore_query_string=\u5FFD\u7565URL\u4E2D\u7684\u67E5\u8BE2\u53C2\u6570 include_cookie=\u5305\u542B\u7684cookie\u4FE1\u606F -no_revalidate=\u7F13\u5B58\u91CD\u65B0\u9A8C\u8BC1 +no_revalidate=\u4E0D\u91CD\u65B0\u9A8C\u8BC1 cache_dyn_url=\u7F13\u5B58\u52A8\u6001\u5185\u5BB9 cache_cookied_cont=\u7F13\u5B58Cookie\u5185\u5BB9 ignore_req_nocache=\u5FFD\u7565\u8BF7\u6C42\u5934\u57DF\u4E0D\u7F13\u5B58\u53C2\u6570 @@ -1354,4 +1354,7 @@ min_use=\u6700\u5C0F\u8BBF\u95EE\u6B21\u6570 pinning_time=\u7F13\u5B58\u65F6\u95F4 max_cache_size=\u6700\u5927\u7F13\u5B58\u5927\u5C0F inactive_time=\u672A\u88AB\u8BF7\u6C42\u7684\u6587\u4EF6\u65F6\u95F4 -max_cache_obj_size=\u6700\u5927\u7F13\u5B58\u5BF9\u8C61\u5927\u5C0F \ No newline at end of file +max_cache_obj_size=\u6700\u5927\u7F13\u5B58\u5BF9\u8C61\u5927\u5C0F +cache_time_error=\u7F13\u5B58\u65F6\u95F4\u4E0D\u80FD\u8D85\u8FC7 24 \u5C0F\u65F6(1440\u5206\u949F,86400\u79D2). +cache_size_error=\u7F13\u5B58\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC71024TB(1048576GB,1073741824MB). +ignore_qs_error=\u5FFD\u7565\u7684\u67E5\u8BE2\u53C2\u6570\u4E2D\u5305\u542B\u4E0D\u53EF\u89C1\u5B57\u7B26\u6216\u8005\u9017\u53F7 \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/cache/form.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/cache/form.jsp index 66feeb836..0660fec63 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/cache/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/cache/form.jsp @@ -13,6 +13,35 @@ $(document) .ready( function() { + $("#ignore_qs").tagsInput({ + width:$("#ignore_qs").find(".form-control").width(), + defaultText:'please input ignore query string in URL', + 'delimiter':',',//特殊字符串分隔与表达式的多关键词 + maxCount:0, + onAddTag:function(tag,size){ + var reg = new RegExp(/\t|\r|\n|,/); + if (tag.match(reg)) { + $(this).parents(".col-md-6").next("div").html(""); + }else{ + $(this).parents(".col-md-6").next("div").html(""); + } + }, + onRemoveTag:function(tag,size){ + $(this).parents(".col-md-6").next("div").html(""); + } + }); + $(".tagsinput").popover({ + animation:true, + container:'body', + placement:'right', + html:true, + trigger:"hover", + title:"", + content:function(){ + var content = $("#tagsinputTip").text(); + return content; + } + }); //initCommIpVal(); /* $("#cancel").on("click", function() { window.history.back(); @@ -71,67 +100,71 @@ var flag = true; var subscribeId=0; + if($("#ignore_qs").parents(".col-md-6").next("div").html()!=''){ + $("#ignore_qs").parents(".col-md-6").next("div").html(""); + return; + } if($("#pinning_time_unit").val()=='h'){ if(parseInt($("#pinning_time").val())>24){ - alert($("#pinning_time").val()); + $("div[for='pinning_time']").append(""); return ; } }else if($("#pinning_time_unit").val()=='m'){ if(parseInt($("#pinning_time").val())>1440){ - alert($("#pinning_time").val()); + $("div[for='pinning_time']").append(""); return ; } }else if($("#pinning_time_unit").val()=='s'){ if(parseInt($("#pinning_time").val())>86400){ - alert($("#pinning_time").val()); + $("div[for='pinning_time']").append(""); return ; } } if($("#inactive_time_unit").val()=='h'){ if(parseInt($("#inactive_time").val())>24){ - alert($("#inactive_time").val()); + $("div[for='inactive_time']").append(""); return ; } }else if($("#inactive_time_unit").val()=='m'){ if(parseInt($("#inactive_time").val())>1440){ - alert($("#inactive_time").val()); + $("div[for='inactive_time']").append(""); return ; } }else if($("#inactive_time_unit").val()=='s'){ if(parseInt($("#inactive_time").val())>86400){ - alert($("#inactive_time").val()); + $("div[for='inactive_time']").append(""); return ; } } if($("#max_cache_size_unit").val()=='t'){ if(parseInt($("#max_cache_size").val())>1024){ - alert($("#max_cache_size").val()); + $("div[for='max_cache_size']").append(""); return ; } }else if($("#max_cache_size_unit").val()=='g'){ if(parseInt($("#max_cache_size").val())>1048576){ - alert($("#max_cache_size").val()); + $("div[for='max_cache_size']").append(""); return ; } }else if($("#max_cache_size_unit").val()=='m'){ if(parseInt($("#max_cache_size").val())>1073741824){ - alert($("#max_cache_size").val()); + $("div[for='max_cache_size']").append(""); return ; } } if($("#max_cache_obj_size_unit").val()=='t'){ if(parseInt($("#max_cache_obj_size").val())>1024){ - alert($("#max_cache_obj_size").val()); + $("div[for='max_cache_obj_size']").append(""); return ; } }else if($("#max_cache_obj_size_unit").val()=='g'){ if(parseInt($("#max_cache_obj_size").val())>1048576){ - alert($("#max_cache_obj_size").val()); + $("div[for='max_cache_obj_size']").append(""); return ; } }else if($("#max_cache_obj_size_unit").val()=='m'){ if(parseInt($("#max_cache_obj_size").val())>1073741824){ - alert($("#max_cache_obj_size").val()); + $("div[for='max_cache_obj_size']").append(""); return ; } } @@ -357,19 +390,6 @@
- <%-- ignore_qs --%> -
-
- -
- -
-
-
-
+ <%-- ignore_qs --%> +
+
+ +
+ +
+
+
+
+
@@ -525,6 +559,7 @@
+
<%--
@@ -561,6 +596,7 @@
+
<%--
@@ -589,6 +625,7 @@
+
<%--
@@ -627,6 +664,7 @@
+