diff --git a/src/main/java/com/nis/util/Constants.java b/src/main/java/com/nis/util/Constants.java index aa9a253a4..fb251f988 100644 --- a/src/main/java/com/nis/util/Constants.java +++ b/src/main/java/com/nis/util/Constants.java @@ -432,6 +432,7 @@ public final class Constants { public static final Integer CLIENT_READ_TIMEOUT = Configurations.getIntProperty("client_read_timeout",1000); public static final Integer CLIENT_SOCKET_TIMEOUT = Configurations.getIntProperty("client_socket_timeout",1000); public static final String APP_ID_REGION = Configurations.getStringProperty("app_id_region","APP_ID"); + public static final String PROTO_ID_REGION = Configurations.getStringProperty("proto_id_region","APP_ID"); public static final String BEHAV_ID_REGION = Configurations.getStringProperty("behav_id_region","BEHAV_ID"); public static final String RATE_LIMIT_REGION = Configurations.getStringProperty("rate_limit_region","RATE_LIMIT"); public static final String AREA_REGION = Configurations.getStringProperty("area_region","area_ip"); diff --git a/src/main/java/com/nis/web/service/configuration/AppCfgService.java b/src/main/java/com/nis/web/service/configuration/AppCfgService.java index eef85a512..2294b341a 100644 --- a/src/main/java/com/nis/web/service/configuration/AppCfgService.java +++ b/src/main/java/com/nis/web/service/configuration/AppCfgService.java @@ -413,11 +413,25 @@ public class AppCfgService extends BaseService { entity.setTableName(AppPolicyCfg.getTablename()); appCfgDao.auditCfg(entity); if(isAudit==1){ + StringBuffer cfgKeywords=new StringBuffer(); if(entity.getBehavCode()!=null){ - entity.setCfgKeywords(entity.getAppCode()+Constants.KEYWORD_EXPR+entity.getBehavCode()); + if(Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equalsIgnoreCase(configType)) { + cfgKeywords.append(Constants.APP_ID_REGION+"="+entity.getAppCode()); + }else if(Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR.equalsIgnoreCase(configType)||Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL.equalsIgnoreCase(configType)) { + cfgKeywords.append(Constants.PROTO_ID_REGION+"="+entity.getAppCode()); + } + cfgKeywords.append(Constants.KEYWORD_EXPR); + cfgKeywords.append(Constants.BEHAV_ID_REGION+"="+entity.getBehavCode()); +// entity.setCfgKeywords(entity.getAppCode()+Constants.KEYWORD_EXPR+entity.getBehavCode()); }else{ - entity.setCfgKeywords(entity.getAppCode()+""); + if(Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equalsIgnoreCase(configType)) { + cfgKeywords.append(Constants.APP_ID_REGION+"="+entity.getAppCode()); + }else if(Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR.equalsIgnoreCase(configType)||Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL.equalsIgnoreCase(configType)) { + cfgKeywords.append(Constants.PROTO_ID_REGION+"="+entity.getAppCode()); + } +// entity.setCfgKeywords(entity.getAppCode()+""); } + entity.setCfgKeywords(cfgKeywords.toString()); List list = new ArrayList(); list.add(entity); Map map = cfgConvert(strRegionList,list,2,entity,groupRelationList); @@ -469,30 +483,30 @@ public class AppCfgService extends BaseService { maatCfg.setGroupNum(groupRelationList.size()); maatCfg.setAreaIpRegionList(areaIpRegionList); maatCfg.setIsValid(entity.getIsValid()); + String userRegion=null; if(Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equalsIgnoreCase(configType)) { //设置APP自定义域 - String userRegion = Constants.APP_ID_REGION+"="+entity.getAppCode(); - //限速业务需要设置 - String actionCode = DictUtils.getDictCode("SERVICE_ACTION", "action_ratelimit"); - if(!actionCode.equals("默认")){ - if(entity.getAction().equals(Integer.parseInt(actionCode))){ - userRegion += Constants.APP_CFG_USERREGION_SPLITOR+Constants.RATE_LIMIT_REGION+"="+entity.getRatelimit(); - } - } + userRegion = Constants.APP_ID_REGION+"="+entity.getAppCode(); if(entity.getBehavCode()!=null) { - userRegion += Constants.APP_CFG_USERREGION_SPLITOR+Constants.BEHAV_ID_REGION+"="+entity.getBehavCode(); + userRegion += Constants.USER_REGION_SPLIT+Constants.BEHAV_ID_REGION+"="+entity.getBehavCode(); } - maatCfg.setUserRegion(userRegion); }else if(Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL.equalsIgnoreCase(configType)) { - String userRegion = Constants.APP_ID_REGION+"="+entity.getAppCode(); - maatCfg.setUserRegion(userRegion); + userRegion = Constants.PROTO_ID_REGION+"="+entity.getAppCode(); }else if(Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR.equalsIgnoreCase(configType)) { - String userRegion = Constants.APP_ID_REGION+"="+entity.getAppCode(); + userRegion = Constants.PROTO_ID_REGION+"="+entity.getAppCode(); if(entity.getBehavCode()!=null) { - userRegion += Constants.APP_CFG_USERREGION_SPLITOR+Constants.BEHAV_ID_REGION+"="+entity.getBehavCode(); + userRegion += Constants.USER_REGION_SPLIT+Constants.BEHAV_ID_REGION+"="+entity.getBehavCode(); } - maatCfg.setUserRegion(userRegion); + } + //限速业务需要设置 + String actionCode = DictUtils.getDictCode("SERVICE_ACTION", "action_ratelimit"); + if(!actionCode.equals("默认")){ + if(entity.getAction().equals(Integer.parseInt(actionCode))){ + userRegion += Constants.USER_REGION_SPLIT+Constants.RATE_LIMIT_REGION+"="+entity.getRatelimit(); + } + } + maatCfg.setUserRegion(userRegion); configCompileList.add(maatCfg); maatBean.setConfigCompileList(configCompileList); maatBean.setAuditTime(entity.getAuditTime()); diff --git a/src/main/resources/nis.properties b/src/main/resources/nis.properties index 4ea1f0477..d8430cd8d 100644 --- a/src/main/resources/nis.properties +++ b/src/main/resources/nis.properties @@ -431,7 +431,7 @@ specific_service_cfg_type_app=social_app specific_service_cfg_type_encrypted_tunnel_behavior=encrypted_tunnel_behavior specific_service_cfg_type_basic_protocol=basic_protocol #基础协议自定义域 -app_id_region=APP_ID +proto_id_region=PROTO_ID #IP默认值 ipv4_default_ip_value=\:\: ipv4_default_ip_subnet_value=0.0.0.0/32 @@ -447,4 +447,5 @@ maat_cfg_dolog_doblacklist_default=1 maat_cfg_dolog_configpercent_default=100 maat_cfg_dolog_configoption_default=1 #app,基础协议,特定服务的userregion分隔符 -app_cfg_userregion_splitor=& \ No newline at end of file +app_cfg_userregion_splitor=& +app_id_region=APP_ID \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/tags/sys/delRow.tag b/src/main/webapp/WEB-INF/tags/sys/delRow.tag index 32dbda3c5..9c152c94d 100644 --- a/src/main/webapp/WEB-INF/tags/sys/delRow.tag +++ b/src/main/webapp/WEB-INF/tags/sys/delRow.tag @@ -172,7 +172,9 @@ var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox"); }else{ window.location = url+"?ids="+ids+"&compileIds="+compileIds; } - loading(''); + if(url.indexOf("?isAudit") > 1){ + loading(''); + } //$("#searchForm").submit(); } },{buttonsFocus:1});