(1)修复修改时页面被遮盖层覆盖的bug

(2)APP策略,基础协议,加密隧道行为调整,自定义域恢复;分隔,关键字字段用&连接
This commit is contained in:
wangxin
2018-08-06 15:09:12 +08:00
parent d839848452
commit a4b16f4043
4 changed files with 38 additions and 20 deletions

View File

@@ -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_READ_TIMEOUT = Configurations.getIntProperty("client_read_timeout",1000);
public static final Integer CLIENT_SOCKET_TIMEOUT = Configurations.getIntProperty("client_socket_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 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 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 RATE_LIMIT_REGION = Configurations.getStringProperty("rate_limit_region","RATE_LIMIT");
public static final String AREA_REGION = Configurations.getStringProperty("area_region","area_ip"); public static final String AREA_REGION = Configurations.getStringProperty("area_region","area_ip");

View File

@@ -413,11 +413,25 @@ public class AppCfgService extends BaseService {
entity.setTableName(AppPolicyCfg.getTablename()); entity.setTableName(AppPolicyCfg.getTablename());
appCfgDao.auditCfg(entity); appCfgDao.auditCfg(entity);
if(isAudit==1){ if(isAudit==1){
StringBuffer cfgKeywords=new StringBuffer();
if(entity.getBehavCode()!=null){ if(entity.getBehavCode()!=null){
entity.setCfgKeywords(entity.getAppCode()+Constants.KEYWORD_EXPR+entity.getBehavCode()); if(Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equalsIgnoreCase(configType)) {
}else{ cfgKeywords.append(Constants.APP_ID_REGION+"="+entity.getAppCode());
entity.setCfgKeywords(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{
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<AppPolicyCfg> list = new ArrayList(); List<AppPolicyCfg> list = new ArrayList();
list.add(entity); list.add(entity);
Map<String,List> map = cfgConvert(strRegionList,list,2,entity,groupRelationList); Map<String,List> map = cfgConvert(strRegionList,list,2,entity,groupRelationList);
@@ -469,30 +483,30 @@ public class AppCfgService extends BaseService {
maatCfg.setGroupNum(groupRelationList.size()); maatCfg.setGroupNum(groupRelationList.size());
maatCfg.setAreaIpRegionList(areaIpRegionList); maatCfg.setAreaIpRegionList(areaIpRegionList);
maatCfg.setIsValid(entity.getIsValid()); maatCfg.setIsValid(entity.getIsValid());
String userRegion=null;
if(Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equalsIgnoreCase(configType)) { if(Constants.SPECIFIC_SERVICE_CFG_TYPE_APP.equalsIgnoreCase(configType)) {
//设置APP自定义域 //设置APP自定义域
String userRegion = Constants.APP_ID_REGION+"="+entity.getAppCode(); userRegion = Constants.APP_ID_REGION+"="+entity.getAppCode();
if(entity.getBehavCode()!=null) {
userRegion += Constants.USER_REGION_SPLIT+Constants.BEHAV_ID_REGION+"="+entity.getBehavCode();
}
}else if(Constants.SPECIFIC_SERVICE_CFG_TYPE_BASIC_PROTOCOL.equalsIgnoreCase(configType)) {
userRegion = Constants.PROTO_ID_REGION+"="+entity.getAppCode();
}else if(Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR.equalsIgnoreCase(configType)) {
userRegion = Constants.PROTO_ID_REGION+"="+entity.getAppCode();
if(entity.getBehavCode()!=null) {
userRegion += Constants.USER_REGION_SPLIT+Constants.BEHAV_ID_REGION+"="+entity.getBehavCode();
}
}
//限速业务需要设置 //限速业务需要设置
String actionCode = DictUtils.getDictCode("SERVICE_ACTION", "action_ratelimit"); String actionCode = DictUtils.getDictCode("SERVICE_ACTION", "action_ratelimit");
if(!actionCode.equals("默认")){ if(!actionCode.equals("默认")){
if(entity.getAction().equals(Integer.parseInt(actionCode))){ if(entity.getAction().equals(Integer.parseInt(actionCode))){
userRegion += Constants.APP_CFG_USERREGION_SPLITOR+Constants.RATE_LIMIT_REGION+"="+entity.getRatelimit(); userRegion += Constants.USER_REGION_SPLIT+Constants.RATE_LIMIT_REGION+"="+entity.getRatelimit();
} }
} }
if(entity.getBehavCode()!=null) {
userRegion += Constants.APP_CFG_USERREGION_SPLITOR+Constants.BEHAV_ID_REGION+"="+entity.getBehavCode();
}
maatCfg.setUserRegion(userRegion); 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);
}else if(Constants.SPECIFIC_SERVICE_CFG_TYPE_ENCRYPTED_TUNNEL_BEHAVIOR.equalsIgnoreCase(configType)) {
String userRegion = Constants.APP_ID_REGION+"="+entity.getAppCode();
if(entity.getBehavCode()!=null) {
userRegion += Constants.APP_CFG_USERREGION_SPLITOR+Constants.BEHAV_ID_REGION+"="+entity.getBehavCode();
}
maatCfg.setUserRegion(userRegion);
}
configCompileList.add(maatCfg); configCompileList.add(maatCfg);
maatBean.setConfigCompileList(configCompileList); maatBean.setConfigCompileList(configCompileList);
maatBean.setAuditTime(entity.getAuditTime()); maatBean.setAuditTime(entity.getAuditTime());

View File

@@ -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_encrypted_tunnel_behavior=encrypted_tunnel_behavior
specific_service_cfg_type_basic_protocol=basic_protocol specific_service_cfg_type_basic_protocol=basic_protocol
#基础协议自定义域 #基础协议自定义域
app_id_region=APP_ID proto_id_region=PROTO_ID
#IP默认值 #IP默认值
ipv4_default_ip_value=\:\: ipv4_default_ip_value=\:\:
ipv4_default_ip_subnet_value=0.0.0.0/32 ipv4_default_ip_subnet_value=0.0.0.0/32
@@ -448,3 +448,4 @@ maat_cfg_dolog_configpercent_default=100
maat_cfg_dolog_configoption_default=1 maat_cfg_dolog_configoption_default=1
#app基础协议特定服务的userregion分隔符 #app基础协议特定服务的userregion分隔符
app_cfg_userregion_splitor=& app_cfg_userregion_splitor=&
app_id_region=APP_ID

View File

@@ -172,7 +172,9 @@ var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
}else{ }else{
window.location = url+"?ids="+ids+"&compileIds="+compileIds; window.location = url+"?ids="+ids+"&compileIds="+compileIds;
} }
if(url.indexOf("?isAudit") > 1){
loading('<spring:message code="onloading"/>'); loading('<spring:message code="onloading"/>');
}
//$("#searchForm").submit(); //$("#searchForm").submit();
} }
},{buttonsFocus:1}); },{buttonsFocus:1});