From 2b82aa1fd40584de779f5251a648e0d931e6c05f Mon Sep 17 00:00:00 2001 From: zhangwei Date: Sat, 29 Dec 2018 17:55:35 +0600 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0ip=20payload=E6=97=A5?= =?UTF-8?q?=E5=BF=97=EF=BC=8C=E4=B8=8Eip=20spoofing=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E7=9B=B8=E5=90=8C=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../log/ntc/OpenVpnLogController.java | 29 ++++++++++++++++--- .../resources/messages/message_en.properties | 2 +- .../resources/messages/message_ru.properties | 8 ++--- .../messages/message_zh_CN.properties | 4 +-- .../resources/sql/20181229/add_sys_menu.sql | 8 +++++ src/main/webapp/WEB-INF/tags/sys/delRow.tag | 4 +-- .../views/cfg/intercept/interceptList.jsp | 2 +- .../WEB-INF/views/log/ntc/openVpnList.jsp | 24 ++++++++++++--- 8 files changed, 63 insertions(+), 18 deletions(-) create mode 100644 src/main/resources/sql/20181229/add_sys_menu.sql diff --git a/src/main/java/com/nis/web/controller/log/ntc/OpenVpnLogController.java b/src/main/java/com/nis/web/controller/log/ntc/OpenVpnLogController.java index a8f33f21a..3f0d4d2ad 100644 --- a/src/main/java/com/nis/web/controller/log/ntc/OpenVpnLogController.java +++ b/src/main/java/com/nis/web/controller/log/ntc/OpenVpnLogController.java @@ -25,6 +25,7 @@ import com.nis.domain.FunctionServiceDict; import com.nis.domain.Page; import com.nis.domain.PageLog; import com.nis.domain.SysUser; +import com.nis.domain.log.DkBehaviorLog; import com.nis.domain.log.MmVoipLog; import com.nis.domain.log.NtcCollectRadiusLog; import com.nis.domain.log.NtcOpenVpnLog; @@ -32,6 +33,7 @@ import com.nis.domain.log.NtcOpenVpnLog; import com.nis.domain.maat.LogRecvData; import com.nis.util.Constants; import com.nis.util.DictUtils; +import com.nis.util.StringUtil; import com.nis.util.httpclient.HttpClientUtil; import com.nis.web.controller.BaseController; import com.nis.web.security.UserUtils; @@ -56,14 +58,20 @@ public class OpenVpnLogController extends BaseController{ PageLog page = new PageLog(request, response); Map params=new HashMap<>(); + + List serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId()); + model.addAttribute("serviceList", serviceList); + if(StringUtil.isEmpty(entry.getAction())){ + for(int i=0;i serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId()); - model.addAttribute("serviceList", serviceList); - String url = ""; url = Constants.LOG_BASE_URL+Constants.NTC_OPENVPN_LOG; //url = Constants.LOG_BASE_URL+Constants.NTC_IP_LOG; @@ -104,6 +112,15 @@ public class OpenVpnLogController extends BaseController{ Map noExportMap=new HashMap(); //--------------------------- PageLog page = new PageLog(request, response); + List serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId()); + model.addAttribute("serviceList", serviceList); + if(StringUtil.isEmpty(log.getAction())){ + for(int i=0;i params = new HashMap(); @@ -121,6 +138,10 @@ public class OpenVpnLogController extends BaseController{ Page data = fromJson.getData(); list= data.getList(); } + for (NtcOpenVpnLog l : list) { + l.setFunctionId(log.getFunctionId()); + setLogAction(l, serviceList); + } } titleList.add("spoofing_ip_policy"); classMap.put("spoofing_ip_policy", NtcOpenVpnLog.class); diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties index 92f369ada..b0b58fa79 100644 --- a/src/main/resources/messages/message_en.properties +++ b/src/main/resources/messages/message_en.properties @@ -1355,7 +1355,7 @@ translated_dest_ip=Translated destination address translated_dest_port=Translated destination port show_ips=View all IP show_available_ips=View available IP -radius_log=Radius Identify +radius_log=Radius Log message_type=Code nas_ip=NAS IP Address framed_ip=Framed IP Address diff --git a/src/main/resources/messages/message_ru.properties b/src/main/resources/messages/message_ru.properties index cb611cd04..4d23d483d 100644 --- a/src/main/resources/messages/message_ru.properties +++ b/src/main/resources/messages/message_ru.properties @@ -1359,14 +1359,14 @@ translated_dest_ip=\u041f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u043d\ translated_dest_port=\u041f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u041f\u043e\u0440\u0442 \u041d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f show_ips=\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0412\u0441\u0435 IP show_available_ips=\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0414\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0439 IP -radius_log=Radius \u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c +radius_log=\u0416\u0443\u0440\u043D\u0430\u043B Radius message_type=\u041a\u043e\u0434 nas_ip=NAS IP-\u0430\u0434\u0440\u0435\u0441 framed_ip=Framed IP-\u0430\u0434\u0440\u0435\u0441 log_user_name=\u0418\u043c\u044f \u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f av_tips=\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0430\u0443\u0434\u0438\u043e \u0438 \u0432\u0438\u0434\u0435\u043e \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0445\u0432\u043e\u0441\u0442\u0435 \u0430\u0443\u0434\u0438\u043e \u0438 \u0432\u0438\u0434\u0435\u043e \u0444\u0430\u0439\u043b\u043e\u0432. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0432\u0438\u0434\u0435\u043e \u0441 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435\u043c \u0432\u044b\u0448\u0435 1080P. asn_ip_group_delete=\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f IP \u0432 \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u0435 ASN \u0442\u0430\u043a\u0436\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u0430. -keyword_log_tips=\u041a\u043e\u0433\u0434\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043f\u043b\u043e\u0445\u0438\u043c, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0434\u0435\u0434\u0443\u043f\u043b\u0438\u043a\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0434\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u7395u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 URL\ufffd \u0434\u043b\u044f \u043f\u043e\u0434\u0430\u0432\u0448\u0435\u0433\u043e \u0432\u0435\u0431-\u0441\u0430\u0439\u0442\u0430. +keyword_log_tips=\u041A\u043E\u0433\u0434\u0430 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442 \u0443\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u044F \u043A\u043B\u044E\u0447\u0435\u0432\u044B\u043C\u0438 \u0441\u043B\u043E\u0432\u0430\u043C\u0438 \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043D\u0438\u0446\u044B \u043F\u043B\u043E\u0445\u0438\u043C, \u0441 \u043F\u043E\u043C\u043E\u0449\u044C\u044E \u043E\u0447\u0438\u0441\u0442\u043A\u0438 \u0436\u0443\u0440\u043D\u0430\u043B\u0430 \u0434\u0430\u043D\u043D\u043E\u0439 \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0432\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043F\u043E\u0434\u0430\u0432\u0448\u0438\u0439 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442 \u043D\u0430 \u043A\u043E\u043D\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044E ''\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 URL''. conn_record=\u0417\u0430\u043f\u0438\u0441\u0438 \u041f\u043e\u0434\u043a\u044e\u0447\u0435\u043d\u0438\u0439 bps=Gbps bps_percent=Bps Percent @@ -1416,7 +1416,7 @@ upload_limit_is=The limitation of file uplaod is count=Count do_blacklist=Blacklist Option l3_header_error=Only four attribute values are allowed to be entered at most -IP_HEADER=IP Header +IP_HEADER=IP Headerx ICMP_HEADER=ICMP Header offset_expression=Offset Expression cfg_custom=\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0435 \u0421\u0442\u043e\u043b\u0431\u0446\u044b @@ -1439,4 +1439,4 @@ min_length=Minimum Length length_error=Length Error duplicate=Duplicate print=Print -traffic_connect_log=\u041B\u043E\u0433 \u0422\u0440\u0430\u0444\u0438\u043A\u0430 \ No newline at end of file +traffic_connect_log=\u0416\u0443\u0440\u043D\u0430\u043B \u0422\u0440\u0430\u0444\u0438\u043A\u0430 \ 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 b91733406..cc06f9266 100644 --- a/src/main/resources/messages/message_zh_CN.properties +++ b/src/main/resources/messages/message_zh_CN.properties @@ -1355,7 +1355,7 @@ show_ips=\u67e5\u770b\u6240\u6709IP show_available_ips=\u67e5\u770b\u53ef\u7528IP website_keyword_monit=\u5173\u952e\u5b57\u76d1\u6d4b website_keyword_reject=\u5173\u952e\u5b57\u963b\u65ad -radius_log=Radius \u534f\u8bae +radius_log=Radius \u65E5\u5FD7 message_type=Code nas_ip=NAS IP Address framed_ip=Framed IP Address @@ -1435,4 +1435,4 @@ min_length=\u6700\u5c0f\u957f\u5ea6 length_error=\u957f\u5ea6\u9519\u8bef duplicate=\u91cd\u590d\u7684 print=\u6253\u5370 -traffic_connect_log=\u9646\u826F\u65E5\u5FD7 \ No newline at end of file +traffic_connect_log=\u6D41\u91CF\u65E5\u5FD7 \ No newline at end of file diff --git a/src/main/resources/sql/20181229/add_sys_menu.sql b/src/main/resources/sql/20181229/add_sys_menu.sql new file mode 100644 index 000000000..52957f68f --- /dev/null +++ b/src/main/resources/sql/20181229/add_sys_menu.sql @@ -0,0 +1,8 @@ +-- 新增ip payload日志菜单,以及ip spoofing,ip payload实时统计菜单 +INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('940', '0,1,152,940,', 'ip_payload', 'IP Payload', '64', '/log/ntc/ntcOpenvpnLogs/list', '', '', '1', '', '1', '2018-12-29 14:59:51', '1', '2018-12-29 14:59:51', '', '1', NULL, '0', '0', '212'); +INSERT INTO `sys_menu` (`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ( '943', '0,1,780,943,', 'ip_payload', 'IP Payload', '60', '/report/list?cfgName=ip_payload&reportType=1', '', '', '1', '', '1', '2018-12-29 15:05:12', '1', '2018-12-29 15:05:12', '', '1', NULL, '0', '0', '212'); +INSERT INTO `sys_menu` ( `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ( '943', '0,1,780,943,', 'spoofing_ip_policy', 'IP Spoofing', '90', '/report/list?cfgName=spoofing_ip_policy&reportType=1', '', '', '1', '', '1', '2018-12-29 15:06:02', '1', '2018-12-29 16:02:03', '', '1', NULL, '0', '0', '214'); +-- 新增流量日志菜单,并修改通联关系域radius日志为流量日志下的子菜单 +INSERT INTO `sys_menu` (`id`, `parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES ('1217', '152', '0,1,152,', 'traffic_connect_log', 'Traffic Connect Log', '190', '', '', '', '1', '', '1', '2018-12-29 14:06:08', '1', '2018-12-29 14:06:08', '', '1', NULL, '0', '0', NULL); +UPDATE `sys_menu` SET `id`='1179', `parent_id`='1217', `parent_ids`='0,1,152,1217,', `code`='radius_log', `name`='RADIUS协议日志', `sort`='80', `href`='/log/ntc/radiusLogs', `target`='', `icon`='', `is_show`='1', `permission`='', `create_by`='1', `create_date`='2018-12-12 15:14:37', `update_by`='1', `update_date`='2018-12-29 14:06:33', `remarks`='', `del_flag`='1', `menu_bg`=NULL, `quick_action`='0', `is_top`='0', `function_id`='0' WHERE (`id`='1179'); +UPDATE `sys_menu` SET `id`='1181', `parent_id`='1217', `parent_ids`='0,1,152,1217,', `code`='conn_record', `name`='通联关系', `sort`='110', `href`='/log/ntc/connRecordLogs', `target`='', `icon`='', `is_show`='1', `permission`='', `create_by`='1', `create_date`='2018-12-15 15:47:32', `update_by`='1', `update_date`='2018-12-29 14:06:55', `remarks`='', `del_flag`='1', `menu_bg`=NULL, `quick_action`='0', `is_top`='0', `function_id`=NULL WHERE (`id`='1181'); diff --git a/src/main/webapp/WEB-INF/tags/sys/delRow.tag b/src/main/webapp/WEB-INF/tags/sys/delRow.tag index 0794ba3f4..0592efb96 100644 --- a/src/main/webapp/WEB-INF/tags/sys/delRow.tag +++ b/src/main/webapp/WEB-INF/tags/sys/delRow.tag @@ -114,8 +114,8 @@ function update(url){ top.$.jBox.tip("", ""); return; }else if(cked.val()==3){ - /* top.$.jBox.tip("", ""); - return; */ + top.$.jBox.tip("", ""); + return; } //处理asnIp,asn组下发过的ip配置不允许修改 if(cked.attr("serviceGroupId")&&cked.attr("isValid")){ diff --git a/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp b/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp index 7c1528f54..6dd662f40 100644 --- a/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp @@ -441,7 +441,7 @@ - + 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 3062ac9ac..b82bd83a0 100644 --- a/src/main/webapp/WEB-INF/views/log/ntc/openVpnList.jsp +++ b/src/main/webapp/WEB-INF/views/log/ntc/openVpnList.jsp @@ -58,7 +58,15 @@ $(document).ready(function(){ varStatus="satus"> - + + + + + + + + + @@ -227,9 +235,17 @@ $(document).ready(function(){ ${log.action } - - ${dict.itemValue} - + + + + + + + ${dict.itemValue} + + + +