diff --git a/src/main/java/com/nis/domain/configuration/AppDomainCfg.java b/src/main/java/com/nis/domain/configuration/AppDomainCfg.java index 30e24f777..f0db9a873 100644 --- a/src/main/java/com/nis/domain/configuration/AppDomainCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppDomainCfg.java @@ -28,7 +28,7 @@ public class AppDomainCfg extends BaseCfg { @Expose private Integer compileId; @Expose - private Integer ratelimit; + private String ratelimit; private Integer appCode;//specific_service_cfg表一级节点的spec_service_code private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code private Integer specServiceId; @@ -92,11 +92,11 @@ public class AppDomainCfg extends BaseCfg { return tableName; } - public Integer getRatelimit() { + public String getRatelimit() { return ratelimit; } - public void setRatelimit(Integer ratelimit) { + public void setRatelimit(String ratelimit) { this.ratelimit = ratelimit; } public Integer getAppCode() { diff --git a/src/main/java/com/nis/domain/configuration/AppHeaderCfg.java b/src/main/java/com/nis/domain/configuration/AppHeaderCfg.java index f33e086f6..ede2b6489 100644 --- a/src/main/java/com/nis/domain/configuration/AppHeaderCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppHeaderCfg.java @@ -27,7 +27,7 @@ public class AppHeaderCfg extends BaseCfg { @Expose private Integer compileId; @Expose - private Integer ratelimit; + private String ratelimit; private Integer appCode;//specific_service_cfg表一级节点的spec_service_code private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code private Integer specServiceId; @@ -92,11 +92,11 @@ public class AppHeaderCfg extends BaseCfg { return tableName; } - public Integer getRatelimit() { + public String getRatelimit() { return ratelimit; } - public void setRatelimit(Integer ratelimit) { + public void setRatelimit(String ratelimit) { this.ratelimit = ratelimit; } public Integer getAppCode() { diff --git a/src/main/java/com/nis/domain/configuration/AppHttpCfg.java b/src/main/java/com/nis/domain/configuration/AppHttpCfg.java index 5f775cd35..61b60d52b 100644 --- a/src/main/java/com/nis/domain/configuration/AppHttpCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppHttpCfg.java @@ -28,7 +28,7 @@ public class AppHttpCfg extends BaseCfg { @Expose private Integer compileId; @Expose - private Integer ratelimit; + private String ratelimit; private Integer appCode;//specific_service_cfg表一级节点的spec_service_code private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code private Integer specServiceId; @@ -93,11 +93,11 @@ public class AppHttpCfg extends BaseCfg { return tableName; } - public Integer getRatelimit() { + public String getRatelimit() { return ratelimit; } - public void setRatelimit(Integer ratelimit) { + public void setRatelimit(String ratelimit) { this.ratelimit = ratelimit; } public Integer getAppCode() { diff --git a/src/main/java/com/nis/domain/configuration/AppInnerRuleCfg.java b/src/main/java/com/nis/domain/configuration/AppInnerRuleCfg.java index 44ca43c9e..1f9cf9981 100644 --- a/src/main/java/com/nis/domain/configuration/AppInnerRuleCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppInnerRuleCfg.java @@ -28,7 +28,7 @@ public class AppInnerRuleCfg extends BaseCfg { @Expose private Integer compileId; @Expose - private Integer ratelimit; + private String ratelimit; private Integer appCode;//specific_service_cfg表一级节点的spec_service_code private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code private Integer specServiceId; @@ -92,11 +92,11 @@ public class AppInnerRuleCfg extends BaseCfg { return tableName; } - public Integer getRatelimit() { + public String getRatelimit() { return ratelimit; } - public void setRatelimit(Integer ratelimit) { + public void setRatelimit(String ratelimit) { this.ratelimit = ratelimit; } public Integer getAppCode() { diff --git a/src/main/java/com/nis/domain/configuration/AppIpCfg.java b/src/main/java/com/nis/domain/configuration/AppIpCfg.java index 921aaaf66..22e93fefe 100644 --- a/src/main/java/com/nis/domain/configuration/AppIpCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppIpCfg.java @@ -20,7 +20,7 @@ public class AppIpCfg extends BaseCfg { @Expose private Integer compileId; @Expose - private Integer ratelimit; + private String ratelimit; private Integer appCode;//specific_service_cfg表一级节点的spec_service_code private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code private Integer specServiceId; @@ -213,11 +213,11 @@ public class AppIpCfg extends BaseCfg { return tableName; } - public Integer getRatelimit() { + public String getRatelimit() { return ratelimit; } - public void setRatelimit(Integer ratelimit) { + public void setRatelimit(String ratelimit) { this.ratelimit = ratelimit; } public Integer getAppCode() { diff --git a/src/main/java/com/nis/domain/configuration/AppPolicyCfg.java b/src/main/java/com/nis/domain/configuration/AppPolicyCfg.java index 2873bfd98..a2dfa5366 100644 --- a/src/main/java/com/nis/domain/configuration/AppPolicyCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppPolicyCfg.java @@ -34,7 +34,7 @@ public class AppPolicyCfg extends BaseCfg { @Expose private Integer compileId; @Expose - private Integer ratelimit; + private String ratelimit; private Integer appCode;//specific_service_cfg表一级节点的spec_service_code private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code private Integer specServiceId; @@ -145,11 +145,11 @@ public class AppPolicyCfg extends BaseCfg { return tableName; } - public Integer getRatelimit() { + public String getRatelimit() { return ratelimit; } - public void setRatelimit(Integer ratelimit) { + public void setRatelimit(String ratelimit) { this.ratelimit = ratelimit; } public Integer getAppCode() { diff --git a/src/main/java/com/nis/domain/configuration/AppSslCertCfg.java b/src/main/java/com/nis/domain/configuration/AppSslCertCfg.java index 0d4af4a17..ecc4d1510 100644 --- a/src/main/java/com/nis/domain/configuration/AppSslCertCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppSslCertCfg.java @@ -27,7 +27,7 @@ public class AppSslCertCfg extends BaseCfg { @Expose private Integer compileId; @Expose - private Integer ratelimit; + private String ratelimit; private Integer appCode;//specific_service_cfg表一级节点的spec_service_code private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code private Integer specServiceId; @@ -92,11 +92,11 @@ public class AppSslCertCfg extends BaseCfg { return tableName; } - public Integer getRatelimit() { + public String getRatelimit() { return ratelimit; } - public void setRatelimit(Integer ratelimit) { + public void setRatelimit(String ratelimit) { this.ratelimit = ratelimit; } public Integer getAppCode() { diff --git a/src/main/java/com/nis/domain/configuration/AppStringCfg.java b/src/main/java/com/nis/domain/configuration/AppStringCfg.java index f61ef011e..1c55cd66f 100644 --- a/src/main/java/com/nis/domain/configuration/AppStringCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppStringCfg.java @@ -30,7 +30,7 @@ public class AppStringCfg extends BaseStringCfg { @Expose private Integer compileId; @Expose - private Integer ratelimit; + private String ratelimit; /* (non-Javadoc) * @see com.nis.domain.configuration.BaseCfg#initDefaultValue() @@ -53,11 +53,11 @@ public class AppStringCfg extends BaseStringCfg { return tableName; } - public Integer getRatelimit() { + public String getRatelimit() { return ratelimit; } - public void setRatelimit(Integer ratelimit) { + public void setRatelimit(String ratelimit) { this.ratelimit = ratelimit; } diff --git a/src/main/java/com/nis/domain/configuration/AppTcpCfg.java b/src/main/java/com/nis/domain/configuration/AppTcpCfg.java index 40270b491..37bd61bfc 100644 --- a/src/main/java/com/nis/domain/configuration/AppTcpCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppTcpCfg.java @@ -27,7 +27,7 @@ public class AppTcpCfg extends BaseCfg { @Expose private Integer compileId; @Expose - private Integer ratelimit; + private String ratelimit; private Integer appCode;//specific_service_cfg表一级节点的spec_service_code private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code private Integer specServiceId; @@ -121,11 +121,11 @@ public class AppTcpCfg extends BaseCfg { return tableName; } - public Integer getRatelimit() { + public String getRatelimit() { return ratelimit; } - public void setRatelimit(Integer ratelimit) { + public void setRatelimit(String ratelimit) { this.ratelimit = ratelimit; } public Integer getAppCode() { diff --git a/src/main/java/com/nis/domain/configuration/AppTopicDomainCfg.java b/src/main/java/com/nis/domain/configuration/AppTopicDomainCfg.java index 9fb349789..105d2b631 100644 --- a/src/main/java/com/nis/domain/configuration/AppTopicDomainCfg.java +++ b/src/main/java/com/nis/domain/configuration/AppTopicDomainCfg.java @@ -26,7 +26,7 @@ public class AppTopicDomainCfg extends BaseCfg { @Expose private Integer compileId; @Expose - private Integer ratelimit; + private String ratelimit; // private Integer appCode;//specific_service_cfg表一级节点的spec_service_code private Integer behavCode;//specific_service_cfg表二级节点的spec_service_code private Integer specServiceId; @@ -101,11 +101,11 @@ public class AppTopicDomainCfg extends BaseCfg { return tableName; } - public Integer getRatelimit() { + public String getRatelimit() { return ratelimit; } - public void setRatelimit(Integer ratelimit) { + public void setRatelimit(String ratelimit) { this.ratelimit = ratelimit; } // public Integer getAppCode() { diff --git a/src/main/java/com/nis/domain/configuration/BaseIpCfg.java b/src/main/java/com/nis/domain/configuration/BaseIpCfg.java index 7e565231f..cc50d83dc 100644 --- a/src/main/java/com/nis/domain/configuration/BaseIpCfg.java +++ b/src/main/java/com/nis/domain/configuration/BaseIpCfg.java @@ -109,20 +109,20 @@ public class BaseIpCfg extends BaseCfg { /** * 限速比例 */ - protected Integer ratelimit ; + protected String ratelimit ; /** * ratelimit * @return ratelimit */ - public Integer getRatelimit() { + public String getRatelimit() { return ratelimit; } /** * @param ratelimit the ratelimit to set */ - public void setRatelimit(Integer ratelimit) { + public void setRatelimit(String ratelimit) { this.ratelimit = ratelimit; } /** diff --git a/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java b/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java index 28208e4ac..994cef81f 100644 --- a/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java +++ b/src/main/java/com/nis/domain/configuration/CfgIndexInfo.java @@ -10,10 +10,6 @@ package com.nis.domain.configuration; import java.util.List; -import com.nis.domain.SysRole; -import com.nis.util.excel.ExcelField; -import com.nis.util.excel.fieldtype.RoleListType; - /** * @ClassName: CfgIndexInfo.java diff --git a/src/main/java/com/nis/domain/configuration/HttpUrlCfg.java b/src/main/java/com/nis/domain/configuration/HttpUrlCfg.java index 17564f535..2fb7b43a9 100644 --- a/src/main/java/com/nis/domain/configuration/HttpUrlCfg.java +++ b/src/main/java/com/nis/domain/configuration/HttpUrlCfg.java @@ -20,19 +20,19 @@ import com.nis.util.Constants; */ public class HttpUrlCfg extends BaseStringCfg { private static final String tableName="http_url_cfg"; - private Integer ratelimit; + private String ratelimit; /** * ratelimit * @return ratelimit */ - public Integer getRatelimit() { + public String getRatelimit() { return ratelimit; } /** * @param ratelimit the ratelimit to set */ - public void setRatelimit(Integer ratelimit) { + public void setRatelimit(String ratelimit) { this.ratelimit = ratelimit; } /** diff --git a/src/main/java/com/nis/domain/configuration/template/IpAddrTemplate.java b/src/main/java/com/nis/domain/configuration/template/IpAddrTemplate.java index d3e48df2f..91417546c 100644 --- a/src/main/java/com/nis/domain/configuration/template/IpAddrTemplate.java +++ b/src/main/java/com/nis/domain/configuration/template/IpAddrTemplate.java @@ -22,7 +22,7 @@ public class IpAddrTemplate extends IpCfgTemplate { } @Override - public Integer getRatelimit() { + public String getRatelimit() { // TODO Auto-generated method stub return super.getRatelimit(); } diff --git a/src/main/java/com/nis/domain/configuration/template/IpCfgTemplate.java b/src/main/java/com/nis/domain/configuration/template/IpCfgTemplate.java index caaf60321..dd08bbfe9 100644 --- a/src/main/java/com/nis/domain/configuration/template/IpCfgTemplate.java +++ b/src/main/java/com/nis/domain/configuration/template/IpCfgTemplate.java @@ -44,7 +44,7 @@ public class IpCfgTemplate { private String attributeName;//18 private String lableName;//19 private String areaEffectiveIds;//20 - private Integer ratelimit;//21 + private String ratelimit;//21 private Integer dnsStrategyId;//22 private Integer irType;//23 private String userRegion1;//77 @@ -128,13 +128,13 @@ public class IpCfgTemplate { * @return ratelimit */ @ExcelField(title="ratelimit",align=2,sort=74) - public Integer getRatelimit() { + public String getRatelimit() { return ratelimit; } /** * @param ratelimit the ratelimit to set */ - public void setRatelimit(Integer ratelimit) { + public void setRatelimit(String ratelimit) { this.ratelimit = ratelimit; } /** diff --git a/src/main/java/com/nis/domain/configuration/template/IpMultiplexPolicyTemplate.java b/src/main/java/com/nis/domain/configuration/template/IpMultiplexPolicyTemplate.java index 29ba68dc0..06e489d15 100644 --- a/src/main/java/com/nis/domain/configuration/template/IpMultiplexPolicyTemplate.java +++ b/src/main/java/com/nis/domain/configuration/template/IpMultiplexPolicyTemplate.java @@ -28,7 +28,7 @@ public class IpMultiplexPolicyTemplate extends IpCfgTemplate { } @Override - public Integer getRatelimit() { + public String getRatelimit() { // TODO Auto-generated method stub return super.getRatelimit(); } diff --git a/src/main/java/com/nis/domain/configuration/template/IpsecTemplate.java b/src/main/java/com/nis/domain/configuration/template/IpsecTemplate.java index de667fa22..c4515e7c4 100644 --- a/src/main/java/com/nis/domain/configuration/template/IpsecTemplate.java +++ b/src/main/java/com/nis/domain/configuration/template/IpsecTemplate.java @@ -22,7 +22,7 @@ public class IpsecTemplate extends IpCfgTemplate { } @Override - public Integer getRatelimit() { + public String getRatelimit() { // TODO Auto-generated method stub return super.getRatelimit(); } diff --git a/src/main/java/com/nis/domain/configuration/template/TunnelIpTemplate.java b/src/main/java/com/nis/domain/configuration/template/TunnelIpTemplate.java index 277564871..b94bc7841 100644 --- a/src/main/java/com/nis/domain/configuration/template/TunnelIpTemplate.java +++ b/src/main/java/com/nis/domain/configuration/template/TunnelIpTemplate.java @@ -22,7 +22,7 @@ public class TunnelIpTemplate extends IpCfgTemplate { } @Override - public Integer getRatelimit() { + public String getRatelimit() { // TODO Auto-generated method stub return super.getRatelimit(); } diff --git a/src/main/java/com/nis/domain/configuration/template/WhiteListIpTemplate.java b/src/main/java/com/nis/domain/configuration/template/WhiteListIpTemplate.java index 910b77bb1..337f0413c 100644 --- a/src/main/java/com/nis/domain/configuration/template/WhiteListIpTemplate.java +++ b/src/main/java/com/nis/domain/configuration/template/WhiteListIpTemplate.java @@ -57,7 +57,7 @@ public class WhiteListIpTemplate extends IpCfgTemplate { } @Override - public Integer getRatelimit() { + public String getRatelimit() { // TODO Auto-generated method stub return super.getRatelimit(); } diff --git a/src/main/java/com/nis/domain/log/SearchReport.java b/src/main/java/com/nis/domain/log/SearchReport.java index c99242112..de1798739 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 String services;//service日志总量统计使用 private Integer reportType;//小时报,日报,月报 //标签,性质,来文函号,境内源Ip,各国目的IP,运营商局点 private String reportBusinessType; @@ -50,6 +51,13 @@ public class SearchReport extends BaseEntity{ //界面查询的时间 private String reportTime; + + public String getServices() { + return services; + } + public void setServices(String services) { + this.services = services; + } /** * reportStartTime * @return reportStartTime diff --git a/src/main/java/com/nis/domain/report/NtcPzReport.java b/src/main/java/com/nis/domain/report/NtcPzReport.java index 5c864e6a1..d53f89a77 100644 --- a/src/main/java/com/nis/domain/report/NtcPzReport.java +++ b/src/main/java/com/nis/domain/report/NtcPzReport.java @@ -25,21 +25,14 @@ public class NtcPzReport extends BaseReport{ */ private static final long serialVersionUID = 7079305499220977782L; - private Long configId; + private Long cfgId; private Date statTime; - /** - * configId - * @return configId - */ - public Long getConfigId() { - return configId; + public Long getCfgId() { + return cfgId; } - /** - * @param configId the configId to set - */ - public void setConfigId(Long configId) { - this.configId = configId; + public void setCfgId(Long cfgId) { + this.cfgId = cfgId; } /** * statTime diff --git a/src/main/java/com/nis/web/controller/BaseController.java b/src/main/java/com/nis/web/controller/BaseController.java index 08cd1bc25..900c541ce 100644 --- a/src/main/java/com/nis/web/controller/BaseController.java +++ b/src/main/java/com/nis/web/controller/BaseController.java @@ -54,7 +54,6 @@ import com.nis.util.DictUtils; import com.nis.util.JsonMapper; import com.nis.util.StringUtil; import com.nis.util.excel.ExportExcel; -import com.nis.web.dao.configuration.InterceptCfgDao; import com.nis.web.service.ArchiveServcie; import com.nis.web.service.AreaService; import com.nis.web.service.DictService; @@ -1064,13 +1063,18 @@ public class BaseController { } } if("ipratelimit".equals(specialItem)) { - Integer ratelimit=value.getRatelimit(); + String ratelimit=value.getRatelimit(); if(ratelimit==null) { errInfo.append(String.format(prop.getProperty("can_not_null"), prop.getProperty("ratelimit"))+";"); }else { - if(ratelimit.intValue()<0||ratelimit.intValue()>100) { - errInfo.append(prop.getProperty("ratelimit_limit")+";"); + try { + if(Double.parseDouble(ratelimit)<0||Double.parseDouble(ratelimit)>1) { + errInfo.append(String.format(prop.getProperty("is_incorrect"), prop.getProperty("ratelimit_limit"))+";"); + } + }catch (Exception e) { + errInfo.append(String.format(prop.getProperty("is_incorrect"), prop.getProperty("ratelimit_limit"))+";"); } + } } //attribute check end diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java b/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java index 5763bc857..3b08b6883 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/AvController.java @@ -131,9 +131,11 @@ public class AvController extends BaseController { entity.setResultPath(resultFileAllPath); File uploadSrcFile = new File(srcFileAllPath); - File uploadSampleFile = new File(sampleFileAllPath); +// File uploadSampleFile = new File(sampleFileAllPath); FileCopyUtils.copy(srcFile.getBytes(), uploadSrcFile);//保存源文件 - String host = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath(); + entity.setSrcUrl(""); + entity.setSampleUrl(""); + /*String host = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath(); String srcUrl = host+srcFilePath.substring(srcFilePath.indexOf(Constants.AV_FILE_PATH)+Constants.AV_FILE_PATH.length()-1)+sep+uploadSrcFile.getName(); String sampleUrl = host+sampleFilePath.substring(sampleFilePath.indexOf(Constants.AV_FILE_PATH)+Constants.AV_FILE_PATH.length()-1)+sep+uploadSampleFile.getName(); srcUrl = srcUrl.replace("\\", "/"); @@ -141,7 +143,7 @@ public class AvController extends BaseController { logger.info("srcUrl:"+srcUrl); logger.info("sampleUrl:"+sampleUrl); entity.setSrcUrl(srcUrl); - entity.setSampleUrl(sampleUrl); + entity.setSampleUrl(sampleUrl);*/ // File uploadSrcFile = new File(srcFilePath); // FileCopyUtils.copy(srcFile.getBytes(), uploadSrcFile); @@ -209,10 +211,10 @@ public class AvController extends BaseController { entity.setIsValid(isValid); entity.setAuditorId(UserUtils.getUser().getId()); entity.setAuditTime(new Date()); - String oldSrcUrl = entity.getSrcPath(); - String oldSampleUrl = entity.getSamplePath(); +// String oldSrcUrl = entity.getSrcPath(); +// String oldSampleUrl = entity.getSamplePath(); try { - if(isAudit==1){ + /*if(isAudit==1){ Date creatTime = entity.getCreateTime(); //音视频文件上传接口调用 File srcFile = new File(oldSrcUrl); @@ -254,15 +256,15 @@ public class AvController extends BaseController { // entity.setSamplePath(""); } - } + }*/ avCfgService.auditAvFileSample(entity,isAudit); //删除本地源文件和样例文件 - if(!oldSrcUrl.equals(entity.getSrcUrl())){ + /*if(!oldSrcUrl.equals(entity.getSrcUrl())){ FileUtils.deleteFile(oldSrcUrl); } if(!oldSampleUrl.equals(entity.getSampleUrl())){ FileUtils.deleteFile(oldSampleUrl); - } + }*/ }catch(Exception e){ e.printStackTrace(); if(e instanceof MaatConvertException) { diff --git a/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java b/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java index d5696f3ac..3af0f780f 100644 --- a/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java +++ b/src/main/java/com/nis/web/controller/configuration/ntc/IpController.java @@ -1,10 +1,13 @@ package com.nis.web.controller.configuration.ntc; +import java.util.ArrayList; +import java.util.Date; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.lang3.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; @@ -15,15 +18,18 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.servlet.mvc.support.RedirectAttributes; +import com.nis.domain.Page; import com.nis.domain.SysDataDictionaryItem; -import com.nis.domain.configuration.BaseIpCfg; +import com.nis.domain.configuration.CfgIndexInfo; import com.nis.domain.configuration.IpPortCfg; +import com.nis.domain.configuration.NtcSubscribeIdCfg; import com.nis.domain.configuration.template.IpAddrTemplate; import com.nis.domain.configuration.template.IpsecTemplate; import com.nis.domain.configuration.template.TunnelIpTemplate; -import com.nis.util.Constants; +import com.nis.exceptions.MaatConvertException; import com.nis.util.DictUtils; import com.nis.web.controller.configuration.CommonController; +import com.nis.web.security.UserUtils; /** * IP相关配置控制类 @@ -35,54 +41,87 @@ import com.nis.web.controller.configuration.CommonController; public class IpController extends CommonController{ @RequestMapping(value = {"list"}) // @RequiresPermissions(value={"iplist:config","iplist:confirm"},logical=Logical.OR) - public String list(String cfgName,Model model,@ModelAttribute("cfg")IpPortCfg cfg,HttpServletRequest request,HttpServletResponse response) { - this._ipList(cfgName, model, cfg, request, response); - model.addAttribute("urlPrefix","/ntc/iplist"); - model.addAttribute("requiresPermissionPrefix","iplist"); - return "/cfg/common/ipList"; + public String list(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) { + Page searchPage=new Page(request,response,"a"); + Page page = ipCfgService.getIpCfgList(searchPage, cfg); + model.addAttribute("page", page); + initPageCondition(model,cfg); + return "/cfg/ipaddr/ipList"; } @RequestMapping(value = {"form"}) @RequiresPermissions(value={"iplist:config"}) - public String form(String cfgName,Model model,String ids,Integer functionId,BaseIpCfg entity) { - this._ipForm(cfgName, model, ids, functionId, entity); - List specialFunctionIdList = DictUtils.getDictList("SPECIAL_FUNCTION_ID"); - String specialFunctionId=null; - for(SysDataDictionaryItem item:specialFunctionIdList) { - if(Integer.parseInt(item.getItemCode())==entity.getFunctionId().intValue()) { - specialFunctionId= item.getItemValue(); - break; - } + public String form(Model model,String ids,CfgIndexInfo entity) { + if(StringUtils.isNotBlank(ids)){ + entity = ipCfgService.getIpPortCfg(Long.parseLong(ids)); + initUpdateFormCondition(model,entity); + }else{ + initFormCondition(model,entity); } - model.addAttribute("dropAction",Constants.DROP_ACTION); - model.addAttribute("urlPrefix","/ntc/iplist"); - model.addAttribute("requiresPermissionPrefix","iplist"); -// if(specialFunctionId!=null && "ipsec".equals(specialFunctionId)) { -// return "/cfg/ipsec/ipForm"; -// }else if(specialFunctionId!=null && "ipaddr".equals(specialFunctionId)) { -// return "/cfg/ipaddr/ipForm"; -// } - return "/cfg/common/ipForm"; + model.addAttribute("_cfg", entity); + return "/cfg/ipaddr/ipForm"; } @RequestMapping(value = {"saveOrUpdate"}) - public String saveOrUpdate(String cfgName,RedirectAttributes model, IpPortCfg cfg) { - this._saveOrUpdateIp(cfgName, model, cfg); - return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+cfg.getFunctionId(); + public String saveOrUpdate(RedirectAttributes model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) { + ipCfgService.saveIpCfg(entity); + return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+entity.getFunctionId(); } - @RequestMapping(value = {"delete"}) + @RequestMapping(value = {"ajaxSubList"}) + public String ajaxIpPortSubList(Model model,Long cfgId,Integer index) { + CfgIndexInfo cfg = ipCfgService.getIpPortCfg(cfgId); + /*List regionList = DictUtils.getFunctionRegionDictList(cfg.getFunctionId()); + model.addAttribute("regionList", regionList);*/ + List tabList = new ArrayList(); + if(cfg.getIpPortList()!=null){ + String cfgType = null; + for(IpPortCfg ip:cfg.getIpPortList()){ + if(!ip.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"1",ip.getCfgType()}); + cfgType = ip.getCfgType(); + } + } + } + if(cfg.getNtcSubscribeIdCfgList()!=null){ + String cfgType = null; + for(NtcSubscribeIdCfg keyword:cfg.getNtcSubscribeIdCfgList()){ + if(!keyword.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"2",keyword.getCfgType()}); + cfgType = keyword.getCfgType(); + } + } + } + model.addAttribute("_cfg", cfg); + model.addAttribute("index", index); + model.addAttribute("tabList", tabList); + return "/cfg/ipaddr/ipSubList"; + } + @RequestMapping(value = {"updateValid"}) @RequiresPermissions("iplist:config") - public String delete(String cfgName,String ids,String compileIds,Integer functionId,RedirectAttributes model) { - this._deleteIp(cfgName, ids, compileIds, functionId, model); - model.addAttribute("urlPrefix","/ntc/iplist"); - model.addAttribute("requiresPermissionPrefix","iplist"); + public String updateIpPortCfgValid(Integer isValid,String ids,Integer functionId) { + ipCfgService.updateIpCfgValid(isValid, ids, functionId); return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+functionId; } + @RequestMapping(value = {"audit"}) @RequiresPermissions("iplist:confirm") - public String audit(String cfgName,String ids,IpPortCfg cfg,RedirectAttributes redirectAttributes) { - this._auditIp(cfgName, ids, cfg, redirectAttributes); - redirectAttributes.addAttribute("urlPrefix","/ntc/iplist"); - redirectAttributes.addAttribute("requiresPermissionPrefix","iplist"); - return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+cfg.getFunctionId(); + public String audit(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) { + CfgIndexInfo entity = new CfgIndexInfo(); + String[] idArray = ids.split(","); + for(String id :idArray){ + entity = ipCfgService.getIpPortCfg(Long.parseLong(id)); + entity.setIsAudit(isAudit); + entity.setIsValid(isValid); + entity.setAuditorId(UserUtils.getUser().getId()); + entity.setAuditTime(new Date()); + entity.setFunctionId(functionId); + try { + ipCfgService.auditIpCfg(entity,isAudit); + } catch (MaatConvertException e) { + e.printStackTrace(); + logger.info("ssl配置下发失败:"+e.getMessage()); + addMessage(redirectAttributes, e.getMessage()); + } + } + return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+functionId; } //ip配置导入 @RequestMapping(value = "import", method=RequestMethod.POST) 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 95d747420..50ab696a6 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 @@ -180,7 +180,7 @@ public class WebsiteController extends BaseController{ @RequestMapping(value = {"saveHttpCfg"}) @RequiresPermissions(value={"website:http:config"}) - public String saveHttpCfg(Model model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) { + public String saveHttpCfg(RedirectAttributes model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) { websiteCfgService.saveHttpCfg(entity); return "redirect:" + adminPath +"/ntc/website/httpList?functionId="+entity.getFunctionId(); } @@ -242,7 +242,7 @@ public class WebsiteController extends BaseController{ } @RequestMapping(value = {"saveSslCfg"}) @RequiresPermissions(value={"website:ssl:config"}) - public String saveSslCfg(Model model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) { + public String saveSslCfg(RedirectAttributes model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) { websiteCfgService.saveSslCfg(entity); return "redirect:" + adminPath +"/ntc/website/sslList?functionId="+entity.getFunctionId(); } @@ -330,7 +330,7 @@ public class WebsiteController extends BaseController{ } @RequestMapping(value = {"saveDnsCfg"}) @RequiresPermissions(value={"website:dns:config"}) - public String saveDnsCfg(Model model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) { + public String saveDnsCfg(RedirectAttributes model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) { websiteCfgService.saveDnsCfg(entity); return "redirect:" + adminPath +"/ntc/website/dnsList?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 b1e23828b..6f9053e26 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 @@ -1,5 +1,6 @@ package com.nis.web.controller.configuration.ntc; +import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -8,7 +9,6 @@ import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; -import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; @@ -19,13 +19,14 @@ import org.springframework.web.multipart.MultipartFile; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import com.nis.domain.Page; -import com.nis.domain.configuration.BaseIpCfg; -import com.nis.domain.configuration.HttpUrlCfg; +import com.nis.domain.configuration.BaseStringCfg; +import com.nis.domain.configuration.CfgIndexInfo; import com.nis.domain.configuration.IpPortCfg; +import com.nis.domain.configuration.NtcSubscribeIdCfg; import com.nis.domain.configuration.template.WhiteListIpTemplate; import com.nis.exceptions.MaatConvertException; -import com.nis.util.Constants; import com.nis.web.controller.configuration.CommonController; +import com.nis.web.security.UserUtils; /** * 白名单 @@ -38,121 +39,145 @@ public class WhiteListController extends CommonController{ @RequestMapping(value = {"ip/list"}) //@RequiresPermissions(value={"whitelist:ip:config","whitelist:ip:confirm","whitelist:ip:aduit"},logical=Logical.OR) - public String ipList(Model model,@ModelAttribute("cfg")IpPortCfg cfg,HttpServletRequest request,HttpServletResponse response) { - cfg.setTableName(IpPortCfg.getTablename()); - Page searchPage=new Page(request,response,"r"); - Page page = ipCfgService.findPage(searchPage, cfg); + public String ipList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) { + Page searchPage=new Page(request,response,"a"); + Page page = ipCfgService.getIpCfgList(searchPage, cfg); model.addAttribute("page", page); initPageCondition(model,cfg); return "/cfg/whitelist/ipList"; } + @RequestMapping(value = {"ajaxIpSubList"}) + public String ajaxIpSubList(Model model,Long cfgId,Integer index) { + CfgIndexInfo cfg = ipCfgService.getIpPortCfg(cfgId); + List tabList = new ArrayList(); + if(cfg.getIpPortList()!=null){ + String cfgType = null; + for(IpPortCfg ip:cfg.getIpPortList()){ + if(!ip.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"1",ip.getCfgType()}); + cfgType = ip.getCfgType(); + } + } + } + if(cfg.getNtcSubscribeIdCfgList()!=null){ + String cfgType = null; + for(NtcSubscribeIdCfg keyword:cfg.getNtcSubscribeIdCfgList()){ + if(!keyword.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"2",keyword.getCfgType()}); + cfgType = keyword.getCfgType(); + } + } + } + model.addAttribute("_cfg", cfg); + model.addAttribute("index", index); + model.addAttribute("tabList", tabList); + return "/cfg/whitelist/ipSubList"; + } + @RequestMapping(value = {"ip/form"}) + @RequiresPermissions(value={"whitelist:ip:config"}) + public String ipForm(Model model,String ids,CfgIndexInfo entity) { + if(StringUtils.isNotBlank(ids)){ + + entity = this.ipCfgService.getIpPortCfg(Long.parseLong(ids)); + initUpdateFormCondition(model,entity); + }else{ + initFormCondition(model,entity); + } + model.addAttribute("_cfg", entity); + return "/cfg/whitelist/ipForm"; + } + @RequestMapping(value = {"ip/save"}) + public String saveIpCfg(RedirectAttributes model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) { + ipCfgService.saveIpCfg(entity); + return "redirect:" + adminPath +"/ntc/whitelist/ip/list?functionId="+entity.getFunctionId(); + } + @RequestMapping(value = {"ip/audit"}) + @RequiresPermissions("whitelist:ip:confirm") + public String auditIp(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) { + CfgIndexInfo entity = new CfgIndexInfo(); + String[] idArray = ids.split(","); + for(String id :idArray){ + entity = ipCfgService.getIpPortCfg(Long.parseLong(id)); + entity.setIsAudit(isAudit); + entity.setIsValid(isValid); + entity.setAuditorId(UserUtils.getUser().getId()); + entity.setAuditTime(new Date()); + entity.setFunctionId(functionId); + try { + ipCfgService.auditIpCfg(entity,isAudit); + } catch (MaatConvertException e) { + e.printStackTrace(); + logger.info("ip配置下发失败:"+e.getMessage()); + addMessage(redirectAttributes, e.getMessage()); + } + } + return "redirect:" + adminPath +"/ntc/whitelist/ip/list?functionId="+entity.getFunctionId(); + } + @RequestMapping(value = {"updateIpValid"}) + @RequiresPermissions(value={"whitelist:ip:config"}) + public String updateIpCfgValid(Integer isValid,String ids,Integer functionId) { + ipCfgService.updateIpCfgValid(isValid,ids,functionId); + return "redirect:" + adminPath +"/ntc/whitelist/ip/list?functionId="+functionId; + } @RequestMapping(value = {"domain/list"}) //@RequiresPermissions(value={"whitelist:domain:config","whitelist:domain:confirm","whitelist:domain:aduit"},logical=Logical.OR) - public String domainList(Model model,@ModelAttribute("cfg")HttpUrlCfg cfg,HttpServletRequest request,HttpServletResponse response) { - cfg.setTableName(HttpUrlCfg.getTablename()); - Page searchPage=new Page(request,response,"r"); - Page page = domainService.findPage(searchPage, cfg); + public String domainList(Model model,@ModelAttribute("cfg")CfgIndexInfo cfg,HttpServletRequest request,HttpServletResponse response) { + Page searchPage=new Page(request,response,"a"); + Page page = domainService.getDomainList(searchPage, cfg); model.addAttribute("page", page); initPageCondition(model,cfg); return "/cfg/whitelist/domainList"; } - @RequestMapping(value = {"ip/form"}) - @RequiresPermissions(value={"whitelist:ip:config"}) - public String ipForm(Model model,String ids,BaseIpCfg entity) { - if(StringUtils.isNotBlank(ids)){ - entity = ipCfgService.getIpCfgById(IpPortCfg.getTablename(),Long.parseLong(ids)); - } - initFormCondition(model,entity); - if(entity.getCfgId()!=null){ - model.addAttribute("_cfg", entity); - }else{ - IpPortCfg cfg=new IpPortCfg(); - cfg.initDefaultValueImpl(); - cfg.setFunctionId(entity.getFunctionId()); - cfg.setProtocolId(entity.getProtocolId()); - model.addAttribute("_cfg", cfg); - } - - return "/cfg/whitelist/ipForm"; - } + @RequestMapping(value = {"domain/form"}) @RequiresPermissions(value={"whitelist:domain:config"}) - public String domainForm(Model model,String ids,HttpUrlCfg entity) { + public String domainForm(Model model,String ids,CfgIndexInfo entity) { if(StringUtils.isNotBlank(ids)){ - entity = domainService.getStringCfgById(Long.parseLong(ids)); - } - initFormCondition(model,entity); - if(entity.getCfgId()!=null){ - model.addAttribute("_cfg", entity); + entity = domainService.getDomainCfg(Long.parseLong(ids)); + initUpdateFormCondition(model,entity); }else{ - HttpUrlCfg cfg=new HttpUrlCfg(); - cfg.initDefaultValue(); - cfg.setFunctionId(entity.getFunctionId()); - model.addAttribute("_cfg", cfg); + initFormCondition(model,entity); } - + model.addAttribute("_cfg", entity); return "/cfg/whitelist/domainForm"; } - @RequestMapping(value = {"ip/saveOrUpdate"}) - public String saveOrUpdateIp(RedirectAttributes model, IpPortCfg cfg) { - cfg.setTableName(IpPortCfg.getTablename()); - logger.info("saveOrUpdateIp loaded"); - try{ - Date date=new Date(); - cfg.setIsValid(Constants.VALID_NO); - cfg.setIsAudit(Constants.AUDIT_NOT_YET); - if(cfg.getCfgId()==null){//新增 - cfg.setCreatorId(cfg.getCurrentUser().getId()); - cfg.setCreateTime(date); - ipCfgService.addIpCfg(cfg); - }else{//修改 - cfg.setEditorId(cfg.getCurrentUser().getId()); - cfg.setEditTime(new Date()); - ipCfgService.updateIpCfg(cfg); - } - addMessage(model,"save_success"); - }catch(Exception e){ - logger.error("保存失败",e); - addMessage(model,"save_failed"); - } - return "redirect:" + adminPath +"/ntc/whitelist/ip/list?functionId="+cfg.getFunctionId(); + @RequestMapping(value = {"domain/save"}) + public String saveOrUpdateDomain(RedirectAttributes model,HttpServletRequest request,HttpServletResponse response,String ids,CfgIndexInfo entity) { + domainService.saveDomainCfg(entity); + return "redirect:" + adminPath +"/ntc/whitelist/domain/list?functionId="+entity.getFunctionId(); } - @RequestMapping(value = {"domain/saveOrUpdate"}) - public String saveOrUpdateDomain(RedirectAttributes model, HttpUrlCfg cfg) { - cfg.setTableName(HttpUrlCfg.getTablename()); - logger.info("saveOrUpdateIp loaded"); - try{ - Date date=new Date(); - cfg.setIsValid(Constants.VALID_NO); - cfg.setIsAudit(Constants.AUDIT_NOT_YET); - if(cfg.getCfgId()==null){//新增 - cfg.setCreatorId(cfg.getCurrentUser().getId()); - cfg.setCreateTime(date); - domainService.addStringCfg(cfg); - }else{//修改 - cfg.setEditorId(cfg.getCurrentUser().getId()); - cfg.setEditTime(new Date()); - domainService.updateStringCfg(cfg); - } - addMessage(model,"save_success"); - }catch(Exception e){ - logger.error("保存失败",e); - addMessage(model,"save_failed"); + @RequestMapping(value = {"domain/ajaxSubList"}) + public String ajaxDomainSubList(Model model,Long cfgId,Integer index) { + CfgIndexInfo cfg = domainService.getDomainCfg(cfgId); + List tabList = new ArrayList(); + if(cfg.getHttpUrlList()!=null){ + String cfgType = null; + for(BaseStringCfg keyword:cfg.getHttpUrlList()){ + if(!keyword.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"2",keyword.getCfgType()}); + cfgType = keyword.getCfgType(); + } + } } - return "redirect:" + adminPath +"/ntc/whitelist/domain/list?functionId="+cfg.getFunctionId(); + if(cfg.getNtcSubscribeIdCfgList()!=null){ + String cfgType = null; + for(NtcSubscribeIdCfg keyword:cfg.getNtcSubscribeIdCfgList()){ + if(!keyword.getCfgType().equals(cfgType)){ + tabList.add(new String[]{"2",keyword.getCfgType()}); + cfgType = keyword.getCfgType(); + } + } + } + model.addAttribute("_cfg", cfg); + model.addAttribute("index", index); + model.addAttribute("tabList", tabList); + return "/cfg/whitelist/domianSubList"; } - - @RequestMapping(value = {"ip/delete"}) - @RequiresPermissions("whitelist:ip:config") - public String deleteIp(String ids,Integer functionId,RedirectAttributes model) { - try{ - ipCfgService.deleteIp(ids,null,functionId.intValue()); - addMessage(model,"delete_success"); - }catch(Exception e){ - logger.error("删除失败", e); - addMessage(model,"delete_failed"); - } - return "redirect:" + adminPath +"/ntc/whitelist/ip/list?functionId="+functionId; + @RequestMapping(value = {"domain/updateValid"}) + @RequiresPermissions(value={"whitelist:domain:config"}) + public String updateDomainValid(Integer isValid,String ids,Integer functionId) { + domainService.updateDomainCfgValid(isValid,ids,functionId); + return "redirect:" + adminPath +"/ntc/whitelist/domain/list?functionId="+functionId; } @RequestMapping(value = {"domain/delete"}) @RequiresPermissions("whitelist:domain:config") @@ -166,58 +191,28 @@ public class WhiteListController extends CommonController{ } return "redirect:" + adminPath +"/ntc/whitelist/domain/list?functionId="+functionId; } - @RequestMapping(value = {"ip/audit"}) - @RequiresPermissions("whitelist:ip:confirm") - public String auditIp(String ids,IpPortCfg cfg,RedirectAttributes redirectAttributes) { - try{ - for(String id:ids.split(",")){ - Long.parseLong(id); - } - List beans=ipCfgService.getListByCfgId(IpPortCfg.getTablename(),cfg.getFunctionId().intValue(),ids); - Date date=new Date(); - for(BaseIpCfg bean:beans){ - bean.setTableName(IpPortCfg.getTablename()); - bean.setAuditorId(bean.getCurrentUser().getId()); - bean.setAuditTime(date); - bean.setIsAudit(cfg.getIsAudit()); - bean.setIsValid(cfg.getIsValid()); - ipCfgService.auditWhiteIp(bean); - } - addMessage(redirectAttributes,"audit_success"); - }catch(MaatConvertException e){ - logger.error("审核失败", e); - addMessage(redirectAttributes, e.getMessage()); - }catch(Exception e){ - logger.error("审核失败", e); - addMessage(redirectAttributes, "audit_failed"); - } - return "redirect:" + adminPath +"/ntc/whitelist/ip/list?functionId="+cfg.getFunctionId(); - } + @RequestMapping(value = {"domain/audit"}) @RequiresPermissions("whitelist:domain:confirm") - public String auditDomain(String ids,HttpUrlCfg cfg,RedirectAttributes redirectAttributes) { - try{ - List beans=domainService.getListByCfgId(ids); - Date date=new Date(); - for(HttpUrlCfg bean:beans){ - HttpUrlCfg domain=new HttpUrlCfg(); - BeanUtils.copyProperties(bean, domain); - domain.setTableName(HttpUrlCfg.getTablename()); - domain.setAuditorId(bean.getCurrentUser().getId()); - domain.setAuditTime(date); - domain.setIsAudit(cfg.getIsAudit()); - domain.setIsValid(cfg.getIsValid()); - domainService.auditWhiteDomain(domain); + public String auditDomain(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes) { + CfgIndexInfo entity = new CfgIndexInfo(); + String[] idArray = ids.split(","); + for(String id :idArray){ + entity = domainService.getDomainCfg(Long.parseLong(id)); + entity.setIsAudit(isAudit); + entity.setIsValid(isValid); + entity.setAuditorId(UserUtils.getUser().getId()); + entity.setAuditTime(new Date()); + entity.setFunctionId(functionId); + try { + domainService.auditDomainCfg(entity,isAudit); + } catch (MaatConvertException e) { + e.printStackTrace(); + logger.info("domain配置下发失败:"+e.getMessage()); + addMessage(redirectAttributes, e.getMessage()); } - addMessage(redirectAttributes,"audit_success"); - }catch(MaatConvertException e){ - logger.error("审核失败", e); - addMessage(redirectAttributes, e.getMessage()); - }catch(Exception e){ - logger.error("审核失败", e); - addMessage(redirectAttributes, "audit_failed"); } - return "redirect:" + adminPath +"/ntc/whitelist/domain/list?functionId="+cfg.getFunctionId(); + return "redirect:" + adminPath +"/ntc/whitelist/domain/list?functionId="+functionId; } //ip配置导入 @RequestMapping(value = "ip/import", method=RequestMethod.POST) diff --git a/src/main/java/com/nis/web/controller/report/NtcPzReportController.java b/src/main/java/com/nis/web/controller/report/NtcPzReportController.java index 8ba060a56..a31da3994 100644 --- a/src/main/java/com/nis/web/controller/report/NtcPzReportController.java +++ b/src/main/java/com/nis/web/controller/report/NtcPzReportController.java @@ -50,30 +50,46 @@ import net.sf.json.JsonConfig; public class NtcPzReportController extends BaseController{ @RequestMapping(value="ajaxGetLogTotal",method=RequestMethod.POST) @ResponseBody - public Map ajaxGetLogTotal(Model model,long endTime,int action,Integer functionId,Integer compileId){ - Map data=new HashMap(); + public List> ajaxGetLogTotal(Model model,long endTime,String actions,Integer functionId,String compileIds){ + List> dataList=new ArrayList<>(); SimpleDateFormat sdf=new SimpleDateFormat(Constants.SEARCH_DATEFORMAT); int interval=Constants.LOG_TIME_RANGE; Date endDate=new Date(endTime); Date startDate=new Date(endTime-interval); - int serviceId=0; + String serviceIdsStr=""; + StringBuffer serviceIds=new StringBuffer(); List serviceList=DictUtils.getFunctionServiceDictList(functionId.intValue()); - for(FunctionServiceDict service:serviceList){ - if(service.getAction().intValue()==action){ - serviceId=service.getServiceId().intValue(); - break; + for(String action:actions.split(",")) { + for(FunctionServiceDict service:serviceList){ + if(service.getAction().intValue()==Integer.parseInt(action)){ + serviceIds.append(service.getServiceId().intValue()); + serviceIds.append(","); + } } } - data.put("compileId", compileId.intValue()); - String json=ConfigServiceUtil.getReport(Constants.BUSINESSTYPE_CONFIG, String.valueOf(compileId), String.valueOf(serviceId), sdf.format(startDate), sdf.format(endDate)); + if(serviceIds.toString().endsWith(",")) { + serviceIdsStr=serviceIds.toString().substring(0,serviceIds.toString().lastIndexOf(",")); + } + String json=ConfigServiceUtil.getReport(Constants.BUSINESSTYPE_CONFIG, compileIds, serviceIdsStr, sdf.format(startDate), sdf.format(endDate)); List list=getList(json); - if(list!=null&&list.size()>0){ - data.put("sum",list.get(0).getSum().longValue()); + String[] idArr=compileIds.split(","); + if(list!=null&&(list.size()>0)){ + for(NtcPzReport report:list) { + Map data=new HashMap(); + data.put("compileId", report.getCfgId().longValue()); + data.put("sum",report.getSum().longValue()); + dataList.add(data); + } }else { - data.put("sum", 0); + for(String id:idArr) { + Map data=new HashMap(); + data.put("compileId", id); + data.put("sum",0); + dataList.add(data); + } } - return data; + return dataList; } @RequestMapping("/ntcPzReport") public String list(@ModelAttribute("bean") SearchReport bean,Model model, HttpServletRequest request, HttpServletResponse response) { diff --git a/src/main/java/com/nis/web/controller/report/NtcServiceReportController.java b/src/main/java/com/nis/web/controller/report/NtcServiceReportController.java index 5c2846d3b..d452302aa 100644 --- a/src/main/java/com/nis/web/controller/report/NtcServiceReportController.java +++ b/src/main/java/com/nis/web/controller/report/NtcServiceReportController.java @@ -5,10 +5,12 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Map.Entry; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; @@ -32,17 +34,13 @@ import net.sf.json.JsonConfig; public class NtcServiceReportController extends BaseController { @RequestMapping("/ajaxNtcServiceReport") @ResponseBody - public Map report(@ModelAttribute("bean") SearchReport bean,Model model, HttpServletRequest request, HttpServletResponse response) { - Map datas=new HashMap<>(); + public List> report(@ModelAttribute("bean") SearchReport bean,Model model, HttpServletRequest request, HttpServletResponse response) { + List> datas=new ArrayList>(); 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()); - } - } + StringBuffer serviceId=new StringBuffer(); + if(StringUtils.isNotBlank(bean.getServices())){ + serviceId.append(bean.getServices()); }else{ - StringBuffer serviceId=new StringBuffer(); for(int i=0;i data=getList(json); + Map dataMap=new HashMap<>(); for(NtcServiceReport report:data){ - if(datas.containsKey(report.getService().toString())){ - datas.put(report.getService().toString(), datas.get(report.getService().toString())+report.getSum().longValue()); + if(dataMap.containsKey(report.getService())){ + dataMap.put(report.getService(), dataMap.get(report.getService())+report.getSum().longValue()); }else{ - datas.put(report.getService().toString(),report.getSum().longValue()); + dataMap.put(report.getService(),report.getSum().longValue()); } } + for(Entry e:dataMap.entrySet()) { + Map _data=new HashMap<>(); + _data.put("service", e.getKey()); + _data.put("sum", e.getValue()); + datas.add(_data); + } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); diff --git a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.java b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.java index 26307a96e..a5d4f8037 100644 --- a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.java +++ b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.java @@ -93,4 +93,5 @@ public interface AppCfgDao { public void auditCfg(BaseCfg entity); //修改配置状态 public void updateCfgValid(BaseCfg entity); + public void deleteSubscribeIdCfg(AppPolicyCfg entity); } diff --git a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml index 309954269..675f3b7ee 100644 --- a/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AppCfgDao.xml @@ -27,7 +27,7 @@ - + @@ -69,7 +69,7 @@ - + @@ -102,7 +102,7 @@ - + @@ -133,7 +133,7 @@ - + @@ -164,7 +164,7 @@ - + @@ -195,7 +195,7 @@ - + @@ -226,7 +226,7 @@ - + @@ -292,7 +292,7 @@ - + @@ -324,7 +324,7 @@ - + @@ -352,11 +352,8 @@ - - - - + @@ -366,7 +363,7 @@ 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.RATELIMIT,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE, - r.low_boundary,r.up_boundary as upBoundary,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN,r.do_log + r.low_boundary,r.up_boundary as upBoundary,r.do_log @@ -435,7 +432,7 @@ #{auditorId,jdbcType=INTEGER},#{auditTime,jdbcType=TIMESTAMP},#{serviceId,jdbcType=INTEGER}, #{requestId,jdbcType=INTEGER},#{compileId,jdbcType=INTEGER},#{isAreaEffective,jdbcType=INTEGER}, #{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR}, - #{areaEffectiveIds,jdbcType=VARCHAR},#{ratelimit,jdbcType=INTEGER},#{functionId,jdbcType=INTEGER}, + #{areaEffectiveIds,jdbcType=VARCHAR},#{ratelimit,jdbcType=VARCHAR},#{functionId,jdbcType=INTEGER}, #{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER} @@ -446,7 +443,7 @@ #{auditorId,jdbcType=INTEGER},#{auditTime,jdbcType=TIMESTAMP},#{serviceId,jdbcType=INTEGER}, #{requestId,jdbcType=INTEGER},#{compileId,jdbcType=INTEGER},#{isAreaEffective,jdbcType=INTEGER}, #{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR}, - #{areaEffectiveIds,jdbcType=VARCHAR},#{ratelimit,jdbcType=INTEGER},#{functionId,jdbcType=INTEGER}, + #{areaEffectiveIds,jdbcType=VARCHAR},#{ratelimit,jdbcType=VARCHAR},#{functionId,jdbcType=INTEGER}, #{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER} @@ -1650,11 +1647,11 @@ CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME, SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY, ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,RATELIMIT,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE, - low_boundary,up_boundary,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG + low_boundary,up_boundary,DO_LOG )values ( , #{lowBoundary,jdbcType=INTEGER},#{upBoundary,jdbcType=INTEGER}, - #{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER},#{doLog,jdbcType=INTEGER} + #{doLog,jdbcType=INTEGER} ) @@ -1951,7 +1948,7 @@ function_id = #{functionId,jdbcType=INTEGER}, - RATELIMIT=#{ratelimit,jdbcType=INTEGER}, + RATELIMIT=#{ratelimit,jdbcType=VARCHAR}, CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}, @@ -2060,7 +2057,7 @@ function_id = #{functionId,jdbcType=INTEGER}, - RATELIMIT=#{ratelimit,jdbcType=INTEGER}, + RATELIMIT=#{ratelimit,jdbcType=VARCHAR}, CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}, @@ -2173,7 +2170,7 @@ function_id = #{functionId,jdbcType=INTEGER}, - RATELIMIT=#{ratelimit,jdbcType=INTEGER}, + RATELIMIT=#{ratelimit,jdbcType=VARCHAR}, CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}, @@ -2274,7 +2271,7 @@ function_id = #{functionId,jdbcType=INTEGER}, - RATELIMIT=#{ratelimit,jdbcType=INTEGER}, + RATELIMIT=#{ratelimit,jdbcType=VARCHAR}, CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}, @@ -2373,7 +2370,7 @@ function_id = #{functionId,jdbcType=INTEGER}, - RATELIMIT=#{ratelimit,jdbcType=INTEGER}, + RATELIMIT=#{ratelimit,jdbcType=VARCHAR}, CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}, @@ -2472,7 +2469,7 @@ function_id = #{functionId,jdbcType=INTEGER}, - RATELIMIT=#{ratelimit,jdbcType=INTEGER}, + RATELIMIT=#{ratelimit,jdbcType=VARCHAR}, CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}, @@ -2584,7 +2581,7 @@ function_id = #{functionId,jdbcType=INTEGER}, - RATELIMIT=#{ratelimit,jdbcType=INTEGER}, + RATELIMIT=#{ratelimit,jdbcType=VARCHAR}, CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}, @@ -2685,7 +2682,7 @@ function_id = #{functionId,jdbcType=INTEGER}, - RATELIMIT=#{ratelimit,jdbcType=INTEGER}, + RATELIMIT=#{ratelimit,jdbcType=VARCHAR}, CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}, @@ -2806,7 +2803,7 @@ function_id = #{functionId,jdbcType=INTEGER}, - RATELIMIT=#{ratelimit,jdbcType=INTEGER}, + RATELIMIT=#{ratelimit,jdbcType=VARCHAR}, CFG_REGION_CODE=#{cfgRegionCode,jdbcType=INTEGER}, @@ -2820,15 +2817,6 @@ up_boundary=#{upBoundary,jdbcType=INTEGER}, - - expr_type=#{exprType,jdbcType=INTEGER}, - - - match_method=#{matchMethod,jdbcType=INTEGER}, - - - is_hexbin=#{isHexbin,jdbcType=INTEGER}, - do_log=#{doLog,jdbcType=INTEGER}, @@ -2840,6 +2828,10 @@ delete from ip_port_cfg where compile_id=#{compileId} and function_id=#{functionId} + + + + delete from ntc_subscribe_id_cfg where compile_id=#{compileId} and function_id=#{functionId} @@ -321,7 +322,7 @@ description,LEVEL,CFG_DESC,ACTION,IS_VALID,IS_AUDIT, CREATOR_ID,CREATE_TIME,EDITOR_ID,EDIT_TIME,AUDITOR_ID,AUDIT_TIME, SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY, - ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,function_id,cfg_type,cfg_region_code + ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,function_id,cfg_type,cfg_region_code,do_log )values ( #{description,jdbcType=VARCHAR},#{level,jdbcType=INTEGER},#{cfgDesc,jdbcType=VARCHAR},#{action,jdbcType=INTEGER}, 0,0,#{creatorId,jdbcType=INTEGER}, @@ -330,7 +331,8 @@ #{requestId,jdbcType=INTEGER},#{compileId,jdbcType=INTEGER},#{isAreaEffective,jdbcType=INTEGER}, #{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR}, #{areaEffectiveIds,jdbcType=VARCHAR},#{functionId,jdbcType=INTEGER}, - #{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER} + #{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER}, + #{doLog,jdbcType=INTEGER} ) @@ -481,6 +483,9 @@ level = #{level,jdbcType=INTEGER}, + + do_log = #{doLog,jdbcType=INTEGER}, + where cfg_id = #{cfgId,jdbcType=BIGINT} diff --git a/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml index 68425b959..ceb889982 100644 --- a/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AvContentCfgDao.xml @@ -122,6 +122,7 @@ + @@ -152,6 +153,7 @@ + @@ -180,13 +182,13 @@ ,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.do_log r.cfg_id,r.cfg_desc,r.cfg_keywords,r.cfg_type, r.action,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.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,r.cfg_region_code + r.expr_type,r.match_method,r.is_hexbin,r.area_effective_ids,r.function_id,r.cfg_region_code,r.do_log SELECT @@ -210,7 +210,7 @@ AND ${page.alias}.CFG_REGION_CODE =#{cfgRegionCode,jdbcType=INTEGER} - AND ${page.alias}.RATELIMIT =#{ratelimit,jdbcType=INTEGER} + AND ${page.alias}.RATELIMIT =#{ratelimit,jdbcType=VARCHAR} @@ -296,7 +296,7 @@ AND r.CFG_REGION_CODE =#{cfgRegionCode,jdbcType=INTEGER} - AND r.RATELIMIT =#{ratelimit,jdbcType=INTEGER} + AND r.RATELIMIT =#{ratelimit,jdbcType=VARCHAR} @@ -427,7 +427,7 @@ cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER}, - ratelimit = #{ratelimit,jdbcType=INTEGER}, + ratelimit = #{ratelimit,jdbcType=VARCHAR}, diff --git a/src/main/java/com/nis/web/dao/configuration/IpCfgDao.java b/src/main/java/com/nis/web/dao/configuration/IpCfgDao.java index 9f3e6ff00..cc42353ba 100644 --- a/src/main/java/com/nis/web/dao/configuration/IpCfgDao.java +++ b/src/main/java/com/nis/web/dao/configuration/IpCfgDao.java @@ -4,7 +4,10 @@ import java.util.List; import org.apache.ibatis.annotations.Param; +import com.nis.domain.configuration.BaseCfg; import com.nis.domain.configuration.BaseIpCfg; +import com.nis.domain.configuration.CfgIndexInfo; +import com.nis.domain.configuration.IpPortCfg; import com.nis.web.dao.CrudDao; import com.nis.web.dao.MyBatisDao; @@ -31,4 +34,16 @@ public interface IpCfgDao extends CrudDao{ public int getIsAudit(BaseIpCfg entity); public int deleteByCompileId(BaseIpCfg entity); public int deleteByCompileIds(@Param("user")long user,@Param("tableName")String tableName,@Param("compileIds")String compileIds); + /******************************new ***********************************/ + + public CfgIndexInfo getCfgIndexInfo(Long id); + public List getIpPortList(CfgIndexInfo entity); + public void saveCfgIndex(CfgIndexInfo entity); + public void saveIpPortCfg(IpPortCfg entity); + public void updateCfgIndex(CfgIndexInfo entity); + public void deleteIpCfg(CfgIndexInfo entity); + public void updateCfgValid(BaseCfg entity); + public void auditCfg(BaseCfg entity); + public List getIpCfgList(CfgIndexInfo entity); + } diff --git a/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml index b5b9e3a01..1afd83ab4 100644 --- a/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/IpCfgDao.xml @@ -34,7 +34,7 @@ - + @@ -43,13 +43,77 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - CFG_ID, CFG_DESC,CFG_REGION_CODE,CFG_TYPE, IP_TYPE, IP_PATTERN, SRC_IP_ADDRESS,DEST_IP_ADDRESS, PORT_PATTERN,SRC_PORT,DEST_PORT, DIRECTION,PROTOCOL,PROTOCOL_ID,ACTION,IS_VALID,IS_AUDIT, @@ -119,7 +183,7 @@ #{auditorId,jdbcType=INTEGER},#{auditTime,jdbcType=TIMESTAMP},#{serviceId,jdbcType=INTEGER}, #{requestId,jdbcType=INTEGER},#{compileId,jdbcType=INTEGER},#{isAreaEffective,jdbcType=INTEGER}, #{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR}, - #{areaEffectiveIds,jdbcType=VARCHAR}, #{functionId,jdbcType=INTEGER}, #{ratelimit,jdbcType=INTEGER}, + #{areaEffectiveIds,jdbcType=VARCHAR}, #{functionId,jdbcType=INTEGER}, #{ratelimit,jdbcType=VARCHAR}, #{dnsStrategyId,jdbcType=INTEGER},#{irType,jdbcType=INTEGER}, #{userRegion1,jdbcType=VARCHAR}, #{userRegion2,jdbcType=VARCHAR}, @@ -127,6 +191,22 @@ #{userRegion4,jdbcType=VARCHAR}, #{userRegion5,jdbcType=VARCHAR} + + + a.CFG_ID,a.CFG_DESC,a.ACTION,a.IS_VALID,a.IS_AUDIT, + a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME, + a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY, + a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.dns_strategy_id,a.user_region1, + a.user_region2,a.user_region3,a.user_region4,a.user_region5,a.do_log + + + a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port + ,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address + ,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id + ,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id, + a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable + ,a.area_effective_ids,a.function_id,a.cfg_region_code + + + + + + + + SELECT LAST_INSERT_ID() + + insert into cfg_index_info( + CFG_DESC, + ACTION, + IS_VALID, + IS_AUDIT, + CREATOR_ID, + CREATE_TIME, + EDITOR_ID, + EDIT_TIME, + AUDITOR_ID, + AUDIT_TIME, + SERVICE_ID, + REQUEST_ID, + COMPILE_ID, + IS_AREA_EFFECTIVE, + CLASSIFY, + ATTRIBUTE, + LABLE, + AREA_EFFECTIVE_IDS, + function_id, + dns_strategy_id, + user_region1, + user_region2, + user_region3, + user_region4, + user_region5, + do_log + )values ( + #{cfgDesc,jdbcType=VARCHAR}, + #{action,jdbcType=INTEGER}, + 0, + 0, + #{creatorId,jdbcType=INTEGER}, + #{createTime,jdbcType=TIMESTAMP}, + #{editorId,jdbcType=INTEGER}, + #{editTime,jdbcType=TIMESTAMP}, + #{auditorId,jdbcType=INTEGER}, + #{auditTime,jdbcType=TIMESTAMP}, + #{serviceId,jdbcType=INTEGER}, + #{requestId,jdbcType=INTEGER}, + #{compileId,jdbcType=INTEGER}, + #{isAreaEffective,jdbcType=INTEGER}, + #{classify,jdbcType=VARCHAR}, + #{attribute,jdbcType=VARCHAR}, + #{lable,jdbcType=VARCHAR}, + #{areaEffectiveIds,jdbcType=VARCHAR}, + #{functionId,jdbcType=INTEGER}, + #{dnsStrategyId,jdbcType=INTEGER}, + #{userRegion1,jdbcType=VARCHAR}, + #{userRegion2,jdbcType=VARCHAR}, + #{userRegion3,jdbcType=VARCHAR}, + #{userRegion4,jdbcType=VARCHAR}, + #{userRegion5,jdbcType=VARCHAR}, + #{doLog,jdbcType=INTEGER} + ) + + + + + SELECT LAST_INSERT_ID() + + insert into ip_port_cfg ( + CFG_DESC, + ACTION, + IS_VALID, + IS_AUDIT, + CREATOR_ID, + CREATE_TIME, + EDITOR_ID, + EDIT_TIME, + AUDITOR_ID, + AUDIT_TIME, + SERVICE_ID, + REQUEST_ID, + COMPILE_ID, + IS_AREA_EFFECTIVE, + CLASSIFY, + ATTRIBUTE, + LABLE, + AREA_EFFECTIVE_IDS, + function_id, + ip_type, + src_ip_address, + ip_pattern, + port_pattern, + src_port, + protocol, + protocol_id, + direction, + dest_port, + dest_ip_address, + cfg_type, + cfg_region_code, + user_region1, + user_region2, + user_region3, + user_region4, + user_region5 + )values ( + #{cfgDesc,jdbcType=VARCHAR}, + #{action,jdbcType=INTEGER}, + 0, + 0, + #{creatorId,jdbcType=INTEGER}, + #{createTime,jdbcType=TIMESTAMP}, + #{editorId,jdbcType=INTEGER}, + #{editTime,jdbcType=TIMESTAMP}, + #{auditorId,jdbcType=INTEGER}, + #{auditTime,jdbcType=TIMESTAMP}, + #{serviceId,jdbcType=INTEGER}, + #{requestId,jdbcType=INTEGER}, + #{compileId,jdbcType=INTEGER}, + #{isAreaEffective,jdbcType=INTEGER}, + #{classify,jdbcType=VARCHAR}, + #{attribute,jdbcType=VARCHAR}, + #{lable,jdbcType=VARCHAR}, + #{areaEffectiveIds,jdbcType=VARCHAR}, + #{functionId,jdbcType=INTEGER}, + #{ipType,jdbcType=INTEGER}, + #{srcIpAddress,jdbcType=VARCHAR}, + #{ipPattern,jdbcType=INTEGER}, + #{portPattern,jdbcType=INTEGER}, + #{srcPort,jdbcType=VARCHAR}, + #{protocol,jdbcType=INTEGER}, + #{protocolId,jdbcType=INTEGER}, + #{direction,jdbcType=INTEGER}, + #{destPort,jdbcType=VARCHAR}, + #{destIpAddress,jdbcType=VARCHAR}, + #{cfgType,jdbcType=VARCHAR}, + #{cfgRegionCode,jdbcType=INTEGER}, + #{userRegion1,jdbcType=VARCHAR}, + #{userRegion2,jdbcType=VARCHAR}, + #{userRegion3,jdbcType=VARCHAR}, + #{userRegion4,jdbcType=VARCHAR}, + #{userRegion5,jdbcType=VARCHAR} + ) + + + update cfg_index_info + + + + cfg_desc = #{cfgDesc,jdbcType=VARCHAR}, + + + action = #{action,jdbcType=INTEGER}, + + + do_log = #{doLog,jdbcType=INTEGER}, + + + is_valid = #{isValid,jdbcType=INTEGER}, + + + is_audit = #{isAudit,jdbcType=INTEGER}, + + + creator_id = #{creatorId,jdbcType=INTEGER}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + editor_id = #{editorId,jdbcType=INTEGER}, + + edit_time = #{editTime,jdbcType=TIMESTAMP}, + + service_id = #{serviceId,jdbcType=INTEGER}, + + + request_id = #{requestId,jdbcType=INTEGER}, + + + is_area_effective = #{isAreaEffective,jdbcType=INTEGER}, + + + classify = #{classify,jdbcType=VARCHAR}, + + + attribute = #{attribute,jdbcType=VARCHAR}, + + + lable = #{lable,jdbcType=VARCHAR}, + + + area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR}, + + + function_id = #{functionId,jdbcType=INTEGER}, + + user_region1 = #{userRegion1,jdbcType=VARCHAR}, + user_region2 = #{userRegion2,jdbcType=VARCHAR}, + user_region3 = #{userRegion3,jdbcType=VARCHAR}, + user_region4 = #{userRegion4,jdbcType=VARCHAR}, + user_region5 = #{userRegion5,jdbcType=VARCHAR}, + dns_strategy_id = #{dnsStrategyId,jdbcType=INTEGER}, + + + where cfg_id = #{cfgId,jdbcType=BIGINT} + + + delete from ip_port_cfg where compile_id=#{compileId} and function_id=#{functionId} + + + update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER}, + editor_id = #{editorId,jdbcType=INTEGER} , + edit_time = #{editTime,jdbcType=TIMESTAMP} + + + AND cfg_id = #{cfgId,jdbcType=BIGINT} + + + AND compile_id = #{compileId,jdbcType=INTEGER} + + and function_id=#{functionId,jdbcType=INTEGER} + + + + update ${tableName} set is_audit = #{isAudit,jdbcType=INTEGER}, + auditor_id = #{auditorId,jdbcType=INTEGER}, + audit_time = #{auditTime,jdbcType=TIMESTAMP} + + ,is_valid = #{isValid,jdbcType=INTEGER} + + + + AND cfg_id = #{cfgId,jdbcType=BIGINT} + + + AND compile_id = #{compileId,jdbcType=INTEGER} + + and function_id=#{functionId,jdbcType=INTEGER} + + + \ No newline at end of file diff --git a/src/main/java/com/nis/web/dao/configuration/StringCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/StringCfgDao.xml index 6fbdc94f0..e61b06a23 100644 --- a/src/main/java/com/nis/web/dao/configuration/StringCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/StringCfgDao.xml @@ -28,7 +28,7 @@ - + @@ -120,7 +120,7 @@ #{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR}, #{exprType,jdbcType=INTEGER},#{matchMethod,jdbcType=INTEGER},#{isHexbin,jdbcType=INTEGER}, #{areaEffectiveIds,jdbcType=VARCHAR},#{functionId,jdbcType=INTEGER},#{cfgRegionCode,jdbcType=INTEGER} - ,#{ratelimit,jdbcType=INTEGER} + ,#{ratelimit,jdbcType=VARCHAR} + + + + + + + + + + <%@include file="/WEB-INF/include/form/ipInfo.jsp" %> <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> diff --git a/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp index 9daad0873..9e53984e5 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/contIp/contIpList.jsp @@ -8,6 +8,8 @@ //搜索框提示语初始化 if("${cfg.cfgDesc}"){ $("#intype").val("${cfg.cfgDesc}"); + }else if("${cfg.compileId}"){ + $("#intype").val("${cfg.compileId}"); }else if("${cfg.srcIpAddress}"){ $("#intype").val("${cfg.srcIpAddress}"); }else if("${cfg.srcPort}"){ @@ -33,6 +35,7 @@ $(".Wdate").attr("value",''); $("#description").attr("value",''); $("#searchForm")[0].reset(); + $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); }); }); var edit=function(url){ @@ -65,7 +68,6 @@

-

@@ -102,6 +104,7 @@ + @@ -275,6 +278,7 @@ <%-- --%> + @@ -286,6 +290,7 @@ + @@ -307,6 +312,7 @@ + ${cfg.compileId } ${cfg.cfgDesc } @@ -344,6 +350,13 @@ + + + + + + + @@ -424,7 +437,7 @@ -
+
${cfg.creatorName } ${cfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp index 95945d6c1..6fdb70057 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/contUrl/contUrlForm.jsp @@ -5,9 +5,6 @@ <spring:message code="${cfgName}"></spring:message> diff --git a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipAccountForm.jsp b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipAccountForm.jsp index 1dc0c6a4b..993f7e945 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipAccountForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipAccountForm.jsp @@ -13,9 +13,6 @@ $(document) .ready( function() { - $("#cancel").on("click", function() { - window.history.back(); - }); $(".action").on("change", function() { $("#serviceId").val($(this).attr("serviceId")); $("#protocolId").val($(this).attr("protocolId")); diff --git a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipAccountList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipAccountList.jsp index e52212c12..a1550054c 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipAccountList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipAccountList.jsp @@ -326,7 +326,6 @@

-

@@ -658,7 +657,7 @@ -
+
${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp index 220986840..4c9041669 100644 --- a/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/av/voip/voipList.jsp @@ -392,7 +392,6 @@

-

@@ -725,7 +724,7 @@ -
+
${indexCfg.creatorName } ${indexCfg.editorName } 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 3c0f67483..8ebd2c3bc 100644 --- a/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/basicprotocol/list.jsp @@ -103,7 +103,6 @@

-

@@ -447,7 +446,7 @@ -
+
${cfg.creatorName } ${cfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/common/domainForm.jsp b/src/main/webapp/WEB-INF/views/cfg/common/domainForm.jsp index 4e13ef004..e7152f5f0 100644 --- a/src/main/webapp/WEB-INF/views/cfg/common/domainForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/common/domainForm.jsp @@ -13,9 +13,6 @@ $("#cfgRegionCode").val($("#cfgRegionCodeMaat").val()); $("#cfgType").val($("#cfgTypeMaat").val()); } */ - $("#cancel").on("click", function() { - window.history.back(); - }); $(".action").on("change", function() { $("#serviceId").val($(this).attr("serviceId")); $("#protocolId").val($(this).attr("protocolId")); 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 9ff13147e..e99da4236 100644 --- a/src/main/webapp/WEB-INF/views/cfg/common/domainList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/common/domainList.jsp @@ -67,7 +67,6 @@

-

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 954cf7777..75d8e2d33 100644 --- a/src/main/webapp/WEB-INF/views/cfg/common/ipForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/common/ipForm.jsp @@ -9,6 +9,11 @@ $(function(){ $("#serviceId").val($(".action:checked").attr("serviceId")); $("#protocolId").val($(".action:checked").attr("protocolId")); } + var action=$(".action:checked"); + if(!action){ + action=$("input[name='action']"); + } + var regionCode=action.attr("regionCode"); //initCommIpVal(); var serviceType=$("input[name='cfgRegionCode']").attr("serviceType"); if(serviceType){ diff --git a/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp b/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp index dbcaaf6a9..16954d038 100644 --- a/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/common/ipList.jsp @@ -123,7 +123,6 @@

-

@@ -537,7 +536,7 @@ -
+
${cfg.creatorName } ${cfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/complexCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/complexCfgList.jsp index 3e1e2efa2..110715217 100644 --- a/src/main/webapp/WEB-INF/views/cfg/complexCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/complexCfgList.jsp @@ -65,7 +65,6 @@

-

diff --git a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp index 16c72fcca..927fe7b73 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ddosIpCfgList.jsp @@ -69,7 +69,6 @@

-

@@ -430,7 +429,7 @@ -
+
${cfg.creatorName } ${cfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgForm.jsp index 9fc26d8e4..f63d58057 100644 --- a/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/dnsIpCfgForm.jsp @@ -5,9 +5,6 @@ <spring:message code="${cfgName}"></spring:message> -
-

- -

-
-
-
-
-
- - - + + +
+

+ +

+
+
+
+
+
+ + + + + + + +
-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
-
- -
- -
-
-
- -
-
- -
- -
- - - - - - - <%@include file="/WEB-INF/include/form/ipInfo.jsp" %> - <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> - <%@include file="/WEB-INF/include/form/basicInfo.jsp" %> -
-
-
-
-
-
- - -
-
-
-
-
-
- - -
-
+ +
+
+
+ + + + + + + + + + + + +
+
+
+ + + + + + + + + +

+ + +

+ + <%-- --%> + + + + +
+ <%@include file="/WEB-INF/views/cfg/ipCfgForm.jsp"%> +
+ +
+
+
+ + + + +
+
+ +
+ + +

+ + +

+ + + + <%-- --%> + + + + + + +
+ <%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%> +
+ + +
+
+
+ + + + + + +
+ + + + + + + + + +
+
+
+
+ <%@include file="/WEB-INF/include/form/areaInfo.jsp"%> +
+ <%@include file="/WEB-INF/include/form/basicInfo.jsp"%> +
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+ + +
+
+
-
\ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp new file mode 100644 index 000000000..846eea053 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipList.jsp @@ -0,0 +1,451 @@ +<%@ page contentType="text/html;charset=UTF-8"%> +<%@ include file="/WEB-INF/include/taglib.jsp"%> + + +<spring:message code="${cfgName}"></spring:message> + + + + + + +
+ + +

+ +

+ +
+
+
+
+ + + + + + + + + + +
+
+ + + + + + + + +
+ +
+ +
+
+ + + + + <%-- + + + --%> + + +
+ + + +
+
+
+ + + +
+
+ + + + + +
+ + +
+
+ href="javascript:;"> + + +
+
+ + + +
+
+ +
+ +
+ + + + + + + + +
+ +
+ +
+ +
+ + + + + + + +
+ +
+ +
+ +
+ + + + + + + + +
+ +
+ +
+ +
+ + + + + + + +
+ +
+ +
+ +
+
+
+ + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+ +
+
+ + " onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/> + +
+
+
+ + +
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + ${indexCfg.compileId }${indexCfg.cfgDesc } + + + + + + + + + + + + + + + + + + + ${indexCfg.requestName } + + + + + + + + + + + + + + + ${fns:abbr(classify,20)} + + + + + + + + + + + + + + + + + ${fns:abbr(attribute,20)} + + + + + + + + + + + + + + + + + + ${fns:abbr(lableInfo,20)} + + + + + + + + + + + + +
${indexCfg.creatorName }${indexCfg.editorName }${indexCfg.auditorName }
+
${page}
+
+ +
+
+
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipSubList.jsp b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipSubList.jsp new file mode 100644 index 000000000..79296b282 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/cfg/ipaddr/ipSubList.jsp @@ -0,0 +1,176 @@ +<%@ page contentType="text/html;charset=UTF-8"%> +<%@ include file="/WEB-INF/include/taglib.jsp"%> + + + + + + + +
+ + +
+
+ +
+ + + + +
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+
+ + + +
+
+
+
+ +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+ \ No newline at end of file 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 3b86fa109..4dfdea7c2 100644 --- a/src/main/webapp/WEB-INF/views/cfg/ipsec/ipForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/ipsec/ipForm.jsp @@ -12,9 +12,6 @@ $(function(){ $("#cfgRegionCode").val($("#cfgRegionCodeMaat").val()); $("#cfgType").val($("#cfgTypeMaat").val()); } - $("#cancel").on("click",function(){ - window.history.back(); - }); $(".action").on("change", function() { $("#serviceId").val($(this).attr("serviceId")); $("#protocolId").val($(this).attr("protocolId")); 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 a9f3390a2..78d451074 100644 --- a/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/mail/mailList.jsp @@ -97,7 +97,6 @@

-

@@ -431,7 +430,7 @@ -
+
${indexCfg.creatorName } ${indexCfg.editorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/mail/mailSubList.jsp b/src/main/webapp/WEB-INF/views/cfg/mail/mailSubList.jsp index 34229a3a5..87d449a6c 100644 --- a/src/main/webapp/WEB-INF/views/cfg/mail/mailSubList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/mail/mailSubList.jsp @@ -19,7 +19,6 @@
-
@@ -37,8 +36,8 @@
-
-
+
+
@@ -49,7 +48,8 @@
-
+
+
@@ -70,15 +70,15 @@
-
-
+
+
-
-
+
+
@@ -91,8 +91,8 @@
-
-
+
+
@@ -103,8 +103,8 @@
-
-
+
+
@@ -117,6 +117,7 @@
+
@@ -130,8 +131,8 @@
-
-
+
+
@@ -153,8 +154,8 @@
-
-
+
+
@@ -165,8 +166,8 @@
-
-
+
+
@@ -192,7 +193,7 @@
-
+
@@ -213,8 +214,8 @@
-
-
+
+
@@ -255,8 +256,8 @@
-
-
+
+
@@ -267,8 +268,8 @@
-
-
+
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/maintenance/dnsResStrategy/form.jsp b/src/main/webapp/WEB-INF/views/cfg/maintenance/dnsResStrategy/form.jsp index f5160759d..5f6932316 100644 --- a/src/main/webapp/WEB-INF/views/cfg/maintenance/dnsResStrategy/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/maintenance/dnsResStrategy/form.jsp @@ -5,9 +5,6 @@ <spring:message code="${cfgName}"></spring:message> diff --git a/src/main/webapp/WEB-INF/views/cfg/multipleCfgList.jsp b/src/main/webapp/WEB-INF/views/cfg/multipleCfgList.jsp index de3dfcaad..81cf2ea38 100644 --- a/src/main/webapp/WEB-INF/views/cfg/multipleCfgList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/multipleCfgList.jsp @@ -86,7 +86,6 @@

-

diff --git a/src/main/webapp/WEB-INF/views/cfg/other/bgpForm.jsp b/src/main/webapp/WEB-INF/views/cfg/other/bgpForm.jsp index 9636ad067..c2d9e962a 100644 --- a/src/main/webapp/WEB-INF/views/cfg/other/bgpForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/other/bgpForm.jsp @@ -13,12 +13,11 @@ $(document) .ready( function() { - $("#cancel").on("click", function() { - window.history.back(); - }); $(".action").on("change", function() { $("#serviceId").val($(this).attr("serviceId")); $("#protocolId").val($(this).attr("protocolId")); + var action=$("input[name='action']:checked").val(); + switchAction(action); }); $("#serviceId").val($(".action:checked").attr("serviceId")); $("#protocolId").val($(".action:checked").attr("protocolId")); @@ -186,7 +185,7 @@
-
+
@@ -213,7 +212,7 @@ - + @@ -285,45 +284,44 @@ - - + +

- - <%-- --%> + -
+
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
- + - -
+
- -
+ +
-
+
@@ -204,7 +207,7 @@ - + @@ -239,44 +242,44 @@ - - + +

- + -
+
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
- + -