From 0e4583e7a58e3492a0646aef1aacd0450dec4a47 Mon Sep 17 00:00:00 2001 From: zhangwei Date: Thu, 12 Jul 2018 14:59:50 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9HTTP=E7=9B=91=E6=B5=8B?= =?UTF-8?q?=E6=97=B6=E7=94=A8=E6=88=B7=E8=87=AA=E5=AE=9A=E4=B9=89=E5=9F=9F?= =?UTF-8?q?=E7=9A=84HTTP=E5=A4=B4=E9=83=A8=E5=8C=B9=E9=85=8D=E5=8C=BA?= =?UTF-8?q?=E5=9F=9F=E5=AD=97=E5=85=B8=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhangwei --- src/main/java/com/nis/util/Constants.java | 2 +- src/main/resources/nis.properties | 10 +++++++--- src/main/webapp/static/global/css/components.css | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/nis/util/Constants.java b/src/main/java/com/nis/util/Constants.java index d2d7c1a10..c5e641316 100644 --- a/src/main/java/com/nis/util/Constants.java +++ b/src/main/java/com/nis/util/Constants.java @@ -450,7 +450,7 @@ public final class Constants { //HTTP自定义域相关参数 public static String HTTP_HEADER_USER_REGION_KEY=Configurations.getStringProperty("http_header_user_region_key", "HTTP_HEADER"); - public static String HTTP_HEADER_DICT_MODULE=Configurations.getStringProperty("http_header_dict_module", "REQUEST_HEADER_DISTRICT"); + public static String HTTP_HEADER_DICT_MODULE=Configurations.getStringProperty("http_header_dict_module", "HTTP_HEADER_DISTRICT"); //DNS自定义域参数 public static String DNS_STRATEGY_USER_REGION_KEY=Configurations.getStringProperty("dns_strategy_user_region_key", "DNS_STRATEGY"); } diff --git a/src/main/resources/nis.properties b/src/main/resources/nis.properties index a0d799891..02a431f85 100644 --- a/src/main/resources/nis.properties +++ b/src/main/resources/nis.properties @@ -306,6 +306,10 @@ userregion_replace_type_key=zone userregion_replace_req_key_value=http_req_body userregion_replace_res_key_value=http_res_body userregion_replace_regex_key=regex +#用户自定义域占位符 +user_region_placeholder= +#用户自定义域分隔符 +user_region_split=; #IP相关验证正则 ipv4_ip_subnet_regexp=^(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)(\\.(25[0-5]|2[0-4]\\d|[0-1]?\\d?\\d)){3}/(3[0-2]|[1-2][0-9]|[0-9])$ ipv6_ip_subnet_regexp=^\\s*((([0-9A-Fa-f]{1,4}\:){7}(([0-9A-Fa-f]{1,4})|\:))|(([0-9A-Fa-f]{1,4}\:){6}(\:|(\:[0-9A-Fa-f]{1,4})))|(([0-9A-Fa-f]{1,4}\:){5}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:){4}(\:[0-9A-Fa-f]{1,4}){0,1}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:){3}(\:[0-9A-Fa-f]{1,4}){0,2}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:){2}(\:[0-9A-Fa-f]{1,4}){0,3}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(([0-9A-Fa-f]{1,4}\:)(\:[0-9A-Fa-f]{1,4}){0,4}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2})))|(\:(\:[0-9A-Fa-f]{1,4}){0,5}((\:?)|((\:[0-9A-Fa-f]{1,4}){1,2}))))(%.+)?\\s*/(0|2|4|8|16|32|64|128)$ @@ -322,12 +326,12 @@ redirect_response_code_startwith=30 sample_upload_url_keyword=/av digest_upload_url_keyword=/fileTransfer #样例和摘要文件大小类型设置 -sample_file_type=,mp4,flv,ivf,mp2v,jpg, +sample_file_type=,mp3,mp4,flv,ivf,mp2v,jpg, #10M 10485760 sample_single_file_max_size=10485760 #12M 12582912 sample_total_file_max_size=12582912 -digest_file_type=,txt,doc,img, +digest_file_type=,txt,doc,img,docx,pptx,xlsx,xls,ppt, #10M10485760 digest_single_file_max_size=10485760 #12M12582912 @@ -361,6 +365,6 @@ picture_sample_proc_param_is_translation=false #picture_sample_proc_param_is_translation=true #http自定义域相关参数 http_header_user_region_key=HTTP_HEADER -http_header_dict_module=REQUEST_HEADER_DISTRICT +http_header_dict_module=HTTP_HEADER_DISTRICT #dns自定义域参数key dns_strategy_user_region_key=DNS_STRATEGY \ No newline at end of file diff --git a/src/main/webapp/static/global/css/components.css b/src/main/webapp/static/global/css/components.css index 67d0d96a1..c070f1272 100644 --- a/src/main/webapp/static/global/css/components.css +++ b/src/main/webapp/static/global/css/components.css @@ -22545,6 +22545,7 @@ transition: background-color .1s ease-in-out; border-bottom: 0px; cursor:pointer; display: inline; + width:auto; } .content { width: 80%; From af3171b17b620eabef814aba79959d7ca13eadb3 Mon Sep 17 00:00:00 2001 From: chenjinsong Date: Thu, 12 Jul 2018 15:28:46 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A1.=20=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E6=8A=A5=E8=A1=A8=E7=B1=BB=E5=9E=8B=E5=90=8E=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E6=97=B6=E9=97=B4=E6=B6=88=E5=A4=B1=202.=20=E9=83=A8?= =?UTF-8?q?=E5=88=86=E9=A1=B5=E9=9D=A2=E6=97=B6=E9=97=B4=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=A1=86=E6=B6=88=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/nis/web/controller/BaseController.java | 3 +++ src/main/webapp/WEB-INF/views/report/list.jsp | 18 +++++++----------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/nis/web/controller/BaseController.java b/src/main/java/com/nis/web/controller/BaseController.java index a7913b70d..6287da339 100644 --- a/src/main/java/com/nis/web/controller/BaseController.java +++ b/src/main/java/com/nis/web/controller/BaseController.java @@ -343,6 +343,9 @@ public class BaseController { if (StringUtils.isBlank(report.getReportTime())) { report.setReportTime(DateUtils.formatDate(new Date(), "yyyy-MM-dd")); } + if (report.getReportType() == null) { + report.setReportType(1); + } } protected void initFormCondition(Model model){ List requestInfos=requestInfoService.getValidRequestInfo(); diff --git a/src/main/webapp/WEB-INF/views/report/list.jsp b/src/main/webapp/WEB-INF/views/report/list.jsp index 5ae4ecbcb..87255c12d 100644 --- a/src/main/webapp/WEB-INF/views/report/list.jsp +++ b/src/main/webapp/WEB-INF/views/report/list.jsp @@ -8,9 +8,9 @@ //筛选功能初始化 filterActionInit(); //日期类型初始化 - changeReportType("${bean.reportType}", true); + changeReportType("${bean.reportType}"); $("#reportType").change(function(){ - changeReportType($("#reportType", false).val()); + changeReportType($("#reportType").val()); }); //reset $("#resetBtn").on("click",function(){ @@ -89,29 +89,25 @@ }); }); - function changeReportType(reportType, init) { + function changeReportType(reportType) { $("#intype").remove(); - var reportTime = ""; - if (init) { - reportTime = "${bean.reportTime }"; - } + var reportTime = "${bean.reportTime }"; if(reportType == 1){//需删除元素后重新添加,直接更改onclick会出现缓存问题 $("#reportTypeDiv").append(''); } else if(reportType == 2){ - $("#reportTypeDiv").append(''); + $("#reportTypeDiv").append(''); } else if(reportType == 3){ - $("#reportTypeDiv").append(''); + $("#reportTypeDiv").append(''); } } var ajaxReport=function(url,target){ - var random=new Date().getTime(); loading(''); $.ajax({ type:'post', async:false, cache:false, - url:'${ctx}'+url+"?random="+random,///report/ajaxNtcTagReport + url:'${ctx}'+url,// /report/ajaxNtcTagReport data:{ "action":$('[name="action"]').val(), "reportType":$('[name="reportType"]').val(),