From 3e97803d9e1ca80e50c5df7637e6b74b904b593d Mon Sep 17 00:00:00 2001 From: zhanghongqing Date: Tue, 7 Aug 2018 11:56:46 +0800 Subject: [PATCH 1/2] =?UTF-8?q?1.=E8=A7=A3=E5=86=B3=E9=83=A8=E5=88=86?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E9=A1=B5=E9=9D=A2=E9=AA=8C=E8=AF=81=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=B9=9F=E5=8F=AF=E6=9F=A5=E8=AF=A2=E9=97=AE=E9=A2=98?= =?UTF-8?q?=202.=E6=A0=87=E9=A2=98=E9=A6=96=E5=AD=97=E6=AF=8Dcss=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E5=A4=A7=E5=86=99=203.=E5=A2=9E=E5=8A=A0=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E6=9F=A5=E8=AF=A2IPv4=E4=B8=8EIPv6=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E5=8F=8A=E6=A0=BC=E5=BC=8F=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/log/manipulation/dkBehaviorList.jsp | 13 ++----------- src/main/webapp/WEB-INF/views/log/ntc/appList.jsp | 13 ++----------- .../webapp/WEB-INF/views/log/ntc/ddosList.jsp | 13 ++----------- src/main/webapp/WEB-INF/views/log/ntc/ftpList.jsp | 13 ++----------- .../webapp/WEB-INF/views/log/ntc/ipsecList.jsp | 15 ++------------- .../webapp/WEB-INF/views/log/ntc/l2tpLogList.jsp | 2 +- .../webapp/WEB-INF/views/log/ntc/mmAvIpList.jsp | 13 ++----------- .../webapp/WEB-INF/views/log/ntc/mmAvUrlList.jsp | 13 ++----------- .../webapp/WEB-INF/views/log/ntc/mmPicIpList.jsp | 13 ++----------- .../webapp/WEB-INF/views/log/ntc/mmPicUrlList.jsp | 13 ++----------- .../views/log/ntc/mmPornAudioSampleList.jsp | 13 ++----------- .../views/log/ntc/mmPornVideoSampleList.jsp | 13 ++----------- .../WEB-INF/views/log/ntc/mmSampleAudioList.jsp | 12 +----------- .../WEB-INF/views/log/ntc/mmSamplePicList.jsp | 13 ++----------- .../WEB-INF/views/log/ntc/mmSampleVideoList.jsp | 13 ++----------- .../WEB-INF/views/log/ntc/mmSampleVoipList.jsp | 13 ++----------- .../WEB-INF/views/log/ntc/mmVoipAccountList.jsp | 13 ++----------- .../webapp/WEB-INF/views/log/ntc/mmVoipIpList.jsp | 13 ++----------- .../webapp/WEB-INF/views/log/ntc/openVpnList.jsp | 13 ++----------- .../webapp/WEB-INF/views/log/ntc/pptpLogList.jsp | 2 +- src/main/webapp/WEB-INF/views/log/ntc/sshList.jsp | 13 ++----------- .../webapp/WEB-INF/views/log/ntc/sslLogList.jsp | 2 +- .../1.11.0/jquery.validate.method.js | 5 +++++ .../1.11.0/localization/messages_en.js | 1 + .../1.11.0/localization/messages_ru.js | 5 +++-- .../1.11.0/localization/messages_zh.js | 1 + src/main/webapp/static/global/scripts/common.js | 13 +++++++++++++ src/main/webapp/static/pages/css/pageLogs.css | 6 +++++- 28 files changed, 68 insertions(+), 217 deletions(-) diff --git a/src/main/webapp/WEB-INF/views/log/manipulation/dkBehaviorList.jsp b/src/main/webapp/WEB-INF/views/log/manipulation/dkBehaviorList.jsp index 6680f57ed..7165ae49f 100644 --- a/src/main/webapp/WEB-INF/views/log/manipulation/dkBehaviorList.jsp +++ b/src/main/webapp/WEB-INF/views/log/manipulation/dkBehaviorList.jsp @@ -22,16 +22,7 @@ $(document).ready(function(){ }); }); -//查询 - function page(n,s){ - $("#intype").attr("name",$("#seltype").val()); - $("#pageNo").val(n); - $("#pageSize").val(s); - $("#searchForm").attr("action","${ctx}/log/manipulation/dkbehaviorLogs"); - $("#searchForm").submit(); - loading(); - return false; -} + @@ -86,7 +77,7 @@ $(document).ready(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/appList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/appList.jsp index e7004c5a6..0b4103c27 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/appList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/appList.jsp @@ -22,16 +22,7 @@ $(document).ready(function(){ }); }); -//查询 - function page(n,s){ - $("#intype").attr("name",$("#seltype").val()); - $("#pageNo").val(n); - $("#pageSize").val(s); - $("#searchForm").attr("action","${ctx}/log/ntc/ntcAppLogs"); - $("#searchForm").submit(); - loading(); - return false; -} + @@ -89,7 +80,7 @@ $(document).ready(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/ddosList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/ddosList.jsp index f5326804b..4bbcbda6a 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/ddosList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/ddosList.jsp @@ -22,16 +22,7 @@ $(document).ready(function(){ }); }); -//查询 - function page(n,s){ - $("#intype").attr("name",$("#seltype").val()); - $("#pageNo").val(n); - $("#pageSize").val(s); - $("#searchForm").attr("action","${ctx}/log/ntc/ntcDdosLogs"); - $("#searchForm").submit(); - loading(); - return false; -} + @@ -79,7 +70,7 @@ $(document).ready(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/ftpList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/ftpList.jsp index cc47256ba..e92d98731 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/ftpList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/ftpList.jsp @@ -22,16 +22,7 @@ $(document).ready(function(){ }); }); -//查询 - function page(n,s){ - $("#intype").attr("name",$("#seltype").val()); - $("#pageNo").val(n); - $("#pageSize").val(s); - $("#searchForm").attr("action","${ctx}/log/ntc/NtcFtpLogs"); - $("#searchForm").submit(); - loading(); - return false; -} + @@ -89,7 +80,7 @@ $(document).ready(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/ipsecList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/ipsecList.jsp index 311ddd2e1..043108dcf 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/ipsecList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/ipsecList.jsp @@ -20,19 +20,8 @@ $(document).ready(function(){ .attr("value",''); $("#searchForm")[0].reset(); }); - var a='${log.functionId}'; - console.log(a) }); -//查询 - function page(n,s){ - $("#intype").attr("name",$("#seltype").val()); - $("#pageNo").val(n); - $("#pageSize").val(s); - $("#searchForm").attr("action","${ctx}/log/ntc/ntcIpsecLogs"); - $("#searchForm").submit(); - loading(); - return false; -} + @@ -80,7 +69,7 @@ $(document).ready(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/l2tpLogList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/l2tpLogList.jsp index b890e0d6a..5df1c25b0 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/l2tpLogList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/l2tpLogList.jsp @@ -78,7 +78,7 @@
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmAvIpList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmAvIpList.jsp index b57de7520..5261e5792 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmAvIpList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmAvIpList.jsp @@ -22,16 +22,7 @@ $(document).ready(function(){ }); }); -//查询 - function page(n,s){ - $("#intype").attr("name",$("#seltype").val()); - $("#pageNo").val(n); - $("#pageSize").val(s); - $("#searchForm").attr("action","${ctx}/log/ntc/mmAvIpLogs"); - $("#searchForm").submit(); - loading(); - return false; -} + @@ -89,7 +80,7 @@ $(document).ready(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmAvUrlList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmAvUrlList.jsp index 59686c304..a0ef95dce 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmAvUrlList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmAvUrlList.jsp @@ -22,16 +22,7 @@ $(document).ready(function(){ }); }); -//查询 - function page(n,s){ - $("#intype").attr("name",$("#seltype").val()); - $("#pageNo").val(n); - $("#pageSize").val(s); - $("#searchForm").attr("action","${ctx}/log/ntc/mmAvUrlLogs"); - $("#searchForm").submit(); - loading(); - return false; -} + @@ -89,7 +80,7 @@ $(document).ready(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmPicIpList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmPicIpList.jsp index 3b3bca480..4e31d568a 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmPicIpList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmPicIpList.jsp @@ -22,16 +22,7 @@ $(document).ready(function(){ }); }); -//查询 - function page(n,s){ - $("#intype").attr("name",$("#seltype").val()); - $("#pageNo").val(n); - $("#pageSize").val(s); - $("#searchForm").attr("action","${ctx}/log/ntc/mmPicIpLogs"); - $("#searchForm").submit(); - loading(); - return false; -} + @@ -89,7 +80,7 @@ $(document).ready(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmPicUrlList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmPicUrlList.jsp index 252fb004d..c1277c01f 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmPicUrlList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmPicUrlList.jsp @@ -22,16 +22,7 @@ $(document).ready(function(){ }); }); -//查询 - function page(n,s){ - $("#intype").attr("name",$("#seltype").val()); - $("#pageNo").val(n); - $("#pageSize").val(s); - $("#searchForm").attr("action","${ctx}/log/ntc/mmPicUrlLogs"); - $("#searchForm").submit(); - loading(); - return false; -} + @@ -89,7 +80,7 @@ $(document).ready(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmPornAudioSampleList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmPornAudioSampleList.jsp index 21fb1ea52..c6aea6516 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmPornAudioSampleList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmPornAudioSampleList.jsp @@ -22,16 +22,7 @@ $(document).ready(function(){ }); }); -//查询 - function page(n,s){ - $("#intype").attr("name",$("#seltype").val()); - $("#pageNo").val(n); - $("#pageSize").val(s); - $("#searchForm").attr("action","${ctx}/log/ntc/mmSampleAudioLevelLogs"); - $("#searchForm").submit(); - loading(); - return false; -} + @@ -89,7 +80,7 @@ $(document).ready(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmPornVideoSampleList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmPornVideoSampleList.jsp index 7d8a00874..f17131eba 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmPornVideoSampleList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmPornVideoSampleList.jsp @@ -22,16 +22,7 @@ $(document).ready(function(){ }); }); -//查询 - function page(n,s){ - $("#intype").attr("name",$("#seltype").val()); - $("#pageNo").val(n); - $("#pageSize").val(s); - $("#searchForm").attr("action","${ctx}/log/ntc/mmSampleVideoLevelLogs"); - $("#searchForm").submit(); - loading(); - return false; -} + @@ -89,7 +80,7 @@ $(document).ready(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmSampleAudioList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmSampleAudioList.jsp index 03835a168..c9ff007af 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmSampleAudioList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmSampleAudioList.jsp @@ -31,16 +31,6 @@ }); }); - //查询 - function page(n, s) { - $("#intype").attr("name", $("#seltype").val()); - $("#pageNo").val(n); - $("#pageSize").val(s); - $("#searchForm").attr("action", "${ctx}/log/ntc/mmSampleAudioLogs"); - $("#searchForm").submit(); - loading(); - return false; - } @@ -113,7 +103,7 @@
- diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmSamplePicList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmSamplePicList.jsp index 7b79f40dd..807d764e3 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmSamplePicList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmSamplePicList.jsp @@ -22,16 +22,7 @@ $(document).ready(function(){ }); }); -//查询 - function page(n,s){ - $("#intype").attr("name",$("#seltype").val()); - $("#pageNo").val(n); - $("#pageSize").val(s); - $("#searchForm").attr("action","${ctx}/log/ntc/mmSamplePicLogs"); - $("#searchForm").submit(); - loading(); - return false; -} + @@ -89,7 +80,7 @@ $(document).ready(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmSampleVideoList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmSampleVideoList.jsp index 50809b592..f53cdbcc3 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmSampleVideoList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmSampleVideoList.jsp @@ -22,16 +22,7 @@ $(document).ready(function(){ }); }); -//查询 - function page(n,s){ - $("#intype").attr("name",$("#seltype").val()); - $("#pageNo").val(n); - $("#pageSize").val(s); - $("#searchForm").attr("action","${ctx}/log/ntc/mmSampleVideoLogs"); - $("#searchForm").submit(); - loading(); - return false; -} + @@ -89,7 +80,7 @@ $(document).ready(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmSampleVoipList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmSampleVoipList.jsp index 98038d70f..c23e271c4 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmSampleVoipList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmSampleVoipList.jsp @@ -22,16 +22,7 @@ $(document).ready(function(){ }); }); -//查询 - function page(n,s){ - $("#intype").attr("name",$("#seltype").val()); - $("#pageNo").val(n); - $("#pageSize").val(s); - $("#searchForm").attr("action","${ctx}/log/ntc/mmSampleVoipLogs"); - $("#searchForm").submit(); - loading(); - return false; -} + @@ -89,7 +80,7 @@ $(document).ready(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmVoipAccountList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmVoipAccountList.jsp index 459dc3646..d7b9530e1 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmVoipAccountList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmVoipAccountList.jsp @@ -22,16 +22,7 @@ $(document).ready(function(){ }); }); -//查询 - function page(n,s){ - $("#intype").attr("name",$("#seltype").val()); - $("#pageNo").val(n); - $("#pageSize").val(s); - $("#searchForm").attr("action","${ctx}/log/ntc/mmAvVoipAccountLogs"); - $("#searchForm").submit(); - loading(); - return false; -} + @@ -89,7 +80,7 @@ $(document).ready(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/mmVoipIpList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/mmVoipIpList.jsp index 1e5440157..1130927a2 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/mmVoipIpList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/mmVoipIpList.jsp @@ -22,16 +22,7 @@ $(document).ready(function(){ }); }); -//查询 - function page(n,s){ - $("#intype").attr("name",$("#seltype").val()); - $("#pageNo").val(n); - $("#pageSize").val(s); - $("#searchForm").attr("action","${ctx}/log/ntc/mmVoipIpLogs"); - $("#searchForm").submit(); - loading(); - return false; -} + @@ -89,7 +80,7 @@ $(document).ready(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/openVpnList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/openVpnList.jsp index 13d563476..21b13db55 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/openVpnList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/openVpnList.jsp @@ -22,16 +22,7 @@ $(document).ready(function(){ }); }); -//查询 - function page(n,s){ - $("#intype").attr("name",$("#seltype").val()); - $("#pageNo").val(n); - $("#pageSize").val(s); - $("#searchForm").attr("action","${ctx}/log/ntc/ntcOpenvpnLogs"); - $("#searchForm").submit(); - loading(); - return false; -} + @@ -89,7 +80,7 @@ $(document).ready(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/pptpLogList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/pptpLogList.jsp index 4b2fde596..a693faa37 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/pptpLogList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/pptpLogList.jsp @@ -78,7 +78,7 @@
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/sshList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/sshList.jsp index c34c95146..bbf4d71af 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/sshList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/sshList.jsp @@ -22,16 +22,7 @@ $(document).ready(function(){ }); }); -//查询 - function page(n,s){ - $("#intype").attr("name",$("#seltype").val()); - $("#pageNo").val(n); - $("#pageSize").val(s); - $("#searchForm").attr("action","${ctx}/log/ntc/ntcSshLogs"); - $("#searchForm").submit(); - loading(); - return false; -} + @@ -89,7 +80,7 @@ $(document).ready(function(){
- +
diff --git a/src/main/webapp/WEB-INF/views/log/ntc/sslLogList.jsp b/src/main/webapp/WEB-INF/views/log/ntc/sslLogList.jsp index ff8fae1b0..71abdf143 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/sslLogList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/sslLogList.jsp @@ -87,7 +87,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 861d26785..9cd676f6b 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 @@ -28,6 +28,11 @@ jQuery.validator.addMethod("ip", function(value, element) { return this.optional(element) || (/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.test(value) && (RegExp.$1 <256 && RegExp.$2<256 && RegExp.$3<256 && RegExp.$4<256)); }, "请输入合法的IP地址"); +//IPv4 IPv6 +jQuery.validator.addMethod("ipv4v6", function(value, element) { + return this.optional(element) || (/^(\d+)\.(\d+)\.(\d+)\.(\d+)$/.test(value) && (RegExp.$1 <256 && RegExp.$2<256 && RegExp.$3<256 && RegExp.$4<256))||/^\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*$/.test(value); +}, "请输入合法的IP地址如IPv4 0.0.0.0或IPv6 ::"); + jQuery.validator.addMethod("abc",function(value, element) { return this.optional(element) || /^[a-zA-Z0-9_]*$/.test(value); },"请输入字母数字或下划线"); 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 d1929e3db..a1032db3b 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 @@ -51,6 +51,7 @@ ipv6: "ipv6", over6: "4over6", over4: "6over4", + ipv4v6:"Please enter a correct IPv4(0.0.0.0) or IPv6(::)", all: "all", ip_subnet: "Subnet", ip_range: "ip Range", 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 2d3fdd8cd..cb9e55d16 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 @@ -45,10 +45,11 @@ isp: "isp", close_info: "close", client_ip: "client ip", - ipv4: "ipv4", - ipv6: "ipv6", + ipv4: "IPv4", + ipv6: "IPv6", over6: "4over6", over4: "6over4", + ipv4v6:"IPv4(0.0.0.0) or IPv6(::)", all: "all", ip_subnet: "Subnet", ip_range: "ip Range", 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 18857583a..03467cb14 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 @@ -52,6 +52,7 @@ ipv6: "ipv6", over6: "4over6", over4: "6over4", + ipv4v6:"请输入合法的IP地址如IPv4(0.0.0.0)或IPv6(::)", all: "全部", ip_subnet: "Subnet", ip_subnet: "Subnet", diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index 88107c572..edc661290 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -380,6 +380,15 @@ $(function(){ }, "doendDate": { compareDate: "[name=dobeginDate]" + }, + "capIp":{ + ipv4v6:true + }, + "sIp":{ + ipv4v6:true + }, + "dIp":{ + ipv4v6:true } }, submitHandler: function(form){ @@ -389,6 +398,10 @@ $(function(){ }); }); window.onload=function(){ + //日志查询IP类型增加格式提示 + $("#searchForm [name='capIp']").attr("placeholder","IPv4 0.0.0.0 or IPv6 ::"); + $("#searchForm [name='sIp']").attr("placeholder","IPv4 0.0.0.0 or IPv6 ::"); + $("#searchForm [name='dIp']").attr("placeholder","IPv4 0.0.0.0 or IPv6 ::"); // 动态调整日志页搜索框的样式,防止validate的错误提示导致样式错乱 var igHeight = $("#searchForm").find(".col-md-12").find(".pull-left").find(".input-group").height(); $("#searchForm").find(".col-md-12").find(".pull-left").find(".input-group").bind("DOMNodeInserted",function(e) { diff --git a/src/main/webapp/static/pages/css/pageLogs.css b/src/main/webapp/static/pages/css/pageLogs.css index 1eb6d7ab7..620c5c473 100644 --- a/src/main/webapp/static/pages/css/pageLogs.css +++ b/src/main/webapp/static/pages/css/pageLogs.css @@ -13,4 +13,8 @@ table.logTb td { -khtml-text-overflow: ellipsis; -moz-text-overflow: ellipsis; -webkit-text-overflow: ellipsis; -} \ No newline at end of file +} +/*列表标题首字母大写 */ +table thead tr th{ + text-transform: capitalize; +} \ No newline at end of file From 91f0ede041d3d45d8c38c81bc62f594b700eada8 Mon Sep 17 00:00:00 2001 From: wangxin Date: Tue, 7 Aug 2018 13:05:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?(1)=E5=9F=9F=E5=90=8D=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=8A=B6=E6=80=81=E4=B8=80=E5=88=97=E6=9B=BF?= =?UTF-8?q?=E6=8D=A2=E4=B8=BA=E7=B3=BB=E7=BB=9F=E5=AD=97=E5=85=B8=20(2)ip?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=B0=E5=A2=9E/=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=97=B6cfg=5Fregion=5Fcode,cfg=5Ftype=E4=B8=A4=E4=B8=AA?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E7=9A=84=E5=80=BC=E4=BF=AE=E5=A4=8D=20(3)ip?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E4=B8=8D=E5=86=8D=E8=B0=83=E7=94=A8maat=5Fse?= =?UTF-8?q?rvice=E5=AD=97=E5=85=B8,=E6=94=B9=E4=B8=BA=E6=A0=B9=E6=8D=AE?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E7=9A=84cfg=5Ftype=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E7=BB=93=E5=90=88function=5Fregion=5Fdict=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E7=9A=84is=5Fmaat=E5=AD=97=E6=AE=B5=E5=88=A4=E6=96=AD=E4=B8=8B?= =?UTF-8?q?=E5=8F=91=E6=96=B9=E5=BC=8F=E3=80=82maat=5Fservice=E5=AD=97?= =?UTF-8?q?=E5=85=B8=E5=8F=AA=E6=9C=89ip=E5=AF=BC=E5=85=A5=E6=97=B6?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/configuration/IpCfgService.java | 48 ++++++++++++++----- .../resources/messages/message_en.properties | 3 +- .../resources/messages/message_ru.properties | 3 +- .../messages/message_zh_CN.properties | 3 +- .../WEB-INF/views/cfg/common/domainList.jsp | 19 ++++---- .../WEB-INF/views/cfg/common/ipForm.jsp | 4 +- .../WEB-INF/views/cfg/ipaddr/ipForm.jsp | 6 +-- .../webapp/WEB-INF/views/cfg/ipsec/ipForm.jsp | 6 +-- .../views/cfg/whitelist/domainList.jsp | 19 ++++---- 9 files changed, 64 insertions(+), 47 deletions(-) diff --git a/src/main/java/com/nis/web/service/configuration/IpCfgService.java b/src/main/java/com/nis/web/service/configuration/IpCfgService.java index e41e94697..734a653f9 100644 --- a/src/main/java/com/nis/web/service/configuration/IpCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/IpCfgService.java @@ -4,15 +4,16 @@ import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Map; +import java.util.Properties; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.nis.domain.FunctionRegionDict; -import com.nis.domain.SysDataDictionaryItem; import com.nis.domain.callback.InlineIp; import com.nis.domain.configuration.AreaIpCfg; import com.nis.domain.configuration.BaseIpCfg; @@ -27,6 +28,7 @@ import com.nis.domain.maat.ToMaatBean; import com.nis.domain.maat.ToMaatResult; import com.nis.exceptions.MaatConvertException; import com.nis.util.ConfigServiceUtil; +import com.nis.util.Configurations; import com.nis.util.Constants; import com.nis.util.DictUtils; import com.nis.util.StringUtil; @@ -161,20 +163,16 @@ public class IpCfgService extends CrudService { List dictList = DictUtils.getFunctionRegionDictList(cfg.getFunctionId()); int maatType=0; //判断下发类型是走maat还是callback - - List maatServiceList = DictUtils.getDictList("MAAT_SERVICE"); - for(SysDataDictionaryItem maatService:maatServiceList){ - if(Integer.parseInt(maatService.getItemCode())==cfg.getServiceId().intValue()){ - for(FunctionRegionDict f:dictList){ - if(maatService.getItemValue().equals(f.getConfigRegionValue())){ - maatType=f.getIsMaat(); - break; - } + String regionValue=cfg.getCfgType(); + if(regionValue!=null) { + for(FunctionRegionDict region:dictList) { + if(regionValue.equals(region.getConfigRegionValue())) { + maatType=region.getIsMaat(); + break; } - break; } } - + Properties props=this.getMsgProp(); if(cfg.getIsAudit()==Constants.AUDIT_YES){ if(maatType==Constants.CALLBACK_TYPE){ List ipList=new ArrayList<>(); @@ -251,6 +249,8 @@ public class IpCfgService extends CrudService { logger.error("IP配置配置下发失败",e); throw e; } + }else { + throw new MaatConvertException(":"+props.getProperty("unknown_cfg_type")); } }else if(cfg.getIsAudit()==Constants.AUDIT_NOT_YES){ if(maatType==Constants.CALLBACK_TYPE){ @@ -291,6 +291,8 @@ public class IpCfgService extends CrudService { logger.info("IP管控取消配置失败"); throw e; } + }else { + throw new MaatConvertException(":"+props.getProperty("unknown_cfg_type")); } } } @@ -483,4 +485,26 @@ public class IpCfgService extends CrudService { // TODO Auto-generated method stub return ipCfgDao.getListByCfgIdWithName(tablename,functionId,ids); } + /** + * 获取国际化配置文件 + * @return + */ + public Properties getMsgProp(){ + Properties msgProp = new Properties(); + try { + String language = LocaleContextHolder.getLocale().getLanguage(); + if(language.equals("zh_cn")||language.equals("zh")){ + msgProp.load(Configurations.class.getResourceAsStream("/messages/message_zh_CN.properties")); + }else if(language.equals("ru")){ + msgProp.load(Configurations.class.getResourceAsStream("/messages/message_ru.properties")); + }else{ + msgProp.load(Configurations.class.getResourceAsStream("/messages/message_en.properties")); + } + + } catch (Exception e) { + msgProp = null; + logger.error("未知i18n消息配置文件,请确定文件是否存在!",e); + } + return msgProp; + } } diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index 38ab64b37..c8fbc0a8f 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -1056,4 +1056,5 @@ Maintenance=Advanced Proxy=Proxy selective=Selective ip_protocol=IP Protocol -max_shouldnot_less_than_min=The max item should not be less than the min item. \ No newline at end of file +max_shouldnot_less_than_min=The max item should not be less than the min item. +unknown_cfg_type=Unknown configuration type. \ 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 0cd1cce84..43a772f3f 100644 --- a/src/main/resources/messages/message_ru.properties +++ b/src/main/resources/messages/message_ru.properties @@ -860,4 +860,5 @@ isp_report=Isp Report show_more=Show More ratelimit_limit=Limit Rate must between 0 and 100 -max_shouldnot_less_than_min=The max item should not be less than the min item. \ No newline at end of file +max_shouldnot_less_than_min=The max item should not be less than the min item. +unknown_cfg_type=Unknown configuration type. \ 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 03d12d604..3546f45dc 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -1049,4 +1049,5 @@ traffic_website_type_chart=\u7F51\u7AD9\u5206\u7C7B\u6D41\u91CF\u7EDF\u8BA1\u56F website=\u7F51\u7AD9\u540D\u79F0 #===============dashboard end=================================== ratelimit_limit=\u9650\u901F\u6BD4\u4F8B\u5FC5\u987B\u4ECB\u4E8E0\u5230100\#\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=dashboard end\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\=\= -max_shouldnot_less_than_min=\u6700\u5927\u9879\u4E0D\u80FD\u5C0F\u4E8E\u6700\u5C0F\u9879 \ No newline at end of file +max_shouldnot_less_than_min=\u6700\u5927\u9879\u4E0D\u80FD\u5C0F\u4E8E\u6700\u5C0F\u9879 +unknown_cfg_type=\u672A\u77E5\u7684\u914D\u7F6E\u7C7B\u578B \ No newline at end of file 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 f51f4f028..795b96f19 100644 --- a/src/main/webapp/WEB-INF/views/cfg/common/domainList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/common/domainList.jsp @@ -88,10 +88,9 @@
- - - - + + +
@@ -402,12 +401,12 @@ - - - - - - + + + + + + ${cfg.creatorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/common/ipForm.jsp b/src/main/webapp/WEB-INF/views/cfg/common/ipForm.jsp index 4b271edf8..05bea4afc 100644 --- a/src/main/webapp/WEB-INF/views/cfg/common/ipForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/common/ipForm.jsp @@ -51,7 +51,7 @@ $(function(){ $(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error); }, submitHandler: function(form){ - if($("#dnsStrategyId")){ + if($("#dnsStrategyId")&&$("#dnsStrategyId").val()){ $("#cfgRegionCode").val($("#cfgRegionCodeMaat").val()); $("#cfgType").val($("#cfgTypeMaat").val()); } @@ -106,7 +106,7 @@ $(function(){ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipForm.jsp b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipForm.jsp index 470ef78d6..daee16f48 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipForm.jsp @@ -62,10 +62,6 @@ $(function(){ $(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error); }, submitHandler: function(form){ - if($("#dnsStrategyId")){ - $("#cfgRegionCode").val($("#cfgRegionCodeMaat").val()); - $("#cfgType").val($("#cfgTypeMaat").val()); - } loading(''); form.submit(); }, @@ -117,7 +113,7 @@ $(function(){ - + diff --git a/src/main/webapp/WEB-INF/views/cfg/ipsec/ipForm.jsp b/src/main/webapp/WEB-INF/views/cfg/ipsec/ipForm.jsp index 5e121147a..3b86fa109 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipsec/ipForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipsec/ipForm.jsp @@ -55,10 +55,6 @@ $(function(){ $(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error); }, submitHandler: function(form){ - if($("#dnsStrategyId")){ - $("#cfgRegionCode").val($("#cfgRegionCodeMaat").val()); - $("#cfgType").val($("#cfgTypeMaat").val()); - } loading(''); form.submit(); }, @@ -111,7 +107,7 @@ $(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 72620c50f..889efea30 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp @@ -71,10 +71,9 @@
- - - - + + +
@@ -217,12 +216,12 @@ - - - - - - + + + + + + ${cfg.creatorName }