diff --git a/src/main/java/com/nis/domain/log/SearchReport.java b/src/main/java/com/nis/domain/log/SearchReport.java index de1798739..d1b378da7 100644 --- a/src/main/java/com/nis/domain/log/SearchReport.java +++ b/src/main/java/com/nis/domain/log/SearchReport.java @@ -31,6 +31,7 @@ public class SearchReport extends BaseEntity{ private Integer functionId; private String cfgName; private Integer action; + private Integer serviceId; private String services;//service日志总量统计使用 private Integer reportType;//小时报,日报,月报 //标签,性质,来文函号,境内源Ip,各国目的IP,运营商局点 @@ -52,6 +53,12 @@ public class SearchReport extends BaseEntity{ private String reportTime; + public Integer getServiceId() { + return serviceId; + } + public void setServiceId(Integer serviceId) { + this.serviceId = serviceId; + } public String getServices() { return services; } diff --git a/src/main/java/com/nis/web/controller/configuration/LogSearchController.java b/src/main/java/com/nis/web/controller/configuration/LogSearchController.java index 4bd69897c..2c8257044 100644 --- a/src/main/java/com/nis/web/controller/configuration/LogSearchController.java +++ b/src/main/java/com/nis/web/controller/configuration/LogSearchController.java @@ -24,9 +24,9 @@ public class LogSearchController extends BaseController{ */ // 获取相应日志检索菜单URL String logUrl = menuService.getLogUrl(entity.getFunctionId()); - Integer serviceId = menuService.getServiceId(entity.getFunctionId(),entity.getAction()); +// Integer serviceId = menuService.getServiceId(entity.getFunctionId(),entity.getAction()); - attr.addAttribute("service", serviceId); + attr.addAttribute("service", entity.getService().intValue()); attr.addAttribute("cfgId", entity.getCfgId()); attr.addAttribute("functionId", entity.getFunctionId()); attr.addAttribute("date", entity.getDate()); diff --git a/src/main/java/com/nis/web/controller/report/NtcDestIpReportController.java b/src/main/java/com/nis/web/controller/report/NtcDestIpReportController.java index 28f53cc41..b8d762aa1 100644 --- a/src/main/java/com/nis/web/controller/report/NtcDestIpReportController.java +++ b/src/main/java/com/nis/web/controller/report/NtcDestIpReportController.java @@ -35,12 +35,8 @@ public class NtcDestIpReportController extends BaseController { List serviceList = DictUtils.getFunctionServiceDictList(bean.getFunctionId()); - if(bean.getAction()!=null){ - for(FunctionServiceDict service:serviceList){ - if(service.getAction().intValue()==bean.getAction().intValue()){ - bean.setSearchService(service.getServiceId().toString()); - } - } + if(bean.getServiceId()!=null){ + bean.setServices(bean.getServiceId().toString()); }else{ StringBuffer serviceId=new StringBuffer(); for(int i=0;i serviceList = DictUtils.getFunctionServiceDictList(bean.getFunctionId()); - if(bean.getAction()!=null){ - for(FunctionServiceDict service:serviceList){ - if(service.getAction().intValue()==bean.getAction().intValue()){ - bean.setSearchService(service.getServiceId().toString()); - } - } + if(bean.getServiceId()!=null){ + bean.setServices(bean.getServiceId().toString()); }else{ StringBuffer serviceId=new StringBuffer(); for(int i=0;i serviceList = DictUtils.getFunctionServiceDictList(bean.getFunctionId()); List requestInfos=requestInfoService.getAllRequestInfo(); model.addAttribute("requestInfos", requestInfos); - if(bean.getAction()!=null){ - for(FunctionServiceDict service:serviceList){ - if(service.getAction().intValue()==bean.getAction().intValue()){ - bean.setSearchService(service.getServiceId().toString()); - } - } + if(bean.getServiceId()!=null){ + bean.setServices(bean.getServiceId().toString()); }else{ StringBuffer serviceId=new StringBuffer(); for(int i=0;i> ajaxGetLogTotal(Model model,Long endTime,String actions,Integer functionId,String compileIds){ + public List> ajaxGetLogTotal(Model model,Long endTime,String actions,String serviceIds,Integer functionId,String compileIds){ List> dataList=new ArrayList<>(); SimpleDateFormat sdf=new SimpleDateFormat(Constants.SEARCH_DATEFORMAT); Date endDate=null; @@ -95,22 +95,25 @@ public class NtcPzReportController extends BaseController{ logger.info("log search end time:"+sdf.format(endDate)); logger.info("log search start time:"+sdf.format(startDate)); } - - String serviceIdsStr=""; - StringBuffer serviceIds=new StringBuffer(); - List serviceList=DictUtils.getFunctionServiceDictList(functionId.intValue()); - for(String action:actions.split(",")) { - for(FunctionServiceDict service:serviceList){ - if(service.getAction().intValue()==Integer.parseInt(action)){ - serviceIds.append(service.getServiceId().intValue()); - serviceIds.append(","); - } - } - } - if(serviceIds.toString().endsWith(",")) { - serviceIdsStr=serviceIds.toString().substring(0,serviceIds.toString().lastIndexOf(",")); - } - String json=ConfigServiceUtil.getReport(Constants.BUSINESSTYPE_CONFIG, compileIds, serviceIdsStr, startDate==null?null:sdf.format(startDate), endDate==null?null:sdf.format(endDate)); +// String serviceIdsStr=""; +// if(StringUtils.isBlank(serviceIds)) { +// StringBuffer _serviceIds=new StringBuffer(); +// List serviceList=DictUtils.getFunctionServiceDictList(functionId.intValue()); +// for(String action:actions.split(",")) { +// for(FunctionServiceDict service:serviceList){ +// if(service.getAction().intValue()==Integer.parseInt(action)){ +// _serviceIds.append(service.getServiceId().intValue()); +// _serviceIds.append(","); +// } +// } +// } +// if(_serviceIds.toString().endsWith(",")) { +// serviceIdsStr=_serviceIds.toString().substring(0,_serviceIds.toString().lastIndexOf(",")); +// } +// }else { +// serviceIdsStr=serviceIds; +// } + String json=ConfigServiceUtil.getReport(Constants.BUSINESSTYPE_CONFIG, compileIds, serviceIds, startDate==null?null:sdf.format(startDate), endDate==null?null:sdf.format(endDate)); List list=getList(json); String[] idArr=compileIds.split(","); if(list!=null&&(list.size()>0)){ @@ -136,12 +139,8 @@ public class NtcPzReportController extends BaseController{ List serviceList = DictUtils.getFunctionServiceDictList(bean.getFunctionId()); List labels=serviceDictInfoService.findAllLableDict(); model.addAttribute("labels", labels); - if(bean.getAction()!=null){ - for(FunctionServiceDict service:serviceList){ - if(service.getAction().intValue()==bean.getAction().intValue()){ - bean.setSearchService(service.getServiceId().toString()); - } - } + if(bean.getServiceId()!=null){ + bean.setSearchService(bean.getServiceId().toString()); }else{ StringBuffer serviceId=new StringBuffer(); for(int i=0;i serviceList = DictUtils.getFunctionServiceDictList(bean.getFunctionId()); - if(bean.getAction()!=null){ - for(FunctionServiceDict service:serviceList){ - if(service.getAction().intValue()==bean.getAction().intValue()){ - bean.setSearchService(service.getServiceId().toString()); - } - } + if(bean.getServiceId()!=null){ + bean.setServices(bean.getServiceId().toString()); }else{ StringBuffer serviceId=new StringBuffer(); for(int i=0;i serviceList = DictUtils.getFunctionServiceDictList(bean.getFunctionId()); List labels=serviceDictInfoService.findAllLableDict(); model.addAttribute("labels", labels); - if(bean.getAction()!=null){ - for(FunctionServiceDict service:serviceList){ - if(service.getAction().intValue()==bean.getAction().intValue()){ - bean.setSearchService(service.getServiceId().toString()); - } - } + if(bean.getServiceId()!=null){ + bean.setServices(bean.getServiceId().toString()); }else{ StringBuffer serviceId=new StringBuffer(); for(int i=0;i serviceList = DictUtils.getFunctionServiceDictList(bean.getFunctionId()); List xzs=serviceDictInfoService.findAllXzDict(); model.addAttribute("xzs", xzs); - if(bean.getAction()!=null){ - for(FunctionServiceDict service:serviceList){ - if(service.getAction().intValue()==bean.getAction().intValue()){ - bean.setSearchService(service.getServiceId().toString()); - } - } + if(bean.getServiceId()!=null){ + bean.setServices(bean.getServiceId().toString()); }else{ StringBuffer serviceId=new StringBuffer(); for(int i=0;i + diff --git a/src/main/webapp/WEB-INF/views/cfg/asnPolicyCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/asnPolicyCfgList.jsp index afebcb4a0..20b1d7d98 100644 --- a/src/main/webapp/WEB-INF/views/cfg/asnPolicyCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/asnPolicyCfgList.jsp @@ -383,7 +383,7 @@ - <%--
--%> + <%--
--%> ${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp index c93086414..4f16c5328 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp @@ -445,7 +445,7 @@ -
+
${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 25c067939..d9cf24db1 100644 --- a/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgList.jsp @@ -421,7 +421,7 @@ - <%--
--%> + <%--
--%> ${cfg.creatorName } ${cfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp index f7ffadb40..acbab3409 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/fileDigestList.jsp @@ -461,7 +461,7 @@ - <%--
--%> + <%--
--%> ${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp index d2e41d5a3..fc6f81c82 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp @@ -448,7 +448,7 @@ -
+
${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp index d523f84dd..1f61043eb 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/p2pList.jsp @@ -439,7 +439,7 @@ -
+
${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp index c2c6b6c17..f53633168 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp @@ -143,7 +143,7 @@ - + @@ -441,7 +441,7 @@ -
+
${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp b/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp index 164e1c36f..006661914 100644 --- a/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp @@ -445,7 +445,7 @@ -
+
${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp b/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp index 0caee3318..3347ac1fa 100644 --- a/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/other/bgpList.jsp @@ -446,7 +446,7 @@ -
+
${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/other/xmppList.jsp b/src/main/webapp/WEB-INF/views/cfg/other/xmppList.jsp index e4c6300e8..58d9c6efe 100644 --- a/src/main/webapp/WEB-INF/views/cfg/other/xmppList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/other/xmppList.jsp @@ -446,7 +446,7 @@ -
+
${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp index 863c19ffe..d48a7b55a 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpRedirectList.jsp @@ -712,7 +712,7 @@ -
+
${indexCfg.creatorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpReqReplaceList.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpReqReplaceList.jsp index c9c2c3a06..93ab7df0d 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpReqReplaceList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpReqReplaceList.jsp @@ -343,7 +343,7 @@ -
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpResReplaceList.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpResReplaceList.jsp index 52a1e9644..c2476973a 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpResReplaceList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/control/httpResReplaceList.jsp @@ -346,7 +346,7 @@ -
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp index 66efa84a6..58539f27b 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp @@ -450,7 +450,7 @@ -
+
${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp index 2bbc9d595..eb482ae6c 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp @@ -602,7 +602,7 @@ -
+
${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp b/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp index b62d87e5d..17cc4ddda 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/sslList.jsp @@ -443,7 +443,7 @@ -
+
${indexCfg.creatorName } ${indexCfg.editorName } 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 9c99b0c15..d08ac0455 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp @@ -444,7 +444,7 @@ - <%--
--%> + <%--
--%> ${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 4db4874d5..945d8e078 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp @@ -443,7 +443,7 @@ - <%--
--%> + <%--
--%> ${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/report/list.jsp b/src/main/webapp/WEB-INF/views/report/list.jsp index a5349244c..73d1755c7 100644 --- a/src/main/webapp/WEB-INF/views/report/list.jsp +++ b/src/main/webapp/WEB-INF/views/report/list.jsp @@ -92,8 +92,8 @@ $(document).ready(function() { }); function getXlsxFileName() { var cfgName = $("[name=cfgName2]").val() + "_"; - if ("${bean.action}") { - var action = $("[name=action]").find('[value=' + "${bean.action}" + ']').text() + "_"; + if ("${bean.serviceId}") { + var action = $("[name=serviceId]").find('[value=' + "${bean.serviceId}" + ']').text() + "_"; } else { var action = ""; } @@ -142,9 +142,16 @@ var reportDate=0; var ajaxServiceLogTotal=function(){ var services=[]; var objs=[]; + var serviceIndex=0; $(".service").each(function(){ + if(serviceIndex%2==0){ + $(this).addClass("btn-primary"); + }else{ + $(this).addClass("btn-default"); + } objs.push($(this)); services.push($(this).data("service")); + serviceIndex++; }); var timeout=$.validator.messages.timeout; var failed=$.validator.messages.failed; @@ -195,7 +202,7 @@ var ajaxReport=function(url,target){ cache:false, url:'${ctx}'+url,// /report/ajaxNtcTagReport data:{ - "action":$('[name="action"]').val(), + "serviceId":$('[name="serviceId"]').val(), "reportType":$('[name="reportType"]').val(), "reportTime":$('[name="reportTime"]').val(), "functionId":$('[name="functionId"]').val() @@ -355,15 +362,13 @@ function customColumnClick(){