From 11a795687982d0cda8a27421c67973a7ee3384d9 Mon Sep 17 00:00:00 2001 From: wangxin Date: Fri, 29 Jun 2018 14:06:02 +0800 Subject: [PATCH] =?UTF-8?q?=EF=BC=881=EF=BC=89=E5=9F=9F=E5=90=8D=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2keyword=E5=AD=97=E6=AE=B5=E8=AF=B4=E6=98=8E=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E5=9F=9F=E5=90=8D=20=EF=BC=882=EF=BC=89=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E5=9F=9F=E5=90=8D=E9=AA=8C=E8=AF=81=E6=96=B9=E6=B3=95?= =?UTF-8?q?domainCheck=EF=BC=8C=E7=9B=AE=E5=89=8D=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=AF=B9=E7=8E=B0=E5=9C=A8=E5=B7=B2=E7=BB=8F=E5=AD=98=E5=9C=A8?= =?UTF-8?q?=E7=9A=84=E9=A1=B6=E7=BA=A7=E5=9F=9F=E5=90=8D=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=EF=BC=8C=E4=B8=BB=E8=A6=81=E6=98=AF=E9=A1=B6?= =?UTF-8?q?=E7=BA=A7=E5=9F=9F=E5=90=8D=E8=BE=83=E5=A4=9A=EF=BC=8C=E6=9E=9A?= =?UTF-8?q?=E4=B8=BE=E8=B5=B7=E6=9D=A5=E5=9B=B0=E9=9A=BE=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nis/web/controller/configuration/AppCfgController.java | 1 - src/main/resources/messages/message_en.properties | 1 + src/main/resources/messages/message_ru.properties | 1 + src/main/resources/messages/message_zh_CN.properties | 1 + src/main/webapp/WEB-INF/views/cfg/common/domainForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/common/domainList.jsp | 2 +- src/main/webapp/WEB-INF/views/cfg/whitelist/domainForm.jsp | 4 ++-- src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp | 2 +- .../jquery-validation/1.11.0/jquery.validate.method.js | 7 +++++++ .../jquery-validation/1.11.0/localization/messages_en.js | 3 ++- .../jquery-validation/1.11.0/localization/messages_ru.js | 3 ++- .../jquery-validation/1.11.0/localization/messages_zh.js | 3 ++- 12 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/nis/web/controller/configuration/AppCfgController.java b/src/main/java/com/nis/web/controller/configuration/AppCfgController.java index 8745b5e60..f20367bf1 100644 --- a/src/main/java/com/nis/web/controller/configuration/AppCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/AppCfgController.java @@ -21,7 +21,6 @@ import com.nis.domain.configuration.AppIpCfg; import com.nis.domain.configuration.AppPolicyCfg; import com.nis.domain.specific.SpecificServiceCfg; import com.nis.exceptions.MaatConvertException; -import com.nis.util.Constants; import com.nis.web.controller.BaseController; import com.nis.web.security.UserUtils; diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index a18f828ed..02b77b9cb 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -279,6 +279,7 @@ monitor_white_list=monitor white list block_monitor_white_list=block monitor white list grey_list=grey list type=type +domain_name=domain name single_domain=single domain multi_domain=multi domain special_service=special service diff --git a/src/main/resources/messages/message_ru.properties b/src/main/resources/messages/message_ru.properties index c0103a587..86ef5ac14 100644 --- a/src/main/resources/messages/message_ru.properties +++ b/src/main/resources/messages/message_ru.properties @@ -266,6 +266,7 @@ monitor_white_list=monitor white list block_monitor_white_list=block monitor white list grey_list=grey list type=type +domain_name=domain name single_domain=single domain multi_domain=multi domain special_service=special service diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties index 35edc33ef..fa34c8019 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -277,6 +277,7 @@ monitor_white_list=\u76D1\u6D4B\u767D\u540D\u5355 block_monitor_white_list=\u5C01\u5835\u76D1\u6D4B\u767D\u540D\u5355 grey_list=\u7070\u540D\u5355 type=\u7C7B\u578B +domain_name=\u57DF\u540D single_domain=\u5355\u57DF multi_domain=\u591A\u57DF special_service=\u7279\u5B9A\u670D\u52A1 diff --git a/src/main/webapp/WEB-INF/views/cfg/common/domainForm.jsp b/src/main/webapp/WEB-INF/views/cfg/common/domainForm.jsp index 614e3be88..040acd3ea 100644 --- a/src/main/webapp/WEB-INF/views/cfg/common/domainForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/common/domainForm.jsp @@ -153,9 +153,9 @@
- +
- +
diff --git a/src/main/webapp/WEB-INF/views/cfg/common/domainList.jsp b/src/main/webapp/WEB-INF/views/cfg/common/domainList.jsp index 4b7eb9eb3..92dff7c9b 100644 --- a/src/main/webapp/WEB-INF/views/cfg/common/domainList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/common/domainList.jsp @@ -203,7 +203,7 @@ <%-- --%> - + diff --git a/src/main/webapp/WEB-INF/views/cfg/whitelist/domainForm.jsp b/src/main/webapp/WEB-INF/views/cfg/whitelist/domainForm.jsp index d4942ba4b..0003d485e 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/domainForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/domainForm.jsp @@ -124,9 +124,9 @@ $(function(){
- +
- +
diff --git a/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp b/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp index a5907e0f2..dec2d28d9 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp @@ -199,7 +199,7 @@ <%-- --%> - + diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js index 41f21ed3d..a28c93092 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/jquery.validate.method.js @@ -165,6 +165,13 @@ jQuery.validator.addMethod("notStartZero",function(value, element) { } return true; }, "请填写正确的数值"); +jQuery.validator.addMethod("domainCheck",function(value, element) { + var regexp=/^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$/; + if(this.optional(element)||regexp.test(value)){ + return true; + } + return false; +}); //ip地址校验 jQuery.validator.addMethod("ipCheck",function(value, element) { diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js index 40e8b2f72..0c0e53c14 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_en.js @@ -49,6 +49,7 @@ ip_subnet: "Subnet", ip_range: "ip Range", timeout:"timeout", - areaIpPrefix:"Forbiden value: " + areaIpPrefix:"Forbiden value: ", + domainCheck:"Please enter a valid domain." }); }(jQuery)); diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js index ca9e1b322..d59ae753a 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_ru.js @@ -47,6 +47,7 @@ ip_subnet: "Subnet", ip_range: "ip Range", timeout:"timeout", - areaIpPrefix:"Forbiden value: " + areaIpPrefix:"Forbiden value: ", + domainCheck:"Please enter a valid domain." }); }(jQuery)); \ No newline at end of file diff --git a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js index 36ee971fa..3df7651fc 100644 --- a/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js +++ b/src/main/webapp/static/global/plugins/jquery-validation/1.11.0/localization/messages_zh.js @@ -51,6 +51,7 @@ ip_subnet: "Subnet", ip_range: "ip Range", timeout:"超时", - areaIpPrefix:"禁止使用的值: " + areaIpPrefix:"禁止使用的值: ", + domainCheck:"请输入有效的域名" }); }(jQuery));