(1)加入HTTP协议的Object-Group Policy
(2)修复增域删域的逻辑错误 (3)调整拦截自定义域
This commit is contained in:
@@ -6,6 +6,7 @@ import java.util.*;
|
|||||||
|
|
||||||
import com.google.gson.*;
|
import com.google.gson.*;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import com.nis.domain.FunctionServiceDict;
|
||||||
import com.nis.domain.configuration.*;
|
import com.nis.domain.configuration.*;
|
||||||
import com.nis.web.service.BaseService;
|
import com.nis.web.service.BaseService;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
@@ -585,13 +586,13 @@ public class ConfigConvertUtil {
|
|||||||
* 配置分组列表
|
* 配置分组列表
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public static <T> Map<String, List> objGroupCfgConvert(List dstList, List<T> srcList, Integer cfgType, BaseCfg baseCfg,
|
public static <T> Map<String, List> objGroupCfgConvert(Map<Integer,FunctionServiceDict> dictMap,List dstList, List<T> srcList, Integer cfgType, BaseCfg baseCfg,
|
||||||
List groupRelationList, Map<String,Object> maatTableMap, Set<Integer> groupIdSet) {
|
List groupRelationList, Map<String,Object> maatTableMap, Set<Integer> groupIdSet) {
|
||||||
Map<String, List> map = new HashMap();
|
Map<String, List> map = new HashMap();
|
||||||
if (cfgType == 1) {
|
if (cfgType == 1) {
|
||||||
List numRegionList = new ArrayList();
|
List numRegionList = new ArrayList();
|
||||||
|
|
||||||
Integer numGroupId = 0;
|
Set<Integer> numGroupVals = new HashSet<>();
|
||||||
List<Integer> regionIdList = new ArrayList<>();//ConfigServiceUtil.getId(3, srcList.size());
|
List<Integer> regionIdList = new ArrayList<>();//ConfigServiceUtil.getId(3, srcList.size());
|
||||||
for (int i = 0; i < srcList.size(); i++) {
|
for (int i = 0; i < srcList.size(); i++) {
|
||||||
T srcCfg = srcList.get(i);
|
T srcCfg = srcList.get(i);
|
||||||
@@ -632,18 +633,20 @@ public class ConfigConvertUtil {
|
|||||||
|
|
||||||
// 如果protocolId非空非零,需要构造数值型域配置,多条相同协议的IP只需要一条数值域配置(目前没有不同协议IP&情况)
|
// 如果protocolId非空非零,需要构造数值型域配置,多条相同协议的IP只需要一条数值域配置(目前没有不同协议IP&情况)
|
||||||
//分组复用每个IP组还需要不同的数值域组么?????
|
//分组复用每个IP组还需要不同的数值域组么?????
|
||||||
if (baseIpCfg.getProtocolId() != null && baseIpCfg.getProtocolId() != 0) {
|
if (baseCfg!=null&&baseCfg.getServiceId()!=null&&baseCfg.getServiceId()!=0&&dictMap.containsKey(baseCfg.getServiceId())) {
|
||||||
if (numGroupId == 0) {
|
FunctionServiceDict dict=dictMap.get(baseCfg.getServiceId());
|
||||||
|
Integer protocolId=dict.getProtocolId();
|
||||||
|
if (!numGroupVals.contains(protocolId)) {
|
||||||
GroupCfg group1 = new GroupCfg();
|
GroupCfg group1 = new GroupCfg();
|
||||||
group1.setGroupId(ConfigServiceUtil.getId(2, 1).get(0));
|
group1.setGroupId(ConfigServiceUtil.getId(2, 1).get(0));
|
||||||
group1.setCompileId(baseIpCfg.getCompileId());
|
group1.setCompileId(baseCfg.getCompileId());
|
||||||
group1.setAuditTime(baseCfg.getAuditTime());
|
group1.setAuditTime(baseCfg.getAuditTime());
|
||||||
group1.setIsValid(baseCfg.getIsValid());
|
group1.setIsValid(baseCfg.getIsValid());
|
||||||
groupRelationList.add(group1);
|
groupRelationList.add(group1);
|
||||||
NumBoundaryCfg numCfg = new NumBoundaryCfg();
|
NumBoundaryCfg numCfg = new NumBoundaryCfg();
|
||||||
numCfg.initDefaultValue();
|
numCfg.initDefaultValue();
|
||||||
numCfg.setLowBoundary(baseIpCfg.getProtocolId());
|
numCfg.setLowBoundary(protocolId);
|
||||||
numCfg.setUpBoundary(baseIpCfg.getProtocolId());
|
numCfg.setUpBoundary(protocolId);
|
||||||
numCfg.setRegionId(ConfigServiceUtil.getId(3, 1).get(0));
|
numCfg.setRegionId(ConfigServiceUtil.getId(3, 1).get(0));
|
||||||
numCfg.setAuditTime(baseCfg.getAuditTime());
|
numCfg.setAuditTime(baseCfg.getAuditTime());
|
||||||
numCfg.setGroupId(group1.getGroupId());
|
numCfg.setGroupId(group1.getGroupId());
|
||||||
@@ -653,7 +656,7 @@ public class ConfigConvertUtil {
|
|||||||
}
|
}
|
||||||
numRegionList.add(numCfg);
|
numRegionList.add(numCfg);
|
||||||
map.put("numRegionList", numRegionList);
|
map.put("numRegionList", numRegionList);
|
||||||
numGroupId++;
|
numGroupVals.add(protocolId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -835,24 +838,25 @@ public class ConfigConvertUtil {
|
|||||||
//exclusions
|
//exclusions
|
||||||
map.put("ev_cert", 0);
|
map.put("ev_cert", 0);
|
||||||
map.put("cert_transparency", 0);
|
map.put("cert_transparency", 0);
|
||||||
map.put("pinning", 0);
|
map.put("pinning", 1);
|
||||||
map.put("client_cert_req", 0);
|
map.put("client_cert_req", 1);
|
||||||
|
map.put("protocol_errors", 1);
|
||||||
userRegionMap.put("exclusions", map);
|
userRegionMap.put("exclusions", map);
|
||||||
//cert_verify
|
//cert_verify
|
||||||
Map<String,Object> map1=new HashMap<>();
|
Map<String,Object> map1=new HashMap<>();
|
||||||
map=new HashMap<>();
|
map=new HashMap<>();
|
||||||
map.put("cn",0);
|
map.put("cn",1);
|
||||||
map.put("issuer",0);
|
map.put("issuer",1);
|
||||||
map.put("self-signed",0);
|
map.put("self-signed",1);
|
||||||
map.put("expiration",0);
|
map.put("expiration",1);
|
||||||
map1.put("approach", map);
|
map1.put("approach", map);
|
||||||
userRegionMap.put("cert_verify", map1);
|
userRegionMap.put("cert_verify", map1);
|
||||||
//ssl_ver
|
//ssl_ver
|
||||||
map=new HashMap<>();
|
map=new HashMap<>();
|
||||||
map.put("mirror_client", 0);
|
map.put("mirror_client", 1);
|
||||||
map.put("allow_http2", 1);
|
map.put("allow_http2", 1);
|
||||||
map.put("min", "ssl3");
|
// map.put("min", "ssl3");
|
||||||
map.put("max", "tls13");
|
// map.put("max", "tls13");
|
||||||
userRegionMap.put("ssl_ver", map);
|
userRegionMap.put("ssl_ver", map);
|
||||||
//decrypt_mirror
|
//decrypt_mirror
|
||||||
map=new HashMap<>();
|
map=new HashMap<>();
|
||||||
@@ -865,13 +869,13 @@ public class ConfigConvertUtil {
|
|||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
public static Map<String,Object> convertCommonGroupMaatTable(CfgIndexInfo cfgIndexInfo,List<Map<String, Object>> cfgList){
|
public static Map<String,Object> convertCommonGroupMaatTable(CfgIndexInfo cfgIndexInfo, List<Map<String, Object>> cfgList){
|
||||||
Map<String,Object> maatTableMap=new HashMap<>();
|
Map<String,Object> maatTableMap=new HashMap<>();
|
||||||
Map<String,Object> commonGroupIds= MapUtils.isEmpty(cfgIndexInfo.getUserRegion())?(Map<String,Object>)gsonFromJson(cfgIndexInfo.getCommonGroupIds(),Map.class):cfgIndexInfo.getUserRegion();
|
Map<String,Object> commonGroupIds= MapUtils.isEmpty(cfgIndexInfo.getUserRegion())?(Map<String,Object>)gsonFromJson(cfgIndexInfo.getCommonGroupIds(),Map.class):cfgIndexInfo.getUserRegion();
|
||||||
for (Map<String, Object> map : cfgList) {
|
for (Map<String, Object> map : cfgList) {
|
||||||
String cfgType = map.get("cfgType").toString();
|
String cfgType = map.get("cfgType").toString();
|
||||||
if (cfgType.equals("1")) {
|
if (cfgType.equals("1")) {
|
||||||
if(commonGroupIds.containsKey("ipGroup")){
|
if(commonGroupIds.containsKey("ipGroup")&&map.containsKey("maatTable")){
|
||||||
Map<String,String> ipMaatMap=new HashMap<>();
|
Map<String,String> ipMaatMap=new HashMap<>();
|
||||||
for(String group:commonGroupIds.get("ipGroup").toString().split(",")){
|
for(String group:commonGroupIds.get("ipGroup").toString().split(",")){
|
||||||
if(StringUtils.isNotBlank(group)){
|
if(StringUtils.isNotBlank(group)){
|
||||||
@@ -885,26 +889,28 @@ public class ConfigConvertUtil {
|
|||||||
maatTableMap.put("protocolMaatTable",map.get("protocolMaatTable").toString());
|
maatTableMap.put("protocolMaatTable",map.get("protocolMaatTable").toString());
|
||||||
}
|
}
|
||||||
} else if (cfgType.equals("2")) {
|
} else if (cfgType.equals("2")) {
|
||||||
String _maatTable = map.get("maatTable").toString();
|
String _maatTable = map.containsKey("maatTable")?map.get("maatTable").toString():null;
|
||||||
Map<String,String> stringMaatMap=new HashMap<>();
|
Map<String,String> stringMaatMap=new HashMap<>();
|
||||||
if(commonGroupIds.containsKey("urlGroup")&&_maatTable.toUpperCase().contains("URL")){
|
if(StringUtils.isNotBlank(_maatTable)){
|
||||||
for(String group:commonGroupIds.get("urlGroup").toString().split(",")){
|
if(commonGroupIds.containsKey("urlGroup")&&_maatTable.toUpperCase().contains("URL")){
|
||||||
if(StringUtils.isNotBlank(group)){
|
for(String group:commonGroupIds.get("urlGroup").toString().split(",")){
|
||||||
stringMaatMap.put(group,_maatTable);
|
if(StringUtils.isNotBlank(group)){
|
||||||
|
stringMaatMap.put(group,_maatTable);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if(commonGroupIds.containsKey("domainGroup")&&_maatTable.toUpperCase().contains("DOMAIN")){
|
||||||
if(commonGroupIds.containsKey("domainGroup")&&_maatTable.toUpperCase().contains("DOMAIN")){
|
for(String group:commonGroupIds.get("domainGroup").toString().split(",")){
|
||||||
for(String group:commonGroupIds.get("domainGroup").toString().split(",")){
|
if(StringUtils.isNotBlank(group)){
|
||||||
if(StringUtils.isNotBlank(group)){
|
stringMaatMap.put(group,_maatTable);
|
||||||
stringMaatMap.put(group,_maatTable);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if(commonGroupIds.containsKey("subscribeIdGroup")&&_maatTable.toUpperCase().contains("SUBSCRIBE_ID")){
|
||||||
if(commonGroupIds.containsKey("subscribeIdGroup")&&_maatTable.toUpperCase().contains("SUBSCRIBE_ID")){
|
for(String group:commonGroupIds.get("subscribeIdGroup").toString().split(",")){
|
||||||
for(String group:commonGroupIds.get("subscribeIdGroup").toString().split(",")){
|
if(StringUtils.isNotBlank(group)){
|
||||||
if(StringUtils.isNotBlank(group)){
|
stringMaatMap.put(group,_maatTable);
|
||||||
stringMaatMap.put(group,_maatTable);
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -917,4 +923,40 @@ public class ConfigConvertUtil {
|
|||||||
}
|
}
|
||||||
return maatTableMap;
|
return maatTableMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取obj-list-group业务的function_service_dict
|
||||||
|
* @param functionId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static Map<Integer,FunctionServiceDict> objGetServiceDict(Integer functionId){
|
||||||
|
Map<Integer,FunctionServiceDict> dictMap=new HashMap<>();
|
||||||
|
ServiceConfigTemplateUtil util=new ServiceConfigTemplateUtil();
|
||||||
|
List<Map<String,Object>> list=util.getServiceListByFunctionId(functionId);
|
||||||
|
for(Map<String,Object> map:list){
|
||||||
|
if(map.containsKey("serviceIds")){
|
||||||
|
String serviceIds=map.get("serviceIds").toString();
|
||||||
|
for(String serviceId:serviceIds.split(",")){
|
||||||
|
List<Map<String,Object>> _mapList=util.getServiceListByServiceId(Integer.parseInt(serviceId));
|
||||||
|
for(Map<String,Object> _map:_mapList){
|
||||||
|
if(_map.containsKey("functionId")){
|
||||||
|
List<FunctionServiceDict> dictList=DictUtils.getFunctionServiceDictList(Integer.parseInt(_map.get("functionId").toString()));
|
||||||
|
for(FunctionServiceDict dict:dictList){
|
||||||
|
dictMap.put(dict.getServiceId(),dict);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if(map.containsKey("functionId")){
|
||||||
|
List<FunctionServiceDict> dictList=DictUtils.getFunctionServiceDictList(Integer.parseInt(map.get("functionId").toString()));
|
||||||
|
for(FunctionServiceDict dict:dictList){
|
||||||
|
dictMap.put(dict.getServiceId(),dict);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return dictMap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import java.util.*;
|
|||||||
|
|
||||||
import com.google.gson.*;
|
import com.google.gson.*;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
import com.nis.domain.FunctionServiceDict;
|
||||||
import com.nis.domain.basics.*;
|
import com.nis.domain.basics.*;
|
||||||
import com.nis.domain.configuration.*;
|
import com.nis.domain.configuration.*;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
@@ -77,6 +78,7 @@ public class SchedulerTaskUtil {
|
|||||||
String tableName = service.get("tableName").toString();
|
String tableName = service.get("tableName").toString();
|
||||||
String serviceType = service.get("serviceType").toString();
|
String serviceType = service.get("serviceType").toString();
|
||||||
String className = service.get("className").toString();
|
String className = service.get("className").toString();
|
||||||
|
String functionId= service.get("functionId").toString();
|
||||||
BaseCfg entity = new BaseCfg();
|
BaseCfg entity = new BaseCfg();
|
||||||
entity.setServiceId(serviceId);
|
entity.setServiceId(serviceId);
|
||||||
entity.setTableName(tableName);
|
entity.setTableName(tableName);
|
||||||
@@ -125,6 +127,7 @@ public class SchedulerTaskUtil {
|
|||||||
List<Map<String,Object>> userRegionList = (List<Map<String, Object>>) service.get("userRegionList");
|
List<Map<String,Object>> userRegionList = (List<Map<String, Object>>) service.get("userRegionList");
|
||||||
entity.setCompileId(compileId);
|
entity.setCompileId(compileId);
|
||||||
compileIds.add(compileId);
|
compileIds.add(compileId);
|
||||||
|
Map<Integer, FunctionServiceDict> serviceDictMap=ConfigConvertUtil.objGetServiceDict(Integer.parseInt(functionId));
|
||||||
//查询配置
|
//查询配置
|
||||||
if("cfg_index_info".equals(tableName)){
|
if("cfg_index_info".equals(tableName)){
|
||||||
List<CfgIndexInfo> list = configSynchronizationDao.getCfgIndexList(entity);
|
List<CfgIndexInfo> list = configSynchronizationDao.getCfgIndexList(entity);
|
||||||
@@ -208,7 +211,7 @@ public class SchedulerTaskUtil {
|
|||||||
if(CollectionUtils.isNotEmpty(cfg.getIpCommGroupCfgList())){
|
if(CollectionUtils.isNotEmpty(cfg.getIpCommGroupCfgList())){
|
||||||
IpPortCfg _cfg = new IpPortCfg();
|
IpPortCfg _cfg = new IpPortCfg();
|
||||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
||||||
Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(ipRegionList,cfg.getIpCommGroupCfgList(),1,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,cfg.getIpCommGroupCfgList(),1,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
groupRelationList=map.get("groupList");
|
||||||
ipRegionList=map.get("dstList");
|
ipRegionList=map.get("dstList");
|
||||||
if(map.get("numRegionList")!=null){
|
if(map.get("numRegionList")!=null){
|
||||||
@@ -220,7 +223,7 @@ public class SchedulerTaskUtil {
|
|||||||
if(CollectionUtils.isNotEmpty(cfg.getUrlCommGroupList())){
|
if(CollectionUtils.isNotEmpty(cfg.getUrlCommGroupList())){
|
||||||
CommonStringCfg _cfg = new CommonStringCfg();
|
CommonStringCfg _cfg = new CommonStringCfg();
|
||||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(strRegionList,cfg.getUrlCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getUrlCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
strRegionList=map.get("dstList");
|
||||||
}
|
}
|
||||||
@@ -229,7 +232,7 @@ public class SchedulerTaskUtil {
|
|||||||
CommonStringCfg _cfg = new CommonStringCfg();
|
CommonStringCfg _cfg = new CommonStringCfg();
|
||||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
||||||
|
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(strRegionList,cfg.getScriberIdCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getScriberIdCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
strRegionList=map.get("dstList");
|
||||||
|
|
||||||
@@ -239,7 +242,7 @@ public class SchedulerTaskUtil {
|
|||||||
CommonStringCfg _cfg = new CommonStringCfg();
|
CommonStringCfg _cfg = new CommonStringCfg();
|
||||||
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
BeanUtils.copyProperties(cfg, _cfg, new String[]{"cfgId","menuNameCode"});
|
||||||
|
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(strRegionList,cfg.getDomainCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getDomainCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
strRegionList=map.get("dstList");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import com.nis.web.dao.CrudDao;
|
|||||||
import com.nis.web.dao.basics.*;
|
import com.nis.web.dao.basics.*;
|
||||||
import com.nis.web.dao.configuration.*;
|
import com.nis.web.dao.configuration.*;
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.apache.commons.collections.MapUtils;
|
||||||
import org.apache.commons.lang3.StringEscapeUtils;
|
import org.apache.commons.lang3.StringEscapeUtils;
|
||||||
import org.apache.ibatis.session.ExecutorType;
|
import org.apache.ibatis.session.ExecutorType;
|
||||||
import org.apache.ibatis.session.SqlSession;
|
import org.apache.ibatis.session.SqlSession;
|
||||||
@@ -3332,12 +3333,17 @@ public abstract class BaseService {
|
|||||||
//遍历,获取需要下发配置的组
|
//遍历,获取需要下发配置的组
|
||||||
StringBuffer realGroupIds=new StringBuffer();
|
StringBuffer realGroupIds=new StringBuffer();
|
||||||
for(PolicyGroupInfo policyGroupInfo:policyGroupInfos){
|
for(PolicyGroupInfo policyGroupInfo:policyGroupInfos){
|
||||||
|
/*
|
||||||
|
UdFlag=0时,为组新建或者域全部删除,域全部删除时需要清空cfg_index_info与policy_group_info的关系,如果cfg_index_info已经下发,则需要更新配置去除这个组,如果是cfg_index_info中最后一个组,取消maat配置
|
||||||
|
UdFlag=1时,组中有可选配置,obj-group-policy界面中组处于可选状态,该方法应不做任何处理
|
||||||
|
UdFlag=2时,组跟配置有明确关联,新增组下的域配置时,如果该配置未下发过,则不用处理,如果有下发过,则需下发最新的域。
|
||||||
|
*/
|
||||||
|
|
||||||
//if(policyGroupInfo.getUdFlag().equals(2)){
|
if(!policyGroupInfo.getUdFlag().equals(1)){
|
||||||
realGroupIds.append(policyGroupInfo.getServiceGroupId()).append(",");
|
realGroupIds.append(policyGroupInfo.getServiceGroupId()).append(",");
|
||||||
//}
|
}
|
||||||
//所有域都删除的时候
|
//realGroupIds中包含ipDeletedGroups,urlDeletedGroups,subIdDeletedGroups,domainDeletedGroups
|
||||||
if(policyGroupInfo.getUdFlag().equals(0)){
|
if(policyGroupInfo.getUdFlag().equals(0)){//所有域都删除的时候或者新建组的时候
|
||||||
if(policyGroupInfo.getGroupType().equals(Constants.IP_OBJ_GROUP_TYPE)){
|
if(policyGroupInfo.getGroupType().equals(Constants.IP_OBJ_GROUP_TYPE)){
|
||||||
ipDeletedGroups.add(policyGroupInfo.getServiceGroupId().toString());
|
ipDeletedGroups.add(policyGroupInfo.getServiceGroupId().toString());
|
||||||
}
|
}
|
||||||
@@ -3364,17 +3370,13 @@ public abstract class BaseService {
|
|||||||
//查询cfg_index_info表,获取所有用到了这个group_id的非删除配置
|
//查询cfg_index_info表,获取所有用到了这个group_id的非删除配置
|
||||||
List<CfgIndexInfo> cfgIndexInfos=commonPolicyDao.getObjGroupListByGroupIds(realGroupIds.toString(),null,null);
|
List<CfgIndexInfo> cfgIndexInfos=commonPolicyDao.getObjGroupListByGroupIds(realGroupIds.toString(),null,null);
|
||||||
|
|
||||||
CfgIndexInfo auditCfg=new CfgIndexInfo();
|
|
||||||
auditCfg.setTableName(CfgIndexInfo.getTablename());
|
|
||||||
auditCfg.setIsAudit(Constants.AUDIT_YES);
|
|
||||||
auditCfg.setAuditorId(UserUtils.getUser().getId());
|
|
||||||
auditCfg.setAuditTime(new Date());
|
|
||||||
List compileIds=new ArrayList();
|
List compileIds=new ArrayList();
|
||||||
//组织一个大的json
|
//组织一个大的json
|
||||||
ToMaatBean maatBean = new ToMaatBean();
|
ToMaatBean maatBean = new ToMaatBean();
|
||||||
ToMaatBean cancelMaatBean = new ToMaatBean();
|
ToMaatBean cancelMaatBean = new ToMaatBean();
|
||||||
ServiceConfigTemplateUtil templateUtil=new ServiceConfigTemplateUtil();
|
ServiceConfigTemplateUtil templateUtil=new ServiceConfigTemplateUtil();
|
||||||
Map<String,Object> interceptUserRegionMap=new HashMap<>();
|
Map<String,Object> interceptUserRegionMap=new HashMap<>();
|
||||||
|
Map<Integer,FunctionServiceDict> serviceDictMap=cfgIndexInfos.size()>0?ConfigConvertUtil.objGetServiceDict(cfgIndexInfos.get(0).getFunctionId()):new HashMap<Integer, FunctionServiceDict>();
|
||||||
for(CfgIndexInfo cfgIndexInfo:cfgIndexInfos){
|
for(CfgIndexInfo cfgIndexInfo:cfgIndexInfos){
|
||||||
Integer serviceId=cfgIndexInfo.getServiceId();
|
Integer serviceId=cfgIndexInfo.getServiceId();
|
||||||
if(serviceId!=null&&StringUtils.isNotBlank(cfgIndexInfo.getCommonGroupIds())){
|
if(serviceId!=null&&StringUtils.isNotBlank(cfgIndexInfo.getCommonGroupIds())){
|
||||||
@@ -3391,35 +3393,31 @@ public abstract class BaseService {
|
|||||||
Map<String,Object> userRgionMap=gsonFromJson(cfgIndexInfo.getCommonGroupIds(),Map.class);
|
Map<String,Object> userRgionMap=gsonFromJson(cfgIndexInfo.getCommonGroupIds(),Map.class);
|
||||||
cfgIndexInfo.setUserRegion(userRgionMap);
|
cfgIndexInfo.setUserRegion(userRgionMap);
|
||||||
String oldCommonGroupIds=cfgIndexInfo.getCommonGroupIds();
|
String oldCommonGroupIds=cfgIndexInfo.getCommonGroupIds();
|
||||||
|
//将所有要从配置中删除的组从配置中删除
|
||||||
this.processUserRegionMap(userRgionMap,"ipGroup",ipDeletedGroups,cfgIndexInfo,ipCommGroupCfgDao,IpCommCfg.class);
|
this.processUserRegionMap(userRgionMap,"ipGroup",ipDeletedGroups,cfgIndexInfo,ipCommGroupCfgDao,IpCommCfg.class);
|
||||||
this.processUserRegionMap(userRgionMap,"urlGroup",urlDeletedGroups,cfgIndexInfo,urlCommGroupCfgDao,UrlCommCfg.class);
|
this.processUserRegionMap(userRgionMap,"urlGroup",urlDeletedGroups,cfgIndexInfo,urlCommGroupCfgDao,UrlCommCfg.class);
|
||||||
this.processUserRegionMap(userRgionMap,"subscribeIdGroup",subIdDeletedGroups,cfgIndexInfo,scriberIdCommGroupDao,ScriberIdCommCfg.class);
|
this.processUserRegionMap(userRgionMap,"subscribeIdGroup",subIdDeletedGroups,cfgIndexInfo,scriberIdCommGroupDao,ScriberIdCommCfg.class);
|
||||||
this.processUserRegionMap(userRgionMap,"domainGroup",domainDeletedGroups,cfgIndexInfo,domainCommGroupDao,DomainCommCfg.class);
|
this.processUserRegionMap(userRgionMap,"domainGroup",domainDeletedGroups,cfgIndexInfo,domainCommGroupDao,DomainCommCfg.class);
|
||||||
|
|
||||||
//需要更新的组
|
//需要更新的组,组可能增加了,可能减少了,也有可能清空了(所有的域全删了)
|
||||||
cfgIndexInfo.setCommonGroupIds(gsonToJson(userRgionMap));
|
cfgIndexInfo.setCommonGroupIds(gsonToJson(userRgionMap));
|
||||||
if(CollectionUtils.isEmpty(cfgIndexInfo.getIpCommGroupCfgList())&&
|
if(MapUtils.isEmpty(userRgionMap)){//组清空了
|
||||||
CollectionUtils.isEmpty(cfgIndexInfo.getUrlCommGroupList())&&CollectionUtils.isEmpty(cfgIndexInfo.getScriberIdCommGroupList())&&
|
|
||||||
CollectionUtils.isEmpty(cfgIndexInfo.getDomainCommGroupList())){
|
|
||||||
cfgIndexInfo.setCommonGroupIds("");
|
cfgIndexInfo.setCommonGroupIds("");
|
||||||
if(cfgIndexInfo.getIsValid()==Constants.VALID_NO){//未生效
|
if(cfgIndexInfo.getIsValid()==Constants.VALID_NO){//未生效,直接更新配置,不用下发
|
||||||
toUpdateCfgIndexInfos.add(cfgIndexInfo);
|
toUpdateCfgIndexInfos.add(cfgIndexInfo);
|
||||||
}else{//生效
|
}else{//生效,需要取消配置
|
||||||
cfgIndexInfo.setIsValid(Constants.VALID_NO);
|
cfgIndexInfo.setIsValid(Constants.VALID_NO);
|
||||||
cfgIndexInfo.setIsAudit(Constants.AUDIT_NOT_YES);
|
cfgIndexInfo.setIsAudit(Constants.AUDIT_NOT_YES);
|
||||||
toCancelCfgIndexInfos.add(cfgIndexInfo);
|
toCancelCfgIndexInfos.add(cfgIndexInfo);
|
||||||
}
|
}
|
||||||
}else if(!oldCommonGroupIds.equals(cfgIndexInfo.getCommonGroupIds())){
|
}else if(!oldCommonGroupIds.equals(cfgIndexInfo.getCommonGroupIds())){//组有变化
|
||||||
toUpdateCfgIndexInfos.add(cfgIndexInfo);
|
toUpdateCfgIndexInfos.add(cfgIndexInfo);
|
||||||
//commonPolicyDao.updateCfgIndexCommonGroupIds(cfgIndexInfo);
|
//commonPolicyDao.updateCfgIndexCommonGroupIds(cfgIndexInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cfgIndexInfo.getIsValid().equals(Constants.VALID_YES)){
|
if(cfgIndexInfo.getIsValid().equals(Constants.VALID_YES)){//生效配置
|
||||||
//没组了,取消配置,没域了,取消配置
|
//没组了,取消配置,没域了,取消配置
|
||||||
if(userRgionMap.isEmpty()||(CollectionUtils.isEmpty(cfgIndexInfo.getIpCommGroupCfgList())&&
|
if(userRgionMap.isEmpty()){
|
||||||
CollectionUtils.isEmpty(cfgIndexInfo.getUrlCommGroupList())&&CollectionUtils.isEmpty(cfgIndexInfo.getScriberIdCommGroupList())&&
|
|
||||||
CollectionUtils.isEmpty(cfgIndexInfo.getDomainCommGroupList()))){
|
|
||||||
maatCfg.setCompileId(cfgIndexInfo.getCompileId());
|
maatCfg.setCompileId(cfgIndexInfo.getCompileId());
|
||||||
maatCfg.setServiceId(cfgIndexInfo.getServiceId());
|
maatCfg.setServiceId(cfgIndexInfo.getServiceId());
|
||||||
maatCfg.setIsValid(0);//无效
|
maatCfg.setIsValid(0);//无效
|
||||||
@@ -3466,7 +3464,7 @@ public abstract class BaseService {
|
|||||||
if(CollectionUtils.isNotEmpty(cfgIndexInfo.getIpCommGroupCfgList())){
|
if(CollectionUtils.isNotEmpty(cfgIndexInfo.getIpCommGroupCfgList())){
|
||||||
IpPortCfg cfg = new IpPortCfg();
|
IpPortCfg cfg = new IpPortCfg();
|
||||||
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
||||||
Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(ipRegionList,cfgIndexInfo.getIpCommGroupCfgList(),1,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,cfgIndexInfo.getIpCommGroupCfgList(),1,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
groupRelationList=map.get("groupList");
|
||||||
ipRegionList=map.get("dstList");
|
ipRegionList=map.get("dstList");
|
||||||
if(map.get("numRegionList")!=null){
|
if(map.get("numRegionList")!=null){
|
||||||
@@ -3478,7 +3476,7 @@ public abstract class BaseService {
|
|||||||
if(CollectionUtils.isNotEmpty(cfgIndexInfo.getUrlCommGroupList())){
|
if(CollectionUtils.isNotEmpty(cfgIndexInfo.getUrlCommGroupList())){
|
||||||
CommonStringCfg cfg = new CommonStringCfg();
|
CommonStringCfg cfg = new CommonStringCfg();
|
||||||
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(strRegionList,cfgIndexInfo.getUrlCommGroupList(),2,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfgIndexInfo.getUrlCommGroupList(),2,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
strRegionList=map.get("dstList");
|
||||||
}
|
}
|
||||||
@@ -3487,7 +3485,7 @@ public abstract class BaseService {
|
|||||||
CommonStringCfg cfg = new CommonStringCfg();
|
CommonStringCfg cfg = new CommonStringCfg();
|
||||||
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
||||||
|
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(strRegionList,cfgIndexInfo.getScriberIdCommGroupList(),2,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfgIndexInfo.getScriberIdCommGroupList(),2,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
strRegionList=map.get("dstList");
|
||||||
|
|
||||||
@@ -3497,7 +3495,7 @@ public abstract class BaseService {
|
|||||||
CommonStringCfg cfg = new CommonStringCfg();
|
CommonStringCfg cfg = new CommonStringCfg();
|
||||||
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
BeanUtils.copyProperties(cfgIndexInfo, cfg, new String[]{"cfgId"});
|
||||||
|
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(strRegionList,cfgIndexInfo.getDomainCommGroupList(),2,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfgIndexInfo.getDomainCommGroupList(),2,cfgIndexInfo,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
strRegionList=map.get("dstList");
|
||||||
|
|
||||||
@@ -3539,12 +3537,12 @@ public abstract class BaseService {
|
|||||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||||
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
maatBean.setOpAction(Constants.UPDATE_ACTION);
|
||||||
}
|
}
|
||||||
}else if(cfgIndexInfo.getIsValid().equals(Constants.VALID_NO)&&cfgIndexInfo.getIsAudit().equals(Constants.AUDIT_NOT_YES)){//生效的配置 置为了失效
|
}/*else if(cfgIndexInfo.getIsValid().equals(Constants.VALID_NO)&&cfgIndexInfo.getIsAudit().equals(Constants.AUDIT_NOT_YES)){//生效的配置 置为了失效
|
||||||
maatCfg.setCompileId(cfgIndexInfo.getCompileId());
|
maatCfg.setCompileId(cfgIndexInfo.getCompileId());
|
||||||
maatCfg.setServiceId(cfgIndexInfo.getServiceId());
|
maatCfg.setServiceId(cfgIndexInfo.getServiceId());
|
||||||
maatCfg.setIsValid(0);//无效
|
maatCfg.setIsValid(0);//无效
|
||||||
cancelConfigCompileList.add(maatCfg);
|
cancelConfigCompileList.add(maatCfg);
|
||||||
}
|
}*/
|
||||||
if(cancelConfigCompileList.size()>0&&CollectionUtils.isEmpty(cancelMaatBean.getConfigCompileList())){
|
if(cancelConfigCompileList.size()>0&&CollectionUtils.isEmpty(cancelMaatBean.getConfigCompileList())){
|
||||||
cancelMaatBean.setConfigCompileList(cancelConfigCompileList);
|
cancelMaatBean.setConfigCompileList(cancelConfigCompileList);
|
||||||
cancelMaatBean.setAuditTime(cfgIndexInfo.getAuditTime());
|
cancelMaatBean.setAuditTime(cfgIndexInfo.getAuditTime());
|
||||||
@@ -3566,10 +3564,10 @@ public abstract class BaseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//查询定时任务,失效定时任务
|
//查询定时任务,失效定时任务
|
||||||
if(ids.toString().length()>0){
|
// if(ids.toString().length()>0){
|
||||||
ids.deleteCharAt(ids.toString().length()-1);
|
// ids.deleteCharAt(ids.toString().length()-1);
|
||||||
commonPolicyDao.cancelScheduCfg(ids.toString(),CfgIndexInfo.getTablename());
|
// commonPolicyDao.cancelScheduCfg(ids.toString(),CfgIndexInfo.getTablename());
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
if(toUpdateCfgIndexInfos.size()>0){
|
if(toUpdateCfgIndexInfos.size()>0){
|
||||||
StringBuffer ids=new StringBuffer();
|
StringBuffer ids=new StringBuffer();
|
||||||
|
|||||||
@@ -2393,6 +2393,7 @@ public class ConfigSynchronizationService extends BaseService{
|
|||||||
commonPolicyDao.auditCfgBatch( entity.getTableName(), entity,compileIds,null);
|
commonPolicyDao.auditCfgBatch( entity.getTableName(), entity,compileIds,null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Map<Integer,FunctionServiceDict> serviceDictMap=ConfigConvertUtil.objGetServiceDict(entity.getFunctionId());
|
||||||
//批量获取regionId,groupId(相同编译下的IP类配置多条ip只获取一个组号),分组复用的域配置不需要重新获取regionId,groupId
|
//批量获取regionId,groupId(相同编译下的IP类配置多条ip只获取一个组号),分组复用的域配置不需要重新获取regionId,groupId
|
||||||
// List<Integer> regionIds = ConfigServiceUtil.getId(3, ipList.size()+strList.size()+complexStrList.size()+numList.size()+fileList.size());
|
// List<Integer> regionIds = ConfigServiceUtil.getId(3, ipList.size()+strList.size()+complexStrList.size()+numList.size()+fileList.size());
|
||||||
// List<Integer> groupIds = ConfigServiceUtil.getId(2, ipList.size()+strList.size()+complexStrList.size()+numList.size()+fileList.size());
|
// List<Integer> groupIds = ConfigServiceUtil.getId(2, ipList.size()+strList.size()+complexStrList.size()+numList.size()+fileList.size());
|
||||||
@@ -2436,7 +2437,7 @@ public class ConfigSynchronizationService extends BaseService{
|
|||||||
_cfg.setIsValid(entity.getIsValid());
|
_cfg.setIsValid(entity.getIsValid());
|
||||||
_cfg.setIsAudit(entity.getIsAudit());
|
_cfg.setIsAudit(entity.getIsAudit());
|
||||||
_cfg.setAuditTime(entity.getAuditTime());
|
_cfg.setAuditTime(entity.getAuditTime());
|
||||||
Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(ipRegionList,cfg.getIpCommGroupCfgList(),1,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,cfg.getIpCommGroupCfgList(),1,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
groupRelationList=map.get("groupList");
|
||||||
ipRegionList=map.get("dstList");
|
ipRegionList=map.get("dstList");
|
||||||
if(map.get("numRegionList")!=null){
|
if(map.get("numRegionList")!=null){
|
||||||
@@ -2451,7 +2452,7 @@ public class ConfigSynchronizationService extends BaseService{
|
|||||||
_cfg.setIsValid(entity.getIsValid());
|
_cfg.setIsValid(entity.getIsValid());
|
||||||
_cfg.setIsAudit(entity.getIsAudit());
|
_cfg.setIsAudit(entity.getIsAudit());
|
||||||
_cfg.setAuditTime(entity.getAuditTime());
|
_cfg.setAuditTime(entity.getAuditTime());
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(strRegionList,cfg.getUrlCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getUrlCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
strRegionList=map.get("dstList");
|
||||||
}
|
}
|
||||||
@@ -2462,7 +2463,7 @@ public class ConfigSynchronizationService extends BaseService{
|
|||||||
_cfg.setIsValid(entity.getIsValid());
|
_cfg.setIsValid(entity.getIsValid());
|
||||||
_cfg.setIsAudit(entity.getIsAudit());
|
_cfg.setIsAudit(entity.getIsAudit());
|
||||||
_cfg.setAuditTime(entity.getAuditTime());
|
_cfg.setAuditTime(entity.getAuditTime());
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(strRegionList,cfg.getScriberIdCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getScriberIdCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
strRegionList=map.get("dstList");
|
||||||
|
|
||||||
@@ -2474,7 +2475,7 @@ public class ConfigSynchronizationService extends BaseService{
|
|||||||
_cfg.setIsValid(entity.getIsValid());
|
_cfg.setIsValid(entity.getIsValid());
|
||||||
_cfg.setIsAudit(entity.getIsAudit());
|
_cfg.setIsAudit(entity.getIsAudit());
|
||||||
_cfg.setAuditTime(entity.getAuditTime());
|
_cfg.setAuditTime(entity.getAuditTime());
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(strRegionList,cfg.getDomainCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,cfg.getDomainCommGroupList(),2,_cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
strRegionList=map.get("dstList");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -93,9 +93,7 @@ public class ObjectGroupService extends BaseService {
|
|||||||
entity.setIsValid(0);
|
entity.setIsValid(0);
|
||||||
entity.setIsAudit(0);
|
entity.setIsAudit(0);
|
||||||
//设置service_id
|
//设置service_id
|
||||||
if("HTTP".equalsIgnoreCase(protocolType)){
|
if("HTTPS".equalsIgnoreCase(protocolType)){
|
||||||
|
|
||||||
}else if("HTTPS".equalsIgnoreCase(protocolType)){
|
|
||||||
if(entity.getAction().equals(1)){
|
if(entity.getAction().equals(1)){
|
||||||
entity.setServiceId(592);
|
entity.setServiceId(592);
|
||||||
}else if(entity.getAction().equals(16)){
|
}else if(entity.getAction().equals(16)){
|
||||||
@@ -103,6 +101,12 @@ public class ObjectGroupService extends BaseService {
|
|||||||
}
|
}
|
||||||
}else if("INTERCEPT".equalsIgnoreCase(protocolType)){
|
}else if("INTERCEPT".equalsIgnoreCase(protocolType)){
|
||||||
entity.setServiceId(512);
|
entity.setServiceId(512);
|
||||||
|
}else if("HTTP".equalsIgnoreCase(protocolType)){
|
||||||
|
if(entity.getAction().equals(1)){
|
||||||
|
entity.setServiceId(129);
|
||||||
|
}else if(entity.getAction().equals(16)){
|
||||||
|
entity.setServiceId(17);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(entity.getCfgId()==null){
|
if(entity.getCfgId()==null){
|
||||||
Integer compileId = 0;
|
Integer compileId = 0;
|
||||||
@@ -296,6 +300,8 @@ public class ObjectGroupService extends BaseService {
|
|||||||
Integer serviceId=entity.getServiceId();
|
Integer serviceId=entity.getServiceId();
|
||||||
Map<String,Object> maatTableMap=new HashMap<>();
|
Map<String,Object> maatTableMap=new HashMap<>();
|
||||||
|
|
||||||
|
Map<Integer,FunctionServiceDict> serviceDictMap=ConfigConvertUtil.objGetServiceDict(entity.getFunctionId());
|
||||||
|
|
||||||
StringBuffer userRegion=new StringBuffer();
|
StringBuffer userRegion=new StringBuffer();
|
||||||
if(serviceId!=null){
|
if(serviceId!=null){
|
||||||
if(isAudit==1){
|
if(isAudit==1){
|
||||||
@@ -326,7 +332,7 @@ public class ObjectGroupService extends BaseService {
|
|||||||
//cfg.setTableName("ip_comm_cfg");
|
//cfg.setTableName("ip_comm_cfg");
|
||||||
//commonPolicyDao.auditCfg(cfg);
|
//commonPolicyDao.auditCfg(cfg);
|
||||||
if(isAudit==1){
|
if(isAudit==1){
|
||||||
Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(ipRegionList,entity.getIpCommGroupCfgList(),1,cfg,groupRelationList,maatTableMap,groupIdSet);
|
Map<String,List> map = ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,ipRegionList,entity.getIpCommGroupCfgList(),1,cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
groupRelationList=map.get("groupList");
|
||||||
ipRegionList=map.get("dstList");
|
ipRegionList=map.get("dstList");
|
||||||
if(map.get("numRegionList")!=null){
|
if(map.get("numRegionList")!=null){
|
||||||
@@ -341,7 +347,7 @@ public class ObjectGroupService extends BaseService {
|
|||||||
//cfg.setTableName(CommonStringCfg.getTablename());
|
//cfg.setTableName(CommonStringCfg.getTablename());
|
||||||
//commonPolicyDao.auditCfg(cfg);
|
//commonPolicyDao.auditCfg(cfg);
|
||||||
if(isAudit==1){
|
if(isAudit==1){
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(strRegionList,entity.getUrlCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,entity.getUrlCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
strRegionList=map.get("dstList");
|
||||||
}
|
}
|
||||||
@@ -353,7 +359,7 @@ public class ObjectGroupService extends BaseService {
|
|||||||
//cfg.setTableName(CommonStringCfg.getTablename());
|
//cfg.setTableName(CommonStringCfg.getTablename());
|
||||||
//commonPolicyDao.auditCfg(cfg);
|
//commonPolicyDao.auditCfg(cfg);
|
||||||
if(isAudit==1){
|
if(isAudit==1){
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(strRegionList,entity.getScriberIdCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,entity.getScriberIdCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
strRegionList=map.get("dstList");
|
||||||
}
|
}
|
||||||
@@ -365,7 +371,7 @@ public class ObjectGroupService extends BaseService {
|
|||||||
//cfg.setTableName(CommonStringCfg.getTablename());
|
//cfg.setTableName(CommonStringCfg.getTablename());
|
||||||
//commonPolicyDao.auditCfg(cfg);
|
//commonPolicyDao.auditCfg(cfg);
|
||||||
if(isAudit==1){
|
if(isAudit==1){
|
||||||
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(strRegionList,entity.getDomainCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
Map<String,List> map =ConfigConvertUtil.objGroupCfgConvert(serviceDictMap,strRegionList,entity.getDomainCommGroupList(),2,cfg,groupRelationList,maatTableMap,groupIdSet);
|
||||||
groupRelationList=map.get("groupList");
|
groupRelationList=map.get("groupList");
|
||||||
strRegionList=map.get("dstList");
|
strRegionList=map.get("dstList");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1644,6 +1644,7 @@ domain_group=Domain Group
|
|||||||
url_group=URL Group
|
url_group=URL Group
|
||||||
subscribe_id_group=Subscribe Id Group
|
subscribe_id_group=Subscribe Id Group
|
||||||
at_least_one_group=Please choose at least one group
|
at_least_one_group=Please choose at least one group
|
||||||
|
most_seven_group=At most 7 groups you can choose
|
||||||
most_eight_group=At most 8 groups you can choose
|
most_eight_group=At most 8 groups you can choose
|
||||||
no_common_group=The configuration ID of %s does not have a group;
|
no_common_group=The configuration ID of %s does not have a group;
|
||||||
#---------------------------Object List Group Manage------------------------------------
|
#---------------------------Object List Group Manage------------------------------------
|
||||||
|
|||||||
@@ -1590,7 +1590,7 @@ max=\u041C\u0430\u043A\u0441.
|
|||||||
decrypt_mirror=\u0420\u0430\u0441\u0448\u0438\u0444\u0440\u043E\u0432\u0430\u0442\u044C \u0417\u0435\u0440\u043A\u0430\u043B\u043E
|
decrypt_mirror=\u0420\u0430\u0441\u0448\u0438\u0444\u0440\u043E\u0432\u0430\u0442\u044C \u0417\u0435\u0440\u043A\u0430\u043B\u043E
|
||||||
enable=\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C
|
enable=\u0412\u043A\u043B\u044E\u0447\u0438\u0442\u044C
|
||||||
forward=\u041F\u0435\u0440\u0435\u0434\u043D\u0438\u0439
|
forward=\u041F\u0435\u0440\u0435\u0434\u043D\u0438\u0439
|
||||||
decrypt_mirror_enable_on=\u0415\u0441\u043B\u0438 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u0440\u0430\u0432\u043D\u043E <EFBFBD>1<EFBFBD>, \u0442\u043E \u043E\u043F\u0446\u0438\u044F "\u043F\u0440\u043E\u0444\u0438\u043B\u044C \u0437\u0435\u0440\u043A\u0430\u043B\u0430" \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C \u0432\u044B\u0431\u0440\u0430\u043D\u0430.
|
decrypt_mirror_enable_on=\u0415\u0441\u043B\u0438 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u0430 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u0440\u0430\u0432\u043D\u043E ?1?, \u0442\u043E \u043E\u043F\u0446\u0438\u044F "\u043F\u0440\u043E\u0444\u0438\u043B\u044C \u0437\u0435\u0440\u043A\u0430\u043B\u0430" \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C \u0432\u044B\u0431\u0440\u0430\u043D\u0430.
|
||||||
ssl_ver_mirror_client_on=\u0415\u0441\u043B\u0438 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043E\u043F\u0446\u0438\u0438 \u0437\u0435\u0440\u043A\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u043A\u043B\u0438\u0435\u043D\u0442\u0430 \u0440\u0430\u0432\u043D\u043E 1, \u043C\u0438\u043D. \u0432\u0435\u0440\u0441\u0438\u044F SSL \u0438 \u043C\u0430\u043A\u0441. \u0432\u0435\u0440\u0441\u0438\u044F SSL \u0431\u0443\u0434\u0443\u0442 \u0438\u0433\u043D\u043E\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F
|
ssl_ver_mirror_client_on=\u0415\u0441\u043B\u0438 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043E\u043F\u0446\u0438\u0438 \u0437\u0435\u0440\u043A\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u043A\u043B\u0438\u0435\u043D\u0442\u0430 \u0440\u0430\u0432\u043D\u043E 1, \u043C\u0438\u043D. \u0432\u0435\u0440\u0441\u0438\u044F SSL \u0438 \u043C\u0430\u043A\u0441. \u0432\u0435\u0440\u0441\u0438\u044F SSL \u0431\u0443\u0434\u0443\u0442 \u0438\u0433\u043D\u043E\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C\u0441\u044F
|
||||||
#---------------------------Proxy Manipulate------------------------------------
|
#---------------------------Proxy Manipulate------------------------------------
|
||||||
profile_info=\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u043E \u041F\u0440\u043E\u0444\u0438\u043B\u0435
|
profile_info=\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u043E \u041F\u0440\u043E\u0444\u0438\u043B\u0435
|
||||||
@@ -1648,6 +1648,7 @@ domain_group=Domain Group
|
|||||||
url_group=URL \u0413\u0440\u0443\u043F\u043F\u0430
|
url_group=URL \u0413\u0440\u0443\u043F\u043F\u0430
|
||||||
subscribe_id_group=\u0413\u0440\u0443\u043F\u043F\u0430 \u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u0430 \u0410\u0431\u043E\u043D\u0435\u043D\u0442\u043E\u0432
|
subscribe_id_group=\u0413\u0440\u0443\u043F\u043F\u0430 \u0418\u0434\u0435\u043D\u0442\u0438\u0444\u0438\u043A\u0430\u0442\u043E\u0440\u0430 \u0410\u0431\u043E\u043D\u0435\u043D\u0442\u043E\u0432
|
||||||
at_least_one_group=\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0445\u043E\u0442\u044F \u0431\u044B \u043E\u0434\u043D\u0443 \u0433\u0440\u0443\u043F\u043F\u0443
|
at_least_one_group=\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0445\u043E\u0442\u044F \u0431\u044B \u043E\u0434\u043D\u0443 \u0433\u0440\u0443\u043F\u043F\u0443
|
||||||
|
most_seven_group=\u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0432\u044B\u0431\u0440\u0430\u0442\u044C \u0434\u043E 7 \u0433\u0440\u0443\u043F\u043F
|
||||||
most_eight_group=\u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0432\u044B\u0431\u0440\u0430\u0442\u044C \u0434\u043E 8 \u0433\u0440\u0443\u043F\u043F
|
most_eight_group=\u0412\u044B \u043C\u043E\u0436\u0435\u0442\u0435 \u0432\u044B\u0431\u0440\u0430\u0442\u044C \u0434\u043E 8 \u0433\u0440\u0443\u043F\u043F
|
||||||
no_common_group=The configuration ID of %s does not have a group;
|
no_common_group=The configuration ID of %s does not have a group;
|
||||||
#---------------------------Object List Group Manage------------------------------------
|
#---------------------------Object List Group Manage------------------------------------
|
||||||
|
|||||||
@@ -1644,6 +1644,7 @@ domain_group=\u57DF\u540D\u7EC4
|
|||||||
url_group=URL\u7EC4
|
url_group=URL\u7EC4
|
||||||
subscribe_id_group=\u8D26\u53F7\u7EC4
|
subscribe_id_group=\u8D26\u53F7\u7EC4
|
||||||
at_least_one_group=\u8FB7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u7EC4
|
at_least_one_group=\u8FB7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u7EC4
|
||||||
|
most_seven_group=\u81F3\u591A\u53EF\u9009\u62E9\u0037\u4E2A\u7EC4
|
||||||
most_eight_group=\u81F3\u591A\u53EF\u9009\u62E9\u0038\u4E2A\u7EC4
|
most_eight_group=\u81F3\u591A\u53EF\u9009\u62E9\u0038\u4E2A\u7EC4
|
||||||
no_common_group=ID\u4E3A%s\u7684\u914D\u7F6E\u7F3A\u5C11\u7EC4
|
no_common_group=ID\u4E3A%s\u7684\u914D\u7F6E\u7F3A\u5C11\u7EC4
|
||||||
#---------------------------Object List Group Manage------------------------------------
|
#---------------------------Object List Group Manage------------------------------------
|
||||||
|
|||||||
@@ -154,16 +154,16 @@
|
|||||||
<service id="129" functionId="8" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="HTTP高级配置监测">
|
<service id="129" functionId="8" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="HTTP高级配置监测">
|
||||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE"></serviceCfg>
|
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE"></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="http_url_cfg" maatTable="NTC_HTTP_URL"></serviceCfg>
|
<serviceCfg cfgType="2" tableName="http_url_cfg" maatTable="NTC_HTTP_URL"></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="http_body_cfg" maatTable="NTC_HTTP_REQ_BODY,NTC_HTTP_RES_ BODY"></serviceCfg>
|
<serviceCfg cfgType="2" tableName="http_body_cfg" ></serviceCfg>
|
||||||
<serviceCfg cfgType="3" tableName="http_req_head_cfg" maatTable="NTC_HTTP_REQ_HDR"></serviceCfg>
|
<serviceCfg cfgType="3" tableName="http_req_head_cfg" maatTable="NTC_HTTP_REQ_HDR"></serviceCfg>
|
||||||
<serviceCfg cfgType="3" tableName="http_res_head_cfg" maatTable="NTC_HTTP_RES_HDR"></serviceCfg>
|
<serviceCfg cfgType="3" tableName="http_res_head_cfg" maatTable="NTC_HTTP_RES_HDR"></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||||
<userRegion regionKey="HTTP_HEADER" regionColumn="district" userRegionPosition="2"></userRegion>
|
<userRegion regionKey="HTTP_HEADER" regionColumn="district" userRegionPosition="2"></userRegion>
|
||||||
</service>
|
</service>
|
||||||
<service id="17" functionId="8" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="HTTP高级配置封堵">
|
<service id="17" functionId="8" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="HTTP高级配置封堵">
|
||||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
<serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE"></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="http_url_cfg" maatTable="NTC_HTTP_URL"></serviceCfg>
|
<serviceCfg cfgType="2" tableName="http_url_cfg" maatTable="NTC_HTTP_URL"></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="http_body_cfg" maatTable="NTC_HTTP_REQ_BODY,NTC_HTTP_RES_BODY"></serviceCfg>
|
<serviceCfg cfgType="2" tableName="http_body_cfg" ></serviceCfg>
|
||||||
<serviceCfg cfgType="3" tableName="http_req_head_cfg" maatTable="NTC_HTTP_REQ_HDR"></serviceCfg>
|
<serviceCfg cfgType="3" tableName="http_req_head_cfg" maatTable="NTC_HTTP_REQ_HDR"></serviceCfg>
|
||||||
<serviceCfg cfgType="3" tableName="http_res_head_cfg" maatTable="NTC_HTTP_RES_HDR"></serviceCfg>
|
<serviceCfg cfgType="3" tableName="http_res_head_cfg" maatTable="NTC_HTTP_RES_HDR"></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||||
@@ -435,6 +435,6 @@
|
|||||||
<serviceCfg cfgType="3" tableName="http_res_head_cfg" ></serviceCfg>
|
<serviceCfg cfgType="3" tableName="http_res_head_cfg" ></serviceCfg>
|
||||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||||
</service>
|
</service>
|
||||||
<service id="0" serviceIds="512,592" functionId="888" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="公共分组监测"></service>
|
<service id="0" serviceIds="512,592,129" functionId="888" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="公共分组监测"></service>
|
||||||
<service id="-1" serviceIds="576" functionId="888" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="公共分组阻断"></service>
|
<service id="-1" serviceIds="576,17" functionId="888" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="公共分组阻断"></service>
|
||||||
</serviceList>
|
</serviceList>
|
||||||
@@ -33,7 +33,7 @@ $(function(){
|
|||||||
//处理do_log
|
//处理do_log
|
||||||
$(".doLog").addClass("hidden");
|
$(".doLog").addClass("hidden");
|
||||||
$("[name='doLog']").find("[value=2]").prop("checked",true);
|
$("[name='doLog']").find("[value=2]").prop("checked",true);
|
||||||
}else if('${_cfg.userRegion1}'=='https'){
|
}else if('${_cfg.userRegion1}'=='https'||'${_cfg.userRegion1}'=='http'){
|
||||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||||
}else if("${_cfg.userRegion1}"==""){
|
}else if("${_cfg.userRegion1}"==""){
|
||||||
if($("[name=userRegion1]").val()!="intercept"){
|
if($("[name=userRegion1]").val()!="intercept"){
|
||||||
@@ -112,6 +112,10 @@ $(function(){
|
|||||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||||
//处理do_log
|
//处理do_log
|
||||||
$(".doLog").removeClass("hidden");
|
$(".doLog").removeClass("hidden");
|
||||||
|
}else if("http"==$(this).val()){
|
||||||
|
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||||
|
//处理do_log
|
||||||
|
$(".doLog").removeClass("hidden");
|
||||||
}else{
|
}else{
|
||||||
$(".urlGroup").removeClass("hidden").removeClass("disabled");
|
$(".urlGroup").removeClass("hidden").removeClass("disabled");
|
||||||
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
|
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
|
||||||
@@ -156,9 +160,16 @@ $(function(){
|
|||||||
if(grouplen==0){
|
if(grouplen==0){
|
||||||
top.$.jBox.tip("<spring:message code='at_least_one_group'/>", "<spring:message code='info'/>");
|
top.$.jBox.tip("<spring:message code='at_least_one_group'/>", "<spring:message code='info'/>");
|
||||||
return;
|
return;
|
||||||
}else if(grouplen>8){
|
}else{
|
||||||
top.$.jBox.tip("<spring:message code='most_eight_group'/>", "<spring:message code='info'/>");
|
if($("[name='userRegion1']").val()=="http"&&ipGroupLen>0){
|
||||||
return;
|
if(grouplen>7){
|
||||||
|
top.$.jBox.tip("<spring:message code='most_seven_group'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}else if(grouplen>8){
|
||||||
|
top.$.jBox.tip("<spring:message code='most_eight_group'/>", "<spring:message code='info'/>");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var flag1=validateInvisibleCharTag();
|
var flag1=validateInvisibleCharTag();
|
||||||
if(flag){
|
if(flag){
|
||||||
@@ -331,7 +342,7 @@ var delContent = function(contentClassName, addBtnClassName) {
|
|||||||
<select name="userRegion1" data-live-search="true" class="selectpicker form-control">
|
<select name="userRegion1" data-live-search="true" class="selectpicker form-control">
|
||||||
<option value="https" <c:if test="${_cfg.userRegion1 eq 'https'}">selected</c:if>><spring:message code="HTTPS"/></option>
|
<option value="https" <c:if test="${_cfg.userRegion1 eq 'https'}">selected</c:if>><spring:message code="HTTPS"/></option>
|
||||||
<option value="intercept" <c:if test="${_cfg.userRegion1 eq 'intercept'}">selected</c:if>> <spring:message code="intercept"/></option>
|
<option value="intercept" <c:if test="${_cfg.userRegion1 eq 'intercept'}">selected</c:if>> <spring:message code="intercept"/></option>
|
||||||
<%--<option value="http" <c:if test="${_cfg.userRegion1 eq 'http'}">selected</c:if>> <spring:message code="HTTP"/></option>--%>
|
<option value="http" <c:if test="${_cfg.userRegion1 eq 'http'}">selected</c:if>> <spring:message code="HTTP"/></option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -247,16 +247,7 @@
|
|||||||
<form:select id="actionSelect" path="action" class="selectpicker select2 input-small" >
|
<form:select id="actionSelect" path="action" class="selectpicker select2 input-small" >
|
||||||
<form:option value=""><spring:message code="select"/></form:option>
|
<form:option value=""><spring:message code="select"/></form:option>
|
||||||
<c:forEach items="${serviceList}" var="service">
|
<c:forEach items="${serviceList}" var="service">
|
||||||
|
<form:option value="${service.action }"><spring:message code="action_${service.actionCode }"/></form:option>
|
||||||
<c:choose>
|
|
||||||
<c:when test="${service.action eq 16}">
|
|
||||||
<form:option value="${service.action }"><spring:message code="block_drop"/></form:option>
|
|
||||||
</c:when>
|
|
||||||
<c:otherwise>
|
|
||||||
<form:option value="${service.action }"><spring:message code="action_${service.actionCode }"/></form:option>
|
|
||||||
</c:otherwise>
|
|
||||||
</c:choose>
|
|
||||||
|
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</form:select>
|
</form:select>
|
||||||
<form:select path="isValid" class="selectpicker select2 input-small" >
|
<form:select path="isValid" class="selectpicker select2 input-small" >
|
||||||
|
|||||||
Reference in New Issue
Block a user