diff --git a/src/main/java/com/nis/domain/configuration/AppFeatureIndex.java b/src/main/java/com/nis/domain/configuration/AppFeatureIndex.java index a1b63b558..45ef53501 100644 --- a/src/main/java/com/nis/domain/configuration/AppFeatureIndex.java +++ b/src/main/java/com/nis/domain/configuration/AppFeatureIndex.java @@ -39,6 +39,7 @@ public class AppFeatureIndex extends BaseCfg { private List ipPortList = new ArrayList(); private List strList = new ArrayList(); private List complexList = new ArrayList(); + private List numCfgList = new ArrayList(); protected Integer exprType ; protected Integer matchMethod ; protected Integer isHexbin; @@ -126,5 +127,11 @@ public class AppFeatureIndex extends BaseCfg { public void setCfgRegionCode1(String cfgRegionCode1) { this.cfgRegionCode1 = cfgRegionCode1; } + public List getNumCfgList() { + return numCfgList; + } + public void setNumCfgList(List numCfgList) { + this.numCfgList = numCfgList; + } } diff --git a/src/main/java/com/nis/web/controller/basics/PolicyGroupController.java b/src/main/java/com/nis/web/controller/basics/PolicyGroupController.java index 1dad01ccb..41c4c4300 100644 --- a/src/main/java/com/nis/web/controller/basics/PolicyGroupController.java +++ b/src/main/java/com/nis/web/controller/basics/PolicyGroupController.java @@ -34,7 +34,6 @@ public class PolicyGroupController extends BaseController { Page pageCondition = new Page(request, response,"r"); Page page = policyGroupInfoService.findPolicyGroupInfoList(pageCondition,cfg); - model.addAttribute("cfg", cfg); model.addAttribute("page", page); return "/basics/policyGroupList"; @@ -49,11 +48,12 @@ public class PolicyGroupController extends BaseController { */ //@RequiresPermissions(value={"basics:classification:add","basics:attribute:add","basics:label:add","basics:classification:edit","basics:attribute:edit","basics:label:edit","basics:classification:view","basics:attribute:view","basics:label:view"},logical=Logical.OR) @RequestMapping(value={"/policyGroupForm"}) - public String form(String ids,Model model,String doAction,RedirectAttributes redirectAttributes) { + public String form(Integer groupType,String ids,Model model,String doAction,RedirectAttributes redirectAttributes) { PolicyGroupInfo policyGroup=new PolicyGroupInfo(); if(!StringUtil.isEmpty(ids)){ policyGroup=policyGroupInfoService.getById(Integer.parseInt(ids)); } + policyGroup.setGroupType(groupType); model.addAttribute("_cfg", policyGroup); return "/basics/policyGroupForm"; } @@ -64,7 +64,7 @@ public class PolicyGroupController extends BaseController { //@RequiresPermissions(value={"basics:classification:add","basics:attribute:add","basics:label:add","basics:classification:edit","basics:attribute:edit","basics:label:edit"},logical=Logical.OR) @RequestMapping(value = "saveOrUpdate") public String saveOrUpdate(PolicyGroupInfo cfg,Model model, - RedirectAttributes redirectAttributes,String itType) { + RedirectAttributes redirectAttributes,String itType,Integer groupType) { try { policyGroupInfoService.saveOrUpdate(cfg); @@ -74,7 +74,7 @@ public class PolicyGroupController extends BaseController { addMessage(redirectAttributes,"error","save_failed"); } - return "redirect:" + adminPath + "/basics/policyGroup/policyGroupList"; + return "redirect:" + adminPath + "/basics/policyGroup/policyGroupList?groupType="+groupType; } @@ -86,7 +86,7 @@ public class PolicyGroupController extends BaseController { */ //@RequiresPermissions(value={"basics:classification:del","basics:attribute:del","basics:label:del"},logical=Logical.OR) @RequestMapping(value={"delete"}) - public String delete(RedirectAttributes redirectAttributes, String ids,int isValid) { + public String delete(RedirectAttributes redirectAttributes, Integer groupType,String ids,int isValid) { try { policyGroupInfoService.deldete(ids,isValid); addMessage(redirectAttributes,"success","delete_success"); @@ -94,7 +94,7 @@ public class PolicyGroupController extends BaseController { logger.error("删除失败",e); addMessage(redirectAttributes,"error","delete_failed"); } - return "redirect:" + adminPath + "/basics/policyGroup/policyGroupList"; + return "redirect:" + adminPath + "/basics/policyGroup/policyGroupList?groupType="+groupType; } @RequestMapping(value="ajaxServiceIdState",method=RequestMethod.POST) @ResponseBody @@ -121,7 +121,7 @@ public class PolicyGroupController extends BaseController { if(cfg.getGroupId() != null){ PolicyGroupInfo policyGroup = policyGroupInfoService.getInfoByAsnNo(cfg); - if(policyGroup != null && policyGroup.getAsnNo().equals(cfg.getAsnNo()) ){ + if(policyGroup != null &&policyGroup.getIsValid()!=0&& policyGroup.getAsnNo().equals(cfg.getAsnNo()) ){ return true; } } diff --git a/src/main/java/com/nis/web/controller/configuration/AppFeatureCfgController.java b/src/main/java/com/nis/web/controller/configuration/AppFeatureCfgController.java index 265112aac..b1e3b7154 100644 --- a/src/main/java/com/nis/web/controller/configuration/AppFeatureCfgController.java +++ b/src/main/java/com/nis/web/controller/configuration/AppFeatureCfgController.java @@ -104,6 +104,7 @@ public class AppFeatureCfgController extends BaseController { entity.setIpPortList(appMultiFeatureCfgService.getAppIpRangeCfg(entity.getCompileId(), entity.getFunctionId())); entity.setStrList(appMultiFeatureCfgService.getAppStringFeatureCfg(entity.getCompileId(), entity.getFunctionId(),null)); entity.setComplexList(appMultiFeatureCfgService.getAppComplexFeatureCfg(entity.getCompileId(), entity.getFunctionId(),null)); + entity.setNumCfgList(appMultiFeatureCfgService.getAppTcpCfg(entity.getCompileId(), entity.getFunctionId(),null)); initUpdateFormCondition(model,entity); }else{ initFormCondition(model,entity); @@ -249,6 +250,10 @@ public class AppFeatureCfgController extends BaseController { List complexList = appMultiFeatureCfgService.getAppComplexFeatureCfg(compileId,functionId,Integer.valueOf(cfgRegionCode[i])); map.put("complexList", complexList); } + if("4".equals(cfgRegionType[i])){ + List numCfgList = appMultiFeatureCfgService.getAppTcpCfg(compileId,functionId,Integer.valueOf(cfgRegionCode[i])); + map.put("numCfgList", numCfgList); + } tabList.add(map); } }else{ diff --git a/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.java b/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.java index 34dacf6a7..544cedd5f 100644 --- a/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.java +++ b/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.java @@ -56,6 +56,12 @@ public interface AppMultiFeatureCfgDao { //增强字符串类特征配置 public List getAppComplexFeatureCfg(@Param("compileId")Integer compileId, @Param("functionId")Integer functionId,@Param("cfgRegionCode")Integer cfgRegionCode); + //数值类特征配置 + public List getAppTcpCfg(@Param("compileId")Integer compileId, + @Param("functionId")Integer functionId,@Param("cfgRegionCode")Integer cfgRegionCode); + public int insertAppTcpCfg(AppTcpCfg entity); + public void deleteAppTcpCfg(BaseCfg entity); + public int insertAppComplexFeatureCfg(AppComplexFeatureCfg entity); public void deleteAppComplexFeatureCfg(BaseCfg entity); //IP RANGE配置 diff --git a/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.xml b/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.xml index e450dcd85..8c2bb17ed 100644 --- a/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.xml +++ b/src/main/java/com/nis/web/dao/configuration/AppMultiFeatureCfgDao.xml @@ -137,6 +137,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + r.CFG_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT, @@ -181,6 +211,13 @@ #{classify,jdbcType=VARCHAR},#{attribute,jdbcType=VARCHAR},#{lable,jdbcType=VARCHAR}, #{areaEffectiveIds,jdbcType=VARCHAR},#{functionId,jdbcType=INTEGER} + + r.CFG_ID, r.APP_CODE,r.BEHAV_CODE,r.SPEC_SERVICE_ID,r.CFG_DESC,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.AREA_EFFECTIVE_IDS,r.RATELIMIT,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE, + r.low_boundary,r.up_boundary as upBoundary,r.do_log + + + @@ -509,6 +556,24 @@ #{userRegion3,jdbcType=VARCHAR},#{userRegion4,jdbcType=VARCHAR},#{userRegion5,jdbcType=VARCHAR} ) + + + + SELECT LAST_INSERT_ID() + + insert into app_session_cfg ( + APP_CODE,BEHAV_CODE,SPEC_SERVICE_ID,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, + low_boundary,up_boundary,DO_LOG + )values ( + , + #{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER}, + #{lowBoundary,jdbcType=INTEGER},#{upBoundary,jdbcType=INTEGER}, + #{doLog,jdbcType=INTEGER} + ) + delete from app_ip_range_cfg where compile_id=#{compileId} and function_id=#{functionId} @@ -521,6 +586,10 @@ delete from app_complex_feature_cfg where compile_id=#{compileId} and function_id=#{functionId} + + + delete from app_session_cfg where compile_id=#{compileId} and function_id=#{functionId} + +
@@ -77,7 +89,7 @@ $(function(){
-
+ <%--
@@ -91,7 +103,7 @@ $(function(){
-
+
--%>
diff --git a/src/main/webapp/WEB-INF/views/basics/policyGroupList.jsp b/src/main/webapp/WEB-INF/views/basics/policyGroupList.jsp index 427afdd8e..5c1b28b69 100644 --- a/src/main/webapp/WEB-INF/views/basics/policyGroupList.jsp +++ b/src/main/webapp/WEB-INF/views/basics/policyGroupList.jsp @@ -8,6 +8,8 @@ //搜索框提示语初始化 if("${cfg.groupName}"){ $("#intype").val("${cfg.groupName}"); + }else if(''!="${cfg.asnNo}"){ + $("#intype").val("${cfg.asnNo}"); }else{ $("#intype").attr("placeholder"," "+$("#seltype").find("option:selected").text()); } @@ -116,14 +118,25 @@ <%-- --%> <%----%>

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

@@ -133,13 +146,14 @@ +
-
+ <%--
-
+
--%>
@@ -164,7 +178,9 @@ + +
@@ -180,8 +196,8 @@
<%-- --%> - - + + <%-- --%> @@ -245,7 +261,9 @@ - + + + @@ -269,7 +287,9 @@ + ${cfg.asnNo} + ${fns:abbr(cfg.description,20)} ${cfg.creatorName } diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgForm.jsp index 55e371efa..6f13ddcfa 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgForm.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appMultiFeatureCfgForm.jsp @@ -50,6 +50,20 @@ $(function(){ } } }); + var maxTtl=$("[name$=upBoundary]").val(); + maxTtl = parseInt(maxTtl); + var minTtl=$("[name$=lowBoundary]").val(); + minTtl = parseInt(minTtl); + if(maxTtl > 4294967295){ + message=""; + $("div[for=upBoundary]").html(""); + flag=false; + } + if(minTtl>maxTtl){ + message=""; + $("div[for=upBoundary]").html(""); + flag=false; + } if(flag){ //将disable属性的元素删除 $(".disabled").each(function(){ @@ -202,7 +216,8 @@ var delContent = function(contentClassName, addBtnClassName) { - + + @@ -306,7 +321,7 @@ var delContent = function(contentClassName, addBtnClassName) { onClick="addContent(this,'${tabName}')" title="add"> + value="strList[${strCfgIndex}]"> <%-- --%> @@ -324,8 +339,8 @@ var delContent = function(contentClassName, addBtnClassName) {
- + @@ -334,8 +349,8 @@ var delContent = function(contentClassName, addBtnClassName) { class="row boxSolid ${tabName}${status.index} hidden disabled"> <%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
- + @@ -347,7 +362,61 @@ var delContent = function(contentClassName, addBtnClassName) { <%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
- + + + + + + +

+ + hidden" + onClick="addContent(this,'${tabName}')" title="add"> +

+ + <%-- --%> + + + + + + + +
+ <%@include file="/WEB-INF/views/cfg/numCfgForm.jsp"%> + + + +
+ + +
+
+
+ + + + +
+ + +
1 and status.index>0}"> hidden disabled"> + + + + <%@include file="/WEB-INF/views/cfg/numCfgForm.jsp"%> +
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/app/appSubFeatureList.jsp b/src/main/webapp/WEB-INF/views/cfg/app/appSubFeatureList.jsp index 909db24df..f23e4ebd7 100644 --- a/src/main/webapp/WEB-INF/views/cfg/app/appSubFeatureList.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/app/appSubFeatureList.jsp @@ -37,7 +37,7 @@
- + <%-- _${regionStatus.index} --%>
@@ -357,6 +357,24 @@ + + +
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
diff --git a/src/main/webapp/WEB-INF/views/cfg/numCfgForm.jsp b/src/main/webapp/WEB-INF/views/cfg/numCfgForm.jsp new file mode 100644 index 000000000..f3d5a6181 --- /dev/null +++ b/src/main/webapp/WEB-INF/views/cfg/numCfgForm.jsp @@ -0,0 +1,83 @@ +<%@ 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/proxy/spoofingIpPool/form.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/spoofingIpPool/form.jsp index 498b07d90..ab72302e6 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/spoofingIpPool/form.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/spoofingIpPool/form.jsp @@ -27,7 +27,7 @@ $(function(){

- +

@@ -51,6 +51,7 @@ $(function(){ + @@ -153,7 +154,7 @@ $(function(){
- <%@include file="/WEB-INF/include/form/areaInfo.jsp"%> + <%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp"%> --%>
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %> diff --git a/src/main/webapp/WEB-INF/views/cfg/proxy/spoofingIpPool/list.jsp b/src/main/webapp/WEB-INF/views/cfg/proxy/spoofingIpPool/list.jsp index 40871e17c..0909070b7 100644 --- a/src/main/webapp/WEB-INF/views/cfg/proxy/spoofingIpPool/list.jsp +++ b/src/main/webapp/WEB-INF/views/cfg/proxy/spoofingIpPool/list.jsp @@ -73,7 +73,7 @@

- +