diff --git a/src/main/java/com/nis/domain/callback/InlineIp.java b/src/main/java/com/nis/domain/callback/InlineIp.java index 21f25c819..ebd45ef2b 100644 --- a/src/main/java/com/nis/domain/callback/InlineIp.java +++ b/src/main/java/com/nis/domain/callback/InlineIp.java @@ -56,6 +56,16 @@ public class InlineIp { private Date opTime; @Expose private Integer policyGroup; + @Expose + private String userRegion;//用于存储协议跟流量阀值 + + + public String getUserRegion() { + return userRegion; + } + public void setUserRegion(String userRegion) { + this.userRegion = userRegion; + } /** * action * @return action diff --git a/src/main/java/com/nis/domain/configuration/DdosIpCfg.java b/src/main/java/com/nis/domain/configuration/DdosIpCfg.java index 020f4b500..5dfd52082 100644 --- a/src/main/java/com/nis/domain/configuration/DdosIpCfg.java +++ b/src/main/java/com/nis/domain/configuration/DdosIpCfg.java @@ -22,6 +22,28 @@ public class DdosIpCfg extends BaseIpCfg { */ private static final long serialVersionUID = -5446903784736960824L; + private String antiddosProtocol;//目前支持TCP_SYN, DNS, NTP, + private Long bpsThreadshold;// 即DDoS攻击保护动作触发阈值,每秒Bit数和每秒包数 + private Long ppsThreadshold; + + public String getAntiddosProtocol() { + return antiddosProtocol; + } + public void setAntiddosProtocol(String antiddosProtocol) { + this.antiddosProtocol = antiddosProtocol; + } + public Long getBpsThreadshold() { + return bpsThreadshold; + } + public void setBpsThreadshold(Long bpsThreadshold) { + this.bpsThreadshold = bpsThreadshold; + } + public Long getPpsThreadshold() { + return ppsThreadshold; + } + public void setPpsThreadshold(Long ppsThreadshold) { + this.ppsThreadshold = ppsThreadshold; + } } diff --git a/src/main/java/com/nis/web/controller/BaseController.java b/src/main/java/com/nis/web/controller/BaseController.java index 4488fffc0..1fa03ffed 100644 --- a/src/main/java/com/nis/web/controller/BaseController.java +++ b/src/main/java/com/nis/web/controller/BaseController.java @@ -2,6 +2,7 @@ package com.nis.web.controller; import java.beans.PropertyEditorSupport; import java.io.IOException; import java.lang.reflect.Field; +import java.net.URLEncoder; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.ArrayList; @@ -2237,6 +2238,11 @@ public class BaseController { map.put("labels", labels); String fileName = msgProp.getProperty(functionName, functionName)+"_"+DateUtils.getDate("yyyyMMddHHmmss")+".xlsx"; + if(request.getHeader("User-Agent").toUpperCase().indexOf("MSIE")>0){ + fileName = URLEncoder.encode(fileName, "UTF-8"); + }else{ + fileName = new String(fileName.getBytes("UTF-8"),"ISO8859-1"); + } new ExportExcel(msgProp,titleList,noExportMap,classMap,1).setDataList(msgProp,dataMap,map).write(response, fileName).dispose(); } } diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java b/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java index ee268ea92..8bea6b713 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/FileTransferCfgController.java @@ -456,4 +456,91 @@ public class FileTransferCfgController extends BaseController{ } return "redirect:" + adminPath +"/ntc/fileTransfer/p2pList?functionId="+functionId; } + + //ftp配置导出 + @RequestMapping(value = "exportftp") + public void exportdns(Model model,HttpServletRequest request,HttpServletResponse response, + @ModelAttribute("cfg")CfgIndexInfo entity,String ids,RedirectAttributes redirectAttributes){ + try { + //export data info + List titleList=new ArrayList(); + Map> classMap=new HashMap>(); + Map dataMap=new HashMap(); + Map noExportMap=new HashMap(); + + + /*//导出选中记录 + * if(!StringUtil.isEmpty(ids)){ + for(String id:ids.split(",")){ + Long.parseLong(id); + } + //List list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids); + }else{*/ + //条件导出数据大于最大导出数,只导出最大导出条数 + entity.setTableName(IpPortCfg.getTablename()); + Page pageInfo=new Page(request, response,"a"); + if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){ + pageInfo.setPageNo(1); + pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE); + }else{ + pageInfo.setPageNo(1); + pageInfo.setPageSize(-1); + } + Page page = fileTransferCfgService.getFtpList(pageInfo, entity); + titleList.add(entity.getMenuNameCode()); + titleList.add("NTC_IP"); + titleList.add("NTC_FTP_URL"); + titleList.add("NTC_FTP_CONTENT"); + titleList.add("NTC_SUBSCRIBE_ID"); + classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class); + classMap.put("NTC_IP", IpPortCfg.class); + classMap.put("NTC_FTP_URL", BaseStringCfg.class); + classMap.put("NTC_FTP_CONTENT", BaseStringCfg.class); + classMap.put("NTC_SUBSCRIBE_ID", NtcSubscribeIdCfg.class); + + String cfgIndexInfoNoExport=",group_name,userregion1,userregion2,userregion3,userregion4,userregion5,"; + String ipPortInfoNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator" + + ",config_time,editor,edit_time,auditor,audit_time" + +",letter,whether_area_block,classification,attribute,label" + +",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,"; + String ntcSubscribeIdCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator" + + ",config_time,editor,edit_time,auditor,audit_time" + +",letter,whether_area_block,classification,attribute,label" + +",userregion1,userregion2,userregion3,userregion4,userregion5,"; + String regionCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator" + + ",config_time,editor,edit_time,auditor,audit_time" + +",letter,whether_area_block,classification,attribute,label" + +",userregion1,userregion2,userregion3,userregion4,userregion5,"; + + noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport); + noExportMap.put("NTC_IP", ipPortInfoNoExport); + noExportMap.put("NTC_FTP_URL", regionCfgNoExport); + noExportMap.put("NTC_FTP_CONTENT", regionCfgNoExport); + noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport); + List ipList=new ArrayList(); + List subscribeInfoList=new ArrayList(); + List ftpkeyList=new ArrayList(); + List ftpurlList=new ArrayList(); + for (CfgIndexInfo cfg : page.getList()) { + Map maps=fileTransferCfgService.exportftp(cfg); + ftpkeyList.addAll(maps.get("NTC_FTP_CONTENT")); + ftpurlList.addAll(maps.get("NTC_FTP_URL")); + ipList.addAll(maps.get("NTC_UNIVERSAL_IP")); + subscribeInfoList.addAll(maps.get("NTC_SUBSCRIBE_ID")); + } + + dataMap.put(entity.getMenuNameCode(), page.getList()); + dataMap.put("NTC_IP", ipList); + dataMap.put("NTC_FTP_URL", ftpurlList); + dataMap.put("NTC_FTP_CONTENT", ftpkeyList); + dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList); + /*}*/ + this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap); + } catch (Exception e) { + logger.error("ftp export failed",e); + addMessage(redirectAttributes, "export_failed"); + } + //return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); + } + } diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/MailCfgController.java b/src/main/java/com/nis/web/controller/configuration/ntc/MailCfgController.java index bffad6486..a76e9466d 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/MailCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/MailCfgController.java @@ -32,6 +32,7 @@ import com.nis.domain.configuration.NtcSubscribeIdCfg; import com.nis.domain.maat.ToMaatResult; import com.nis.exceptions.MaatConvertException; import com.nis.util.ConfigServiceUtil; +import com.nis.util.Constants; import com.nis.util.FileUtils; import com.nis.util.JsonMapper; import com.nis.web.controller.BaseController; @@ -174,4 +175,100 @@ public class MailCfgController extends BaseController{ } return "redirect:" + adminPath +"/ntc/mail/mailList?functionId="+functionId; } + + //mail配置导出 + @RequestMapping(value = "exportmail") + public void exportdns(Model model,HttpServletRequest request,HttpServletResponse response, + @ModelAttribute("cfg")CfgIndexInfo entity,String ids,RedirectAttributes redirectAttributes){ + try { + //export data info + List titleList=new ArrayList(); + Map> classMap=new HashMap>(); + Map dataMap=new HashMap(); + Map noExportMap=new HashMap(); + + + /*//导出选中记录 + * if(!StringUtil.isEmpty(ids)){ + for(String id:ids.split(",")){ + Long.parseLong(id); + } + //List list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids); + }else{*/ + //条件导出数据大于最大导出数,只导出最大导出条数 + entity.setTableName(IpPortCfg.getTablename()); + Page pageInfo=new Page(request, response,"a"); + if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){ + pageInfo.setPageNo(1); + pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE); + }else{ + pageInfo.setPageNo(1); + pageInfo.setPageSize(-1); + } + Page page = mailCfgService.getMailList(pageInfo, entity); + titleList.add(entity.getMenuNameCode()); + String cfgIndexInfoNoExport=",group_name,userregion1,userregion2,userregion3,userregion4,userregion5,"; + String ipPortInfoNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator" + + ",config_time,editor,edit_time,auditor,audit_time" + +",letter,whether_area_block,classification,attribute,label" + +",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,"; + String ntcSubscribeIdCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator" + + ",config_time,editor,edit_time,auditor,audit_time" + +",letter,whether_area_block,classification,attribute,label" + +",userregion1,userregion2,userregion3,userregion4,userregion5,"; + String regionCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator" + + ",config_time,editor,edit_time,auditor,audit_time" + +",letter,whether_area_block,classification,attribute,label" + +",userregion1,userregion2,userregion3,userregion4,userregion5,"; + if(entity.getFunctionId()!=null){ + if(entity.getFunctionId()!=37){ + titleList.add("NTC_IP"); + titleList.add("NTC_MAIL_BODY"); + + classMap.put("NTC_IP", IpPortCfg.class); + classMap.put("NTC_MAIL_BODY", ComplexkeywordCfg.class); + + noExportMap.put("NTC_IP", ipPortInfoNoExport); + noExportMap.put("NTC_MAIL_BODY", regionCfgNoExport); + + } + } + titleList.add("NTC_MAIL_HDR"); + titleList.add("NTC_SUBSCRIBE_ID"); + classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class); + classMap.put("NTC_MAIL_HDR", ComplexkeywordCfg.class); + classMap.put("NTC_SUBSCRIBE_ID", NtcSubscribeIdCfg.class); + noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport); + noExportMap.put("NTC_MAIL_HDR", regionCfgNoExport); + noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport); + List ipList=new ArrayList(); + List subscribeInfoList=new ArrayList(); + List mailBodyList=new ArrayList(); + List mailReqHdrList=new ArrayList(); + for (CfgIndexInfo cfg : page.getList()) { + Map maps=mailCfgService.exportmail(cfg); + mailReqHdrList.addAll(maps.get("NTC_MAIL_HDR")); + mailBodyList.addAll(maps.get("NTC_MAIL_BODY")); + ipList.addAll(maps.get("NTC_UNIVERSAL_IP")); + subscribeInfoList.addAll(maps.get("NTC_SUBSCRIBE_ID")); + } + if(entity.getFunctionId()!=null){ + if(entity.getFunctionId()!=37){ + dataMap.put("NTC_IP", ipList); + dataMap.put("NTC_MAIL_BODY", mailBodyList); + + } + } + dataMap.put(entity.getMenuNameCode(), page.getList()); + dataMap.put("NTC_MAIL_HDR", mailReqHdrList); + dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList); + /*}*/ + this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap); + } catch (Exception e) { + logger.error("mail export failed",e); + addMessage(redirectAttributes, "export_failed"); + } + //return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); + } + } diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java b/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java index 7640ba214..53335fe87 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/WebsiteController.java @@ -640,5 +640,83 @@ public class WebsiteController extends BaseController{ } return "redirect:" + adminPath +"/ntc/website/httpList?functionId="+entity.getFunctionId(); } + + //dns配置导出 + @RequestMapping(value = "exportdns") + public void exportdns(Model model,HttpServletRequest request,HttpServletResponse response, + @ModelAttribute("cfg")CfgIndexInfo entity,String ids,RedirectAttributes redirectAttributes){ + try { + //export data info + List titleList=new ArrayList(); + Map> classMap=new HashMap>(); + Map dataMap=new HashMap(); + Map noExportMap=new HashMap(); + + + /*//导出选中记录 + * if(!StringUtil.isEmpty(ids)){ + for(String id:ids.split(",")){ + Long.parseLong(id); + } + //List list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids); + }else{*/ + //条件导出数据大于最大导出数,只导出最大导出条数 + entity.setTableName(IpPortCfg.getTablename()); + Page pageInfo=new Page(request, response,"a"); + if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){ + pageInfo.setPageNo(1); + pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE); + }else{ + pageInfo.setPageNo(1); + pageInfo.setPageSize(-1); + } + Page page = websiteCfgService.getWebsiteList(pageInfo, entity); + titleList.add(entity.getMenuNameCode()); + titleList.add("NTC_IP"); + titleList.add("NTC_DNS_REGION"); + titleList.add("NTC_SUBSCRIBE_ID"); + classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class); + classMap.put("NTC_IP", IpPortCfg.class); + classMap.put("NTC_DNS_REGION", ComplexkeywordCfg.class); + classMap.put("NTC_SUBSCRIBE_ID", NtcSubscribeIdCfg.class); + String cfgIndexInfoNoExport=",group_name,userregion1,userregion2,userregion3,userregion4,userregion5,"; + String ipPortInfoNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator" + + ",config_time,editor,edit_time,auditor,audit_time" + +",letter,whether_area_block,classification,attribute,label" + +",userregion1,userregion2,userregion3,userregion4,userregion5,ir_type,group_name,"; + String ntcSubscribeIdCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator" + + ",config_time,editor,edit_time,auditor,audit_time" + +",letter,whether_area_block,classification,attribute,label" + +",userregion1,userregion2,userregion3,userregion4,userregion5,"; + String regionCfgNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator" + + ",config_time,editor,edit_time,auditor,audit_time" + +",letter,whether_area_block,classification,attribute,label" + +",userregion1,userregion2,userregion3,userregion4,userregion5,"; + noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport); + noExportMap.put("NTC_IP", ipPortInfoNoExport); + noExportMap.put("NTC_DNS_REGION", regionCfgNoExport); + noExportMap.put("NTC_SUBSCRIBE_ID", ntcSubscribeIdCfgNoExport); + List ipList=new ArrayList(); + List subscribeInfoList=new ArrayList(); + List regionInfoList=new ArrayList(); + for (CfgIndexInfo cfg : page.getList()) { + CfgIndexInfo cfgIndexInfo=websiteCfgService.exportdns(cfg); + ipList.addAll(cfgIndexInfo.getIpPortList()); + subscribeInfoList.addAll(cfgIndexInfo.getNtcSubscribeIdCfgList()); + regionInfoList.addAll(cfgIndexInfo.getDomainList()); + } + dataMap.put(entity.getMenuNameCode(), page.getList()); + dataMap.put("NTC_IP", ipList); + dataMap.put("NTC_DNS_REGION", regionInfoList); + dataMap.put("NTC_SUBSCRIBE_ID", subscribeInfoList); + + /*}*/ + this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap); + } catch (Exception e) { + logger.error("dns export failed",e); + addMessage(redirectAttributes, "export_failed"); + } + //return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); + } } 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 4ffaf753e..cb9aa6614 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 @@ -286,7 +286,7 @@ public class WhiteListController extends CommonController{ titleList.add("NTC_IP"); classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class); classMap.put("NTC_IP", IpPortCfg.class); - String cfgIndexInfoNoExport=",group_name,userregion1,userregion2,userregion3,userregion4,userregion5,"; + String cfgIndexInfoNoExport=",do_log,letter,whether_area_block,classification,attribute,label,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,"; String ipPortInfoNoExport=",protocol,direction,do_log,action,config_describe,valid_identifier,is_audit,creator,creator" + ",config_time,editor,edit_time,auditor,audit_time" +",letter,whether_area_block,classification,attribute,label" @@ -308,6 +308,61 @@ public class WhiteListController extends CommonController{ } //return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); } - + //ip配置导出 + @RequestMapping(value = "exportdomain") + public void exportdomain(Model model,HttpServletRequest request,HttpServletResponse response, + @ModelAttribute("cfg")CfgIndexInfo entity,String ids,RedirectAttributes redirectAttributes){ + try { + //export data info + List titleList=new ArrayList(); + Map> classMap=new HashMap>(); + Map dataMap=new HashMap(); + Map noExportMap=new HashMap(); + + + /*//导出选中记录 + * if(!StringUtil.isEmpty(ids)){ + for(String id:ids.split(",")){ + Long.parseLong(id); + } + //List list=ipCfgService.getListByCfgIdWithName(IpPortCfg.getTablename(), entity.getFunctionId(), ids); + }else{*/ + //条件导出数据大于最大导出数,只导出最大导出条数 + entity.setTableName(IpPortCfg.getTablename()); + Page pageInfo=new Page(request, response,"a"); + if(pageInfo.getCount()>Constants.MAX_EXPORT_SIZE){ + pageInfo.setPageNo(1); + pageInfo.setPageSize(Constants.MAX_EXPORT_SIZE); + }else{ + pageInfo.setPageNo(1); + pageInfo.setPageSize(-1); + } + Page page = domainService.getDomainList(pageInfo, entity); + titleList.add(entity.getMenuNameCode()); + titleList.add("NTC_HTTP_URL"); + classMap.put(entity.getMenuNameCode(), CfgIndexInfo.class); + classMap.put("NTC_HTTP_URL", HttpUrlCfg.class); + String cfgIndexInfoNoExport=",do_log,letter,whether_area_block,classification,attribute,label,group_name,userregion1,userregion2,userregion3,userregion4,userregion5,"; + String httpUrlInfoNoExport=",do_log,action,config_describe,valid_identifier,is_audit,creator,creator" + + ",config_time,editor,edit_time,auditor,audit_time" + +",letter,whether_area_block,classification,attribute,label" + +",userregion1,userregion2,userregion3,userregion4,userregion5,"; + noExportMap.put(entity.getMenuNameCode(),cfgIndexInfoNoExport); + noExportMap.put("NTC_HTTP_URL", httpUrlInfoNoExport); + List httpurlList=new ArrayList(); + for (CfgIndexInfo cfg : page.getList()) { + CfgIndexInfo cfgIndexInfo=domainService.exportDomainInfo(cfg); + httpurlList.addAll(cfgIndexInfo.getHttpUrlList()); + } + dataMap.put(entity.getMenuNameCode(), page.getList()); + dataMap.put("NTC_HTTP_URL", httpurlList); + /*}*/ + this._export(model, request, response, redirectAttributes,entity.getMenuNameCode(),titleList,classMap,dataMap,noExportMap); + } catch (Exception e) { + logger.error("ip white export failed",e); + addMessage(redirectAttributes, "export_failed"); + } + //return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); + } } diff --git a/src/main/java/com/nis/web/controller/log/ntc/DdosLogController.java b/src/main/java/com/nis/web/controller/log/ntc/DdosLogController.java index 987de3a8c..dc1c0f569 100644 --- a/src/main/java/com/nis/web/controller/log/ntc/DdosLogController.java +++ b/src/main/java/com/nis/web/controller/log/ntc/DdosLogController.java @@ -59,6 +59,9 @@ public class DdosLogController extends BaseController{ params.put("pageNo", page.getPageNo()); if(entry!=null&&entry.getIsBlock()!=null) { params.put("searchIsBlock", entry.getIsBlock()); + }else { + entry.setIsBlock(1);//默认保护ddos日志 + params.put("searchIsBlock", entry.getIsBlock()); } //查询值判断 initLogSearchValue(entry,params); diff --git a/src/main/java/com/nis/web/dao/configuration/DdosCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/DdosCfgDao.xml index be87cebb6..ccaa2dc56 100644 --- a/src/main/java/com/nis/web/dao/configuration/DdosCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/DdosCfgDao.xml @@ -34,6 +34,9 @@ + + + @@ -42,7 +45,7 @@ ,r.is_valid,r.is_audit,r.creator_id,r.create_time,r.editor_id ,r.edit_time,r.auditor_id,r.audit_time,r.service_id,r.request_id, r.compile_id,r.is_area_effective,r.classify,r.attribute,r.lable - ,r.area_effective_ids,r.function_id,r.cfg_region_code + ,r.area_effective_ids,r.function_id,r.cfg_region_code,r.antiddos_protocol,r.bps_threadshold,r.pps_threadshold + + + + + + +
+ + +
+
+ +
+ +
+
+
+
+ +
+
+
+ +
+ +
+
+
+
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp index f228c308b..16bf91534 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appPolicyCfgList.jsp @@ -160,7 +160,7 @@
- +
diff --git a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp index 48781c7f3..258c106df 100644 --- a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp @@ -164,7 +164,7 @@
- +
diff --git a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp index b3165bca4..92f8354f4 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgForm.jsp @@ -20,6 +20,10 @@ $(function(){ $(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error); }, submitHandler: function(form){ + if(($("#antiddosProtocol").val()!="")&&(!($("#bpsThreadshold").val().trim()>0)&&!($("#ppsThreadshold").val().trim()>0))){ + top.$.jBox.tip("", ""); + return; + } loading('onloading...'); form.submit(); }, diff --git a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp index d7e5a7c38..61e8d98bf 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp @@ -307,6 +307,9 @@ + + + @@ -373,6 +376,9 @@ + ${cfg.antiddosProtocol } + ${cfg.bpsThreadshold } + ${cfg.ppsThreadshold } ${cfg.requestName } diff --git a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp index 40cb5214a..557ab6e57 100644 --- a/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/encryptedtunnelbehav/list.jsp @@ -161,7 +161,7 @@
- +
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 c1f0bebfe..14e5c3baf 100644 --- a/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/fileTransfer/ftpList.jsp @@ -172,6 +172,7 @@ +
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 15db80da6..22f30c464 100644 --- a/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp @@ -169,6 +169,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 d4de293de..728ab4e17 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/dnsList.jsp @@ -168,6 +168,7 @@ +
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 2b379aead..3197fce98 100644 --- a/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/website/httpList.jsp @@ -324,9 +324,9 @@
- + - <%-- --%> +
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 d5dab3e75..5d21fb660 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/domainList.jsp @@ -168,6 +168,7 @@ +
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 ce5c52e09..b4f59f3a6 100644 --- a/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/whitelist/ipList.jsp @@ -167,6 +167,7 @@ +
diff --git a/src/main/webapp/WEB-INF/views/dashboard/dashBoardIndex.jsp b/src/main/webapp/WEB-INF/views/dashboard/dashBoardIndex.jsp index 6fb0fbf28..b868e99e9 100644 --- a/src/main/webapp/WEB-INF/views/dashboard/dashBoardIndex.jsp +++ b/src/main/webapp/WEB-INF/views/dashboard/dashBoardIndex.jsp @@ -197,7 +197,7 @@   
-
+
@@ -637,7 +637,7 @@ function systemList(){ $("#tbodyData1").prepend("No Data"); } //终端图-操作系统 - echart_2(rs); + echart_2(rs.reverse()); } }, }); @@ -655,7 +655,7 @@ function osClick(osType,obj){ dataType:"json", cache:false,async:true, success:function (rs) { - echart_5(rs); + echart_5(rs.reverse()); }, }); } @@ -670,7 +670,7 @@ function bsClick(bsType,obj){ dataType:"json", cache:false,async:true, success:function (rs) { - echart_2(rs); + echart_2(rs.reverse()); }, }); } @@ -728,7 +728,7 @@ function browserList() { $("#tbodyData1").prepend("No Data"); } //终端图-浏览器 - echart_5(rs); + echart_5(rs.reverse()); } }, }); @@ -782,7 +782,7 @@ function websiteList() { $("#tbodyData2").prepend("No Data"); } //网站统计图 - echart_4(rs); + echart_4(rs.reverse()); } }, }); @@ -800,7 +800,7 @@ function webClick(websiteServiceId,obj){ dataType:"json", cache:false,async:true, success:function (rs) { - echart_6(rs); + echart_6(rs.reverse()); }, }); } 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 4ba9e7039..e901cd654 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 @@ -237,6 +237,13 @@ jQuery.validator.addMethod("protocolPort",function(value, element) { var protocolElement=$("[name='"+name.replace("destPort","protocol")+"']"); protocolVal=protocolElement.val(); } + //端口/掩码格式 + if(srcPortVal&&srcPortVal.indexOf("/")>-1){ + srcPortVal=srcPortVal.split("/")[0]; + } + if(destPortVal&&destPortVal.indexOf("/")>-1){ + destPortVal=destPortVal.split("/")[0]; + } if(protocolVal==0){ return true; }else if((protocolVal!=tcp&&protocolVal!=udp&&srcPortVal>0)||(protocolVal!=tcp&&protocolVal!=udp&&destPortVal>0)){ @@ -276,13 +283,13 @@ jQuery.validator.addMethod("ipCheck",function(value, element) { var srcIpIsHidden=srcIpAddressE.is(":hidden"); var destIpIsHidden=destIpAddressE.is(":hidden"); var IPv4RangeDefault="0.0.0.0-0.0.0.0"; - /*if(ipPattern==1){//ip/掩码格式 + if(ipPattern==1){//ip/掩码格式 srcIpAddress=srcIpAddress.indexOf("/") >-1 ?srcIpAddress.split("/")[0] : srcIpAddress; destIpAddress=destIpAddress.indexOf("/") >-1 ?destIpAddress.split("/")[0] : destIpAddress; }else if (ipPattern==2){ srcIpAddress=srcIpAddress.indexOf("-") >-1 ?srcIpAddress.split("-")[0] : srcIpAddress; destIpAddress=destIpAddress.indexOf("-") >-1 ?destIpAddress.split("-")[0] : destIpAddress; - }*/ + } if(srcIpIsHidden){ if((srcIpAddress == destIpAddress)){ $.validator.messages.ipCheck=$.validator.messages.destIpIsNotValue+destIpAddress; diff --git a/src/main/webapp/static/global/scripts/common.js b/src/main/webapp/static/global/scripts/common.js index 28969d073..0a1814252 100644 --- a/src/main/webapp/static/global/scripts/common.js +++ b/src/main/webapp/static/global/scripts/common.js @@ -1,7 +1,7 @@ $(function(){ //增加描述新增时的文字长度限制 $("form input[name='cfgDesc']").attr("maxlength","128"); - $("form input[name$='cfgKeywords']").attr("maxlength","2048"); + $("form input[name$='cfgKeywords']").attr("maxlength","1024"); //截取过长的文字 使用id选择器;例如:tab对象->tr->td对象. 排除日志table .logTb $("#contentTable").not(".logTb").find("td").each(function(i){ //获取td当前对象的文本,如果长度大于25;