diff --git a/src/main/java/com/nis/domain/configuration/AppPolicyCfg.java b/src/main/java/com/nis/domain/configuration/AppPolicyCfg.java index ea261c737..c18a26ce0 100644 --- a/src/main/java/com/nis/domain/configuration/AppPolicyCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppPolicyCfg.java @@ -109,7 +109,7 @@ public class AppPolicyCfg extends BaseCfg { @SerializedName("isHexbin") private Integer isHexbin; - @ExcelField(title="log_total",sort=31) + @ExcelField(title="log_total",sort=43) private Long totalLogs; private List ipPortList; diff --git a/src/main/java/com/nis/domain/configuration/BaseCfg.java b/src/main/java/com/nis/domain/configuration/BaseCfg.java index eda499889..14814c0c8 100644 --- a/src/main/java/com/nis/domain/configuration/BaseCfg.java +++ b/src/main/java/com/nis/domain/configuration/BaseCfg.java @@ -199,17 +199,17 @@ public class BaseCfg extends BaseEntity implements Cloneable{ /** * 来函 */ - @ExcelField(title="letter",sort=58) + @ExcelField(title="letter",sort=60) protected String requestName; /** * 是否区域gk */ - @ExcelField(title="whether_area_block",dictType="WHETHER_AREA_BLOCK",sort=40) + @ExcelField(title="whether_area_block",dictType="WHETHER_AREA_BLOCK",sort=45) protected Integer isAreaEffective; /** * 分类 */ - @ExcelField(title="classification",dictType="type",sort=60) + @ExcelField(title="classification",dictType="type",sort=62) protected String classify; /** * 性质 @@ -270,9 +270,9 @@ public class BaseCfg extends BaseEntity implements Cloneable{ /** * do_log属性在界面(do_log:0不需要1记录所有日志2只记录结构化日志。默认是2) */ - @ExcelField(title="do_log",dictType="DO_LOG",sort=30) + @ExcelField(title="do_log",dictType="DO_LOG",sort=40) protected Integer doLog = Constants.MAAT_CFG_DOLOG_DEFAULT; - @ExcelField(title="do_blacklist",dictType="DO_BLACKLIST",sort=31) + @ExcelField(title="do_blacklist",dictType="DO_BLACKLIST",sort=41) protected Integer doBlackList=Constants.MAAT_CFG_DOLOG_DOBLACKLIST_DEFAULT; protected Integer groupId;//仅用于copy属性使用 protected Integer regionId;//仅用于copy属性使用 diff --git a/src/main/java/com/nis/domain/configuration/BaseIpCfg.java b/src/main/java/com/nis/domain/configuration/BaseIpCfg.java index 1f9c56baf..1d543f06b 100644 --- a/src/main/java/com/nis/domain/configuration/BaseIpCfg.java +++ b/src/main/java/com/nis/domain/configuration/BaseIpCfg.java @@ -43,24 +43,24 @@ public class BaseIpCfg extends BaseCfg { */ @Expose @SerializedName("ipType") - @ExcelField(title="ip_type",dictType="IP_TYPE",sort=44) + @ExcelField(title="ip_type",dictType="IP_TYPE",sort=50) protected Integer ipType; - @ExcelField(title="ip_pattern",dictType="IP_PATTERN",sort=45) + @ExcelField(title="ip_pattern",dictType="IP_PATTERN",sort=51) protected Integer ipPattern; - @ExcelField(title="client_ip",sort=47) + @ExcelField(title="client_ip",sort=53) protected String srcIpAddress; - @ExcelField(title="server_ip",sort=46) + @ExcelField(title="server_ip",sort=52) protected String destIpAddress; - @ExcelField(title="port_pattern",dictType="PORT_PATTERN",sort=48) + @ExcelField(title="port_pattern",dictType="PORT_PATTERN",sort=54) protected Integer portPattern; - @ExcelField(title="client_port",sort=49) + @ExcelField(title="client_port",sort=55) protected String srcPort; - @ExcelField(title="server_port",sort=50) + @ExcelField(title="server_port",sort=56) protected String destPort; protected Integer dnsStrategyId; - @ExcelField(title="ir_type",dictType="IR_TYPE",sort=51) + @ExcelField(title="ir_type",dictType="IR_TYPE",sort=57) protected Integer irType; - @ExcelField(title="group_name",sort=52) + @ExcelField(title="group_name",sort=58) protected String groupName; private List ntcSubscribeIdCfgList; @@ -75,7 +75,7 @@ public class BaseIpCfg extends BaseCfg { protected String organization; //仅用于copy属性使用 protected String country; //仅用于copy属性使用 protected String detail; //仅用于copy属性使用 - @ExcelField(title="log_total",sort=31) + @ExcelField(title="log_total",sort=42) private Long totalLogs; public String getOrganization() { @@ -177,14 +177,14 @@ public class BaseIpCfg extends BaseCfg { */ @Expose @SerializedName("direction") - @ExcelField(title="direction",dictType="DIRECTION",sort=53) + @ExcelField(title="direction",dictType="DIRECTION",sort=58) protected Integer direction ; /** * 协议 */ @Expose @SerializedName("protocol") - @ExcelField(title="protocol",dictType="PROTOCOL",sort=54) + @ExcelField(title="protocol",dictType="PROTOCOL",sort=59) protected Integer protocol ; /** * 协议ID diff --git a/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java b/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java index 5ae686d8d..78f45ea8d 100644 --- a/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java +++ b/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java @@ -86,12 +86,8 @@ public class CfgIndexInfo extends BaseCfg { private String country; private String detail; private List asnKeywords; - @ExcelField(title="log_total",sort=31) + @ExcelField(title="log_total",sort=42) private Long totalLogs; - @ExcelField(title="is_audit",dictType="AUDIT_STATUS",sort=20) - private Integer isAudit; - @ExcelField(title="do_log",dictType="DO_LOG",sort=27) - private Integer doLog = Constants.MAAT_CFG_DOLOG_DEFAULT; /*private CachePolicyUserRegion cachePolicyUserRegion;//缓存策略用户自定义域参数 @@ -102,19 +98,6 @@ public class CfgIndexInfo extends BaseCfg { } }*/ - - public Integer getIsValid() { - return isValid; - } - public void setIsValid(Integer isValid) { - this.isValid = isValid; - } - public Integer getDoLog() { - return doLog; - } - public void setDoLog(Integer doLog) { - this.doLog = doLog; - } public String getOrganization() { return organization; } diff --git a/src/main/java/com/nis/domain/configuration/DdosIpCfg.java b/src/main/java/com/nis/domain/configuration/DdosIpCfg.java index c06a292e5..d57e8d577 100644 --- a/src/main/java/com/nis/domain/configuration/DdosIpCfg.java +++ b/src/main/java/com/nis/domain/configuration/DdosIpCfg.java @@ -23,29 +23,13 @@ public class DdosIpCfg extends BaseIpCfg { */ private static final long serialVersionUID = -5446903784736960824L; private String indexTable="ddos_ip_cfg"; - @ExcelField(title="antiddos_protocol",sort=41) + @ExcelField(title="antiddos_protocol",sort=46) private String antiddosProtocol;//目前支持TCP_SYN, DNS, NTP, - @ExcelField(title="bps_threadshold",sort=42) + @ExcelField(title="bps_threadshold",sort=47) private Long bpsThreadshold;// 即DDoS攻击保护动作触发阈值,每秒Bit数和每秒包数 - @ExcelField(title="pps_threadshold",sort=43) + @ExcelField(title="pps_threadshold",sort=48) private Long ppsThreadshold; - @ExcelField(title="log_total",sort=32) - private Long totalLogs; - @ExcelField(title="is_audit",dictType="AUDIT_STATUS",sort=20) - private Integer isAudit; - - public Integer getIsAudit() { - return isAudit; - } - public void setIsAudit(Integer isAudit) { - this.isAudit = isAudit; - } - public Long getTotalLogs() { - return totalLogs; - } - public void setTotalLogs(Long totalLogs) { - this.totalLogs = totalLogs; - } + public String getAntiddosProtocol() { return antiddosProtocol; } diff --git a/src/main/java/com/nis/web/controller/configuration/maintenance/DnsIpCfgController.java b/src/main/java/com/nis/web/controller/configuration/maintenance/DnsIpCfgController.java index f28836828..4b77aebec 100644 --- a/src/main/java/com/nis/web/controller/configuration/maintenance/DnsIpCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/maintenance/DnsIpCfgController.java @@ -218,7 +218,7 @@ public class DnsIpCfgController extends BaseController { } titleList.add(entity.getMenuNameCode()); classMap.put(entity.getMenuNameCode(), DnsIpCfg.class); - String cfgIndexInfoNoExport = ",whether_area_block,client_ip,port_pattern,client_port,server_port,ir_type,direction,protocol,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,"; + String cfgIndexInfoNoExport = ",log_total,whether_area_block,client_ip,port_pattern,client_port,server_port,ir_type,direction,protocol,do_log,client_port,ir_type,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,"; // 时间过滤 if (entity.getSearch_create_time_start() == null && entity.getSearch_create_time_end() == null) { diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/WhiteListController.java b/src/main/java/com/nis/web/controller/configuration/ntc/WhiteListController.java index 6a8fb2863..fa5615f78 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/WhiteListController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/WhiteListController.java @@ -500,12 +500,14 @@ public class WhiteListController extends CommonController { for (Integer id : set) { serviceIds.append(id+","); } - String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1); - String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1); - //获取日志总量 - if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){ - List> logs = getLogTotal( null,serviceIdsStr,compileIdsStr); - logTotals.addAll(logs); + if(serviceIds.length()>1&&compileIds.length()>1){ + String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1); + String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1); + //获取日志总量 + if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){ + List> logs = getLogTotal( null,serviceIdsStr,compileIdsStr); + logTotals.addAll(logs); + } } titleList.add(entity.getMenuNameCode()); titleList.add("NTC_HTTP_URL"); diff --git a/src/main/java/com/nis/web/controller/configuration/proxy/InterceptController.java b/src/main/java/com/nis/web/controller/configuration/proxy/InterceptController.java index c3f01a4e5..77c77c68e 100644 --- a/src/main/java/com/nis/web/controller/configuration/proxy/InterceptController.java +++ b/src/main/java/com/nis/web/controller/configuration/proxy/InterceptController.java @@ -3,9 +3,11 @@ package com.nis.web.controller.configuration.proxy; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Properties; +import java.util.Set; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -273,6 +275,35 @@ public class InterceptController extends CommonController { Page page = ipCfgService.getIpCfgList(pageInfo, entity); ipLists = page.getList(); } + //日志总量 + List> logTotals=new ArrayList>(); + StringBuilder compileIds=new StringBuilder(",");//配置ids + Set set=new HashSet();//服务ids + for (CfgIndexInfo cfg : ipLists) { + if(cfg.getIsAudit()!=0){ + set.add(cfg.getServiceId()); + compileIds.append(cfg.getCompileId()+","); + }else{ + Map logTotal=new HashMap(); + logTotal.put("compileId", cfg.getCompileId()+""); + logTotal.put("sum",0L); + logTotals.add(logTotal); + } + + } + StringBuilder serviceIds=new StringBuilder(","); + for (Integer id : set) { + serviceIds.append(id+","); + } + if(serviceIds.length()>1&&compileIds.length()>1){ + String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1); + String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1); + //获取日志总量 + if(!StringUtils.isBlank(serviceIdsStr)&&!StringUtils.isBlank(compileIdsStr)){ + List> logs = getLogTotal( null,serviceIdsStr,compileIdsStr); + logTotals.addAll(logs); + } + } // 获取证书信息 List certificateList = new ArrayList(); if (entity.getFunctionId().equals(200)) { @@ -325,6 +356,12 @@ public class InterceptController extends CommonController { List httpUrlList = new ArrayList(); List pktBinList = new ArrayList(); for (CfgIndexInfo cfg : ipLists) { + for (Map logTotal : logTotals) { + if(cfg.getCompileId().equals(Integer.parseInt((String) logTotal.get("compileId")))){ + cfg.setTotalLogs((Long)logTotal.get("sum")); + break; + } + } Map maps = interceptCfgService.exportIpInfo(cfg); httpUrlList.addAll(maps.get("NTC_HTTP_URL")); ipList.addAll(maps.get("PXY_INTERCEPT_IP")); @@ -346,7 +383,7 @@ public class InterceptController extends CommonController { httpUrlList = BaseStringCfg.baseHexList(httpUrlList); dataMap.put(entity.getMenuNameCode(), ipLists); if (entity.getFunctionId() == 212) { // IP Payload - cfgIndexInfoNoExport = ",do_log,log_total,policy_name,group_name,userregion4,userregion5,&userregion1:replace_zone-userregion2:replaced_content-userregion3:replace_content-"; + cfgIndexInfoNoExport = ",policy_name,group_name,userregion4,userregion5,&userregion1:replace_zone-userregion2:replaced_content-userregion3:replace_content-"; titleList.add("PXY_INTERCEPT_IP"); titleList.add("PXY_INTERCEPT_PKT_BIN"); classMap.put("PXY_INTERCEPT_IP", IpPortCfg.class); diff --git a/src/main/webapp/WEB-INF/views/basics/asnIpCfgList.jsp b/src/main/webapp/WEB-INF/views/basics/asnIpCfgList.jsp index 35addb20b..04e2fe0fe 100644 --- a/src/main/webapp/WEB-INF/views/basics/asnIpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/basics/asnIpCfgList.jsp @@ -282,10 +282,10 @@ <%-- - --%> - + --%> <%-- --%> + @@ -388,12 +388,7 @@ ${fns:abbr(lableInfo,20)} --%> - <%-- ${cfg.areaEffectiveIds } --%> - - - - - + <%-- ${cfg.areaEffectiveIds } --%> @@ -412,6 +407,11 @@ --%> <%--
--%> + + + + + ${cfg.creatorName } ${cfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgList.jsp index 76718c95a..192f6643f 100644 --- a/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgList.jsp @@ -331,13 +331,13 @@ - - - + + + <%-- --%> + <%-- --%> - @@ -370,13 +370,20 @@ + + + + + + + + - - ${fns:abbr(cfg.destIpAddress, 42)} + <%-- ${cfg.destPort } --%> @@ -388,14 +395,7 @@ --%> - - - - - - - - + ${fns:abbr(cfg.destIpAddress, 42)} ${cfg.requestName } 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 3a3657956..199b383d6 100644 --- a/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/intercept/interceptList.jsp @@ -409,14 +409,14 @@ --%> + + - - - + @@ -552,6 +552,14 @@ + + + + + + + +
@@ -623,15 +631,7 @@ - - - - - - - - -
+ ${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/snatlist2.jsp b/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/snatlist2.jsp index e21c08cc8..383896ddf 100644 --- a/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/snatlist2.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/maintenance/ipMultiplexPool/snatlist2.jsp @@ -401,8 +401,7 @@ - <%-- --%> - + <%-- --%> <%-- --%> @@ -410,6 +409,7 @@ + @@ -438,12 +438,7 @@
- --%> - - - - - + --%> @@ -524,6 +519,11 @@ ${fns:abbr(lableInfo,20)} + + + + + ${cfg.creatorName } ${cfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/dnatPolicyList2.jsp b/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/dnatPolicyList2.jsp index f15562e2f..41a00dace 100644 --- a/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/dnatPolicyList2.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/dnatPolicyList2.jsp @@ -353,18 +353,17 @@ - - - - + <%-- --%> + + <%-- --%> <%-- --%> - <%-- --%> + @@ -417,16 +416,14 @@ - -
- + <%-- - --%> + --%> <%-- @@ -434,12 +431,7 @@ - --%> - - - - - + --%> @@ -448,6 +440,8 @@ +
+ <%--
--%> ${indexCfg.requestName } @@ -507,7 +501,11 @@ ${fns:abbr(lableInfo,20)} - <%--
--%> + + + + + ${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatPolicyList2.jsp b/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatPolicyList2.jsp index 7bf7565c2..7e920966d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatPolicyList2.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/manipulation/ipmulitiplex/snatPolicyList2.jsp @@ -331,8 +331,7 @@ <%-- --%> - <%-- --%> - + <%-- --%> <%-- --%> <%-- --%> @@ -340,6 +339,7 @@ + @@ -390,12 +390,7 @@ - --%> - - - - - + --%> @@ -478,6 +473,11 @@ ${fns:abbr(lableInfo,20)} + + + + + ${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp b/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp index cac16adfc..da2b28a1e 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp @@ -374,10 +374,10 @@ --%> - - + + @@ -476,12 +476,7 @@ - - - - - - + @@ -490,6 +485,11 @@
+ + + + + ${indexCfg.creatorName } ${indexCfg.editorName }