Merge branch 'develop_no_common_group' of https://git.mesalab.cn/K18_NTCS_WEB/NTC.git into develop_no_common_group
This commit is contained in:
@@ -61,6 +61,9 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
|
||||
protected Integer compileIsIssued;
|
||||
protected String exType;//导出类型
|
||||
protected String hColumns;//导出隐藏列
|
||||
|
||||
protected String compileIdNew;// 查询 配置ID 范围
|
||||
|
||||
/**
|
||||
* 定时任务信息
|
||||
*/
|
||||
@@ -107,6 +110,12 @@ public class BaseCfg<T> extends BaseEntity<T> implements Cloneable{
|
||||
public void setCompileGroupMap(Map<Integer, Integer> compileGroupMap) {
|
||||
this.compileGroupMap = compileGroupMap;
|
||||
}
|
||||
public String getCompileIdNew() {
|
||||
return compileIdNew;
|
||||
}
|
||||
public void setCompileIdNew(String compileIdNew) {
|
||||
this.compileIdNew = compileIdNew;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编译id
|
||||
|
||||
@@ -71,6 +71,7 @@ public class ScheduleUpdateInterceptor extends BaseInterceptor{
|
||||
EXCLUDE_MAPPER_IDS.add("com.nis.web.dao.basics.ServiceDictInfoDao");
|
||||
EXCLUDE_MAPPER_IDS.add("com.nis.web.dao.configuration.PxyObjKeyringDao.updatePxyObjTrustedCaCrl");
|
||||
EXCLUDE_MAPPER_IDS.add("com.nis.web.dao.configuration.CommonPolicyDao.auditCfgBatch");
|
||||
EXCLUDE_MAPPER_IDS.add("com.nis.web.dao.configuration.CommonPolicyDao.deleteCfgBatch");
|
||||
}
|
||||
/**
|
||||
* is_valid 字段名
|
||||
@@ -200,6 +201,7 @@ public class ScheduleUpdateInterceptor extends BaseInterceptor{
|
||||
sc.setCompileId(compileId);
|
||||
sc.setEditorId(bc.getEditorId());
|
||||
sc.setEditTime(bc.getEditTime());
|
||||
sc.setType(1);
|
||||
sc.setCfgId(cfgId);
|
||||
//根据 compileId 删除之前的
|
||||
MappedStatement statement = configuration.getMappedStatement("com.nis.web.dao.SchedulerDao.deleteByCompileId");
|
||||
@@ -276,6 +278,7 @@ public class ScheduleUpdateInterceptor extends BaseInterceptor{
|
||||
MappedStatement statement = configuration.getMappedStatement("com.nis.web.dao.SchedulerDao.insert");
|
||||
scfg.setIsValid(isValid);
|
||||
scfg.setIsAudit(isAudit);
|
||||
scfg.setType(1);
|
||||
executor.update(statement, scfg);
|
||||
}
|
||||
//手动 审核通过,立即生效时 已经下发,修改 exce_new 表的是否需要下发字段为 不需要 : 0
|
||||
|
||||
@@ -131,6 +131,7 @@ import com.nis.util.Constants;
|
||||
import com.nis.util.DateUtils;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.JsonMapper;
|
||||
import com.nis.util.Reflections;
|
||||
import com.nis.util.ServiceConfigTemplateUtil;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.excel.ExcelCsv;
|
||||
@@ -2816,10 +2817,10 @@ public class BaseController {
|
||||
BeanUtils.copyProperties(entity, searchAsnIpCfg);
|
||||
}
|
||||
|
||||
auditType = (Integer)Reflections.invokeGetter(entity, "isAudit");
|
||||
|
||||
|
||||
//全部审核通过,只查询当前条件下的所有未审核的配置
|
||||
if(auditType.equals(1)) {
|
||||
//全部审核通过,只查询当前条件下的所有未审核的配置 -批量审核通过/不通过
|
||||
if(auditType.equals(1) || auditType.equals(2)) {
|
||||
searchCfg.setIsValid(0);
|
||||
searchCfg.setIsAudit(0);
|
||||
searchAppCfg.setIsValid(0);
|
||||
@@ -2859,8 +2860,13 @@ public class BaseController {
|
||||
searchAsnIpCfg.setIsValid(0);
|
||||
searchAsnIpCfg.setIsAudit(0);
|
||||
|
||||
if(auditType.equals(1)) {
|
||||
auditBatchCfg.setIsAudit(1);
|
||||
auditBatchCfg.setIsValid(1);
|
||||
}else {
|
||||
auditBatchCfg.setIsAudit(2);
|
||||
auditBatchCfg.setIsValid(0);
|
||||
}
|
||||
auditBatchCfg.setAuditTime(new Date());
|
||||
auditBatchCfg.setAuditorId(UserUtils.getUser().getId());
|
||||
}else {
|
||||
@@ -2916,12 +2922,11 @@ public class BaseController {
|
||||
functionId=auditBatchCfg.getFunctionId();
|
||||
}
|
||||
List<Map<String,Object>> serviceList = serviceTemplate.getServiceListByFunctionId(functionId);
|
||||
|
||||
for(Map<String,Object> service:serviceList){
|
||||
String tableNameXml = service.get("tableName").toString();
|
||||
String serviceTypeXml = service.get("serviceType").toString();
|
||||
String classNameXml = service.get("className").toString();
|
||||
String serviceIdXml = service.get("id").toString();
|
||||
String tableNameXml = service.get("tableName").toString(); // 获取业务主配置表
|
||||
String serviceTypeXml = service.get("serviceType").toString(); // 业务类型 1maat 2callback
|
||||
String classNameXml = service.get("className").toString(); // 主配置Java类
|
||||
String serviceIdXml = service.get("id").toString(); // service字典表 service_id字段
|
||||
auditBatchCfg.setServiceId(Integer.valueOf(serviceIdXml));
|
||||
auditBatchCfg.setTableName(tableNameXml);
|
||||
searchCfg.setServiceId(Integer.valueOf(serviceIdXml));
|
||||
@@ -2962,6 +2967,7 @@ public class BaseController {
|
||||
searchAppSslCertCfg.setTableName(tableNameXml);
|
||||
|
||||
if("1".equals(serviceTypeXml)){//maat类配置
|
||||
// 存放域配置类型 及 对应表名
|
||||
List<Map<String,Object>> cfgList = (List<Map<String, Object>>) service.get("cfgList");
|
||||
List<Map<String,Object>> userRegionList = (List<Map<String, Object>>) service.get("userRegionList");
|
||||
if(!StringUtil.isEmpty(cfgList)) {
|
||||
@@ -2971,21 +2977,25 @@ public class BaseController {
|
||||
while(hasData){
|
||||
page.setPageNo(1);
|
||||
page.setLastPage(false);
|
||||
List<CfgIndexInfo> list=getDataList(page,searchCfg,null,null,null);
|
||||
List<CfgIndexInfo> list = getDataList(page,searchCfg,null,null,null); // 通过ServiceId获取cfg_index_info主配置表数据
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
//配置生效处理 复用全量下发
|
||||
if(auditBatchCfg.getIsValid().equals(1)) {
|
||||
hasData=configSynchronizationService.auditNtcMaatData(cfgList,userRegionList,page,auditBatchCfg,list,hasData,true);
|
||||
}else {//配置失效处理 批量处理
|
||||
List<BaseCfg> cfgIndexList=new ArrayList<>();
|
||||
if(auditBatchCfg.getIsAudit().equals(1)) {
|
||||
hasData = configSynchronizationService.auditNtcMaatData(cfgList,userRegionList,page,auditBatchCfg,list,hasData,true);
|
||||
}else {
|
||||
List<BaseCfg> BaseCfgList=new ArrayList<>();
|
||||
if(!StringUtil.isEmpty(list)) {
|
||||
for (CfgIndexInfo cfg : list) {
|
||||
BaseCfg baseCfg=new BaseCfg();
|
||||
BeanUtils.copyProperties(cfg, baseCfg);
|
||||
cfgIndexList.add(baseCfg);
|
||||
BaseCfgList.add(baseCfg);
|
||||
}
|
||||
}
|
||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg, cfgIndexList, hasData);
|
||||
if(auditBatchCfg.getIsAudit().equals(2)) {// 配置批量审核不通过
|
||||
hasData = commonPolicyService.batchUnApproveMaatData(cfgList, page, auditBatchCfg, BaseCfgList, hasData);
|
||||
}else {// 配置失效处理 批量处理
|
||||
hasData = commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg, BaseCfgList, hasData);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
hasData = false;
|
||||
@@ -3001,9 +3011,9 @@ public class BaseController {
|
||||
List<FileDigestCfg> list=getDataList(page,null,null,searchDigestCfg,null);
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
//配置生效处理 复用全量下发
|
||||
if(auditBatchCfg.getIsValid().equals(1)) {
|
||||
if(auditBatchCfg.getIsAudit().equals(1)) {
|
||||
hasData=configSynchronizationService.auditFileDigestData(cfgList, userRegionList, page, auditBatchCfg, list, hasData, true);
|
||||
}else {//配置失效处理 批量处理
|
||||
}else {
|
||||
List<BaseCfg> baseCfgList=new ArrayList<>();
|
||||
if(!StringUtil.isEmpty(list)) {
|
||||
for (FileDigestCfg cfg : list) {
|
||||
@@ -3012,8 +3022,12 @@ public class BaseController {
|
||||
baseCfgList.add(baseCfg);
|
||||
}
|
||||
}
|
||||
if(auditBatchCfg.getIsAudit().equals(2)) {// 配置批量审核不通过
|
||||
hasData = commonPolicyService.batchUnApproveMaatData(cfgList, page, auditBatchCfg, baseCfgList, hasData);
|
||||
}else {// 配置失效处理 批量处理
|
||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,baseCfgList, hasData);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
hasData = false;
|
||||
}
|
||||
@@ -3027,9 +3041,9 @@ public class BaseController {
|
||||
List<AppPolicyCfg> list=getDataList(page,null,searchAppCfg,null,null);
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
//配置生效处理 复用全量下发
|
||||
if(auditBatchCfg.getIsValid().equals(1)) {
|
||||
if(auditBatchCfg.getIsAudit().equals(1)) {
|
||||
hasData=configSynchronizationService.auditAppPolicyData(cfgList,userRegionList,page,auditBatchCfg,list,hasData,true);
|
||||
}else {//配置失效处理 批量处理
|
||||
}else {
|
||||
List<BaseCfg> cfgAppList=new ArrayList<>();
|
||||
if(!StringUtil.isEmpty(list)) {
|
||||
for (AppPolicyCfg cfg : list) {
|
||||
@@ -3038,8 +3052,12 @@ public class BaseController {
|
||||
cfgAppList.add(baseCfg);
|
||||
}
|
||||
}
|
||||
if(auditBatchCfg.getIsAudit().equals(2)) {// 配置批量审核不通过
|
||||
hasData = commonPolicyService.batchUnApproveMaatData(cfgList, page, auditBatchCfg, cfgAppList, hasData);
|
||||
}else {// 配置失效处理 批量处理
|
||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,cfgAppList, hasData);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
hasData = false;
|
||||
}
|
||||
@@ -3054,9 +3072,9 @@ public class BaseController {
|
||||
List<AppFeatureIndex> list=getDataList(page,null,null,null,searchAppFeatureIndex);
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
//配置生效处理 复用全量下发
|
||||
if(auditBatchCfg.getIsValid().equals(1)) {
|
||||
if(auditBatchCfg.getIsAudit().equals(1)) {
|
||||
hasData=configSynchronizationService.auditAppFeatureData(cfgList,userRegionList,page,auditBatchCfg,list,hasData,true);
|
||||
}else {//配置失效处理 批量处理
|
||||
}else {
|
||||
List<BaseCfg> cfgFeatrureList=new ArrayList<>();
|
||||
if(!StringUtil.isEmpty(list)) {
|
||||
for (AppFeatureIndex cfg : list) {
|
||||
@@ -3065,8 +3083,12 @@ public class BaseController {
|
||||
cfgFeatrureList.add(baseCfg);
|
||||
}
|
||||
}
|
||||
if(auditBatchCfg.getIsAudit().equals(2)) {// 配置批量审核不通过
|
||||
hasData = commonPolicyService.batchUnApproveMaatData(cfgList, page, auditBatchCfg, cfgFeatrureList, hasData);
|
||||
}else {// 配置失效处理 批量处理
|
||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,cfgFeatrureList, hasData);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
hasData = false;
|
||||
}
|
||||
@@ -3085,7 +3107,8 @@ public class BaseController {
|
||||
|
||||
List<DdosIpCfg> list=ddosCfgService.findPage(page, searchDdosIpCfg).getList();
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
if(auditBatchCfg.getIsValid().equals(1)) {
|
||||
// 配置生效处理
|
||||
if(auditBatchCfg.getIsAudit().equals(1)) {
|
||||
hasData=configSynchronizationService.auditDdosMaatData(cfgList,userRegionList,
|
||||
page,auditBatchCfg,list,hasData,true);
|
||||
}else {
|
||||
@@ -3096,8 +3119,12 @@ public class BaseController {
|
||||
newList.add(cfg);
|
||||
}
|
||||
}
|
||||
if(auditBatchCfg.getIsAudit().equals(2)) {// 配置批量审核不通过
|
||||
hasData = commonPolicyService.batchUnApproveMaatData(cfgList, page, auditBatchCfg, newList, hasData);
|
||||
}else {// 配置失效处理 批量处理
|
||||
hasData=commonPolicyService.auditNtcMaatData(cfgList, page, auditBatchCfg,newList, hasData);
|
||||
}
|
||||
}
|
||||
if(hasData) {
|
||||
page.setPageNo(1);
|
||||
page.setLastPage(false);
|
||||
@@ -3324,7 +3351,181 @@ public class BaseController {
|
||||
logger.warn("配置批量生效/失效耗时:"+(end-start));
|
||||
}
|
||||
|
||||
/**
|
||||
* 界面批量删除当前检索条件下的配置
|
||||
* @param page
|
||||
* @param functionId
|
||||
* @param entity
|
||||
* @throws Exception
|
||||
*/
|
||||
public void deleteAll(Page page,Integer functionId, Object entity)throws Exception {
|
||||
long start=System.currentTimeMillis();
|
||||
page.setOrderBy("");
|
||||
page.setPageSize(Constants.MAAT_JSON_SEND_SIZE);
|
||||
page.setPageNo(1);
|
||||
page.setLastPage(false);
|
||||
|
||||
// 只有未审核的配置可删除
|
||||
CfgIndexInfo searchCfg = new CfgIndexInfo();
|
||||
AppPolicyCfg searchAppCfg=new AppPolicyCfg();
|
||||
FileDigestCfg searchDigestCfg=new FileDigestCfg();
|
||||
AvFileSampleCfg searchFileSampleCfg=new AvFileSampleCfg();
|
||||
DdosIpCfg searchDdosIpCfg=new DdosIpCfg();
|
||||
|
||||
// 传递检索条件
|
||||
if(entity != null && (entity instanceof CfgIndexInfo)) {
|
||||
BeanUtils.copyProperties(entity, searchCfg);
|
||||
searchCfg.setIsValid(0);
|
||||
searchCfg.setIsAudit(0);
|
||||
searchCfg.setFunctionId(functionId);
|
||||
}
|
||||
if(entity != null && (entity instanceof AppPolicyCfg)) {
|
||||
BeanUtils.copyProperties(entity, searchAppCfg);
|
||||
searchAppCfg.setIsValid(0);
|
||||
searchAppCfg.setIsAudit(0);
|
||||
searchAppCfg.setFunctionId(functionId);
|
||||
}
|
||||
if(entity != null && (entity instanceof FileDigestCfg)) {
|
||||
BeanUtils.copyProperties(entity, searchDigestCfg);
|
||||
searchDigestCfg.setIsValid(0);
|
||||
searchDigestCfg.setIsAudit(0);
|
||||
searchDigestCfg.setFunctionId(functionId);
|
||||
}
|
||||
if(entity != null && (entity instanceof AvFileSampleCfg)) {
|
||||
BeanUtils.copyProperties(entity, searchFileSampleCfg);
|
||||
searchFileSampleCfg.setIsValid(0);
|
||||
searchFileSampleCfg.setIsAudit(0);
|
||||
searchFileSampleCfg.setFunctionId(functionId);
|
||||
}
|
||||
if(entity != null && (entity instanceof DdosIpCfg)) {
|
||||
BeanUtils.copyProperties(entity, searchDdosIpCfg);
|
||||
searchDdosIpCfg.setIsValid(0);
|
||||
searchDdosIpCfg.setIsAudit(0);
|
||||
searchDdosIpCfg.setFunctionId(functionId);
|
||||
}
|
||||
|
||||
BaseCfg batchCfg = new BaseCfg();
|
||||
batchCfg.setEditTime(new Date());
|
||||
batchCfg.setEditorId(UserUtils.getUser().getId());
|
||||
|
||||
ServiceConfigTemplateUtil serviceTemplate = new ServiceConfigTemplateUtil();
|
||||
List<Map<String,Object>> serviceList = serviceTemplate.getServiceListByFunctionId(functionId);
|
||||
for(Map<String,Object> service:serviceList){
|
||||
String tableNameXml = service.get("tableName").toString(); // 获取业务主配置表
|
||||
String serviceTypeXml = service.get("serviceType").toString(); // 业务类型 1maat 2callback
|
||||
String classNameXml = service.get("className").toString(); // 主配置Java类
|
||||
String serviceIdXml = service.get("id").toString(); // service字典表 service_id字段
|
||||
|
||||
searchCfg.setServiceId(Integer.valueOf(serviceIdXml));
|
||||
searchCfg.setTableName(tableNameXml);
|
||||
searchAppCfg.setServiceId(Integer.valueOf(serviceIdXml));
|
||||
searchAppCfg.setTableName(tableNameXml);
|
||||
searchDigestCfg.setServiceId(Integer.valueOf(serviceIdXml));
|
||||
searchDigestCfg.setTableName(tableNameXml);
|
||||
batchCfg.setServiceId(Integer.valueOf(serviceIdXml));
|
||||
batchCfg.setTableName(tableNameXml);
|
||||
|
||||
// 存放域配置类型 及 对应表名
|
||||
List<Map<String,Object>> cfgList = (List<Map<String, Object>>) service.get("cfgList");
|
||||
//if(!StringUtil.isEmpty(cfgList)) {
|
||||
if("cfg_index_info".equals(tableNameXml)){
|
||||
boolean hasData = true;
|
||||
while(hasData){
|
||||
page.setPageNo(1);
|
||||
page.setLastPage(false);
|
||||
List<CfgIndexInfo> list = getDataList(page,searchCfg,null,null,null); // 通过serviceId获取主配置表数据
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
List<BaseCfg> BaseCfgList=new ArrayList<>();
|
||||
for (CfgIndexInfo cfg : list) {
|
||||
BaseCfg baseCfg=new BaseCfg();
|
||||
BeanUtils.copyProperties(cfg, baseCfg);
|
||||
BaseCfgList.add(baseCfg);
|
||||
}
|
||||
hasData = commonPolicyService.batchDeleteMaatData(cfgList, page, batchCfg, BaseCfgList, hasData);
|
||||
}else{
|
||||
hasData = false;
|
||||
}
|
||||
}
|
||||
}else if("file_digest_cfg".equals(tableNameXml)) {
|
||||
boolean hasData = true;
|
||||
while(hasData){
|
||||
page.setPageNo(1);
|
||||
page.setLastPage(false);
|
||||
List<FileDigestCfg> list = getDataList(page,null,null,searchDigestCfg,null); // 通过serviceId获取主配置表数据
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
List<BaseCfg> BaseCfgList=new ArrayList<>();
|
||||
for (FileDigestCfg cfg : list) {
|
||||
BaseCfg baseCfg=new BaseCfg();
|
||||
BeanUtils.copyProperties(cfg, baseCfg);
|
||||
BaseCfgList.add(baseCfg);
|
||||
}
|
||||
hasData = commonPolicyService.batchDeleteMaatData(cfgList, page, batchCfg, BaseCfgList, hasData);
|
||||
}else{
|
||||
hasData = false;
|
||||
}
|
||||
}
|
||||
}else if("app_policy_cfg".equals(tableNameXml)) {
|
||||
boolean hasData = true;
|
||||
while(hasData){
|
||||
page.setPageNo(1);
|
||||
page.setLastPage(false);
|
||||
List<AppPolicyCfg> list = getDataList(page,null,searchAppCfg,null,null); // 通过serviceId获取主配置表数据
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
List<BaseCfg> BaseCfgList=new ArrayList<>();
|
||||
for (AppPolicyCfg cfg : list) {
|
||||
BaseCfg baseCfg=new BaseCfg();
|
||||
BeanUtils.copyProperties(cfg, baseCfg);
|
||||
BaseCfgList.add(baseCfg);
|
||||
}
|
||||
hasData = commonPolicyService.batchDeleteMaatData(cfgList, page, batchCfg, BaseCfgList, hasData);
|
||||
}else{
|
||||
hasData = false;
|
||||
}
|
||||
}
|
||||
}else if("av_file_sample_cfg".equals(tableNameXml)) {
|
||||
boolean hasData = true;
|
||||
while(hasData){
|
||||
page.setPageNo(1);
|
||||
page.setLastPage(false);
|
||||
List<BaseCfg> list = avCfgService.getAvFileSampleList(page,searchFileSampleCfg).getList();
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
hasData = commonPolicyService.batchDeleteMaatData(cfgList, page, batchCfg, list, hasData);
|
||||
}else{
|
||||
hasData = false;
|
||||
}
|
||||
}
|
||||
|
||||
}else if("ddos_ip_cfg".equals(tableNameXml)) {
|
||||
boolean hasData = true;
|
||||
while(hasData){
|
||||
page.setPageNo(1);
|
||||
page.setLastPage(false);
|
||||
List<DdosIpCfg> list=ddosCfgService.findPage(page, searchDdosIpCfg).getList();
|
||||
if(!StringUtil.isEmpty(list)){
|
||||
List<BaseCfg> BaseCfgList=new ArrayList<>();
|
||||
for (DdosIpCfg cfg : list) {
|
||||
BaseCfg baseCfg=new BaseCfg();
|
||||
BeanUtils.copyProperties(cfg, baseCfg);
|
||||
BaseCfgList.add(baseCfg);
|
||||
}
|
||||
hasData = commonPolicyService.batchDeleteMaatData(cfgList, page, batchCfg, BaseCfgList, hasData);
|
||||
}else{
|
||||
hasData = false;
|
||||
}
|
||||
}
|
||||
|
||||
}else if("app_feature_index".equals(tableNameXml)) {
|
||||
|
||||
}else{
|
||||
logger.info("未知业务");
|
||||
}
|
||||
//}
|
||||
|
||||
}
|
||||
long end=System.currentTimeMillis();
|
||||
logger.warn("配置批量删除耗时:"+(end-start));
|
||||
|
||||
}
|
||||
|
||||
public List getDataList(Page searchPage
|
||||
,CfgIndexInfo searchCfg
|
||||
|
||||
@@ -41,6 +41,7 @@ import com.nis.domain.configuration.AppSslCertCfg;
|
||||
import com.nis.domain.configuration.AppTcpCfg;
|
||||
import com.nis.domain.configuration.AppTopicDomainCfg;
|
||||
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.WebsiteDomainTopic;
|
||||
@@ -305,8 +306,26 @@ public class AppCfgController extends BaseController {
|
||||
*/
|
||||
@RequestMapping(value = { "updateAppPolicyCfgValid" })
|
||||
@RequiresPermissions(value = { "app:policy:config" })
|
||||
public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId) {
|
||||
public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")AppPolicyCfg cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath + "/app/policyCfgList?functionId=" + functionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -251,20 +251,23 @@ public class BasicProtocolController extends BaseController {
|
||||
*/
|
||||
@RequestMapping(value = { "updateValid" })
|
||||
@RequiresPermissions(value = { "basicprotocol:config" })
|
||||
public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId,
|
||||
RedirectAttributes redirectAttributes) {
|
||||
public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")AppPolicyCfg cfg) {
|
||||
try {
|
||||
if(!StringUtil.isEmpty(ids)) {
|
||||
appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("基础协议信息保存失败", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else if (e instanceof CallExternalProceduresException) {
|
||||
addMessage(redirectAttributes, "error", "call_external_procedures_failed");
|
||||
} else {
|
||||
e.printStackTrace();
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.nis.domain.Page;
|
||||
import com.nis.domain.SysDataDictionaryItem;
|
||||
import com.nis.domain.configuration.AppPolicyCfg;
|
||||
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.specific.SpecificServiceCfg;
|
||||
@@ -270,10 +271,17 @@ public class EncryptedTunnelBehaviorController extends BaseController {
|
||||
*/
|
||||
@RequestMapping(value = { "updateValid" })
|
||||
@RequiresPermissions(value = { "encryptedtunnelbehav:config" })
|
||||
public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId,
|
||||
RedirectAttributes redirectAttributes) {
|
||||
public String updateAppPolicyCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")AppPolicyCfg cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
appCfgService.updateAppPolicyCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("加密隧道协议保存失败", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
|
||||
@@ -87,8 +87,26 @@ public class DdosCfgController extends BaseController {
|
||||
|
||||
@RequestMapping(value = { "/delete" })
|
||||
@RequiresPermissions(value = { "ddos:ip:config" })
|
||||
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId) {
|
||||
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")DdosIpCfg cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
ddosCfgService.delete(isAudit, isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath + "/manipulation/ddos/list?functionId=" + functionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -484,6 +484,7 @@ public class IpMultiplexController extends CommonController {
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
if(serviceIds.length()>1&&compileIds.length()>1){
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
@@ -491,6 +492,7 @@ public class IpMultiplexController extends CommonController {
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
}
|
||||
List<IpAddrPoolCfg> addrPools = ipAddrPoolCfgService.getEffectiveAddrPool();
|
||||
for (IpReusePolicyCfg ipReusePolicyCfg : ipLists) {
|
||||
if(ipReusePolicyCfg.getAddrPoolId()!=null){
|
||||
@@ -604,6 +606,8 @@ public class IpMultiplexController extends CommonController {
|
||||
for (Integer id : set) {
|
||||
serviceIds.append(id+",");
|
||||
}
|
||||
|
||||
if(serviceIds.length()>1&&compileIds.length()>1){
|
||||
String serviceIdsStr=serviceIds.toString().substring(1, serviceIds.length()-1);
|
||||
String compileIdsStr=compileIds.toString().substring(1, compileIds.length()-1);
|
||||
//获取日志总量
|
||||
@@ -611,6 +615,7 @@ public class IpMultiplexController extends CommonController {
|
||||
List<Map<String,Object>> logs = getLogTotal( null,serviceIdsStr,compileIdsStr);
|
||||
logTotals.addAll(logs);
|
||||
}
|
||||
}
|
||||
titleList.add(entity.getMenuNameCode());
|
||||
classMap.put(entity.getMenuNameCode(), IpReuseDnatPolicyCfg.class);
|
||||
String snatNoExport = ",group_name,block_type,direction,client_ip,ip_type,ip_pattern,port_pattern,client_port,ir_type,do_log,whether_area_block,userregion1,userregion2,userregion3,userregion4,userregion5,";
|
||||
|
||||
@@ -152,18 +152,22 @@ public class AvContentController extends BaseController {
|
||||
// 修改VOIP IP配置状态
|
||||
@RequestMapping(value = { "/updateAvVoipValid" })
|
||||
@RequiresPermissions(value = { "avVoip:config" })
|
||||
public String updateVoipValid(Integer isAudit, String compileIds, Integer isValid, String ids, Integer functionId,
|
||||
RedirectAttributes redirectAttributes) {
|
||||
public String updateVoipValid(Integer isAudit, String compileIds, Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
avContentCfgService.updateAvVoipValid(isAudit, isValid, compileIds, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (e instanceof MaatConvertException) {
|
||||
e.printStackTrace();
|
||||
logger.error("voip 信息审核失败", e);
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
e.printStackTrace();
|
||||
logger.error("voip 信息审核失败", e);
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
@@ -627,9 +631,26 @@ public class AvContentController extends BaseController {
|
||||
// 修改CONTUrl例配置状态
|
||||
@RequestMapping(value = { "/updateAvContUrlValid" })
|
||||
@RequiresPermissions(value = { "avContUrl:config" })
|
||||
public String updateAvContUrlValid(Integer isAudit, Integer isValid, String ids, Integer functionId,
|
||||
RedirectAttributes redirectAttributes) {
|
||||
public String updateAvContUrlValid(Integer isAudit, Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
avContentCfgService.updateContUrlValid(isAudit, isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath + "/ntc/av/contUrlList?functionId=" + functionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -350,10 +350,26 @@ public class AvController extends BaseController {
|
||||
|
||||
// 修改文件样例配置状态
|
||||
@RequestMapping(value = { "/sample/updateAvFileSampleValid" })
|
||||
public String updateAvFileSampleValid(Integer isAudit, Integer isValid, String ids, Integer functionId,
|
||||
RedirectAttributes redirectAttributes) {
|
||||
public String updateAvFileSampleValid(Integer isAudit, Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")AvFileSampleCfg cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
avCfgService.updateAvFileSampleValid(isAudit, isValid, ids);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath + "/ntc/av/sample/fileSampleList?functionId=" + functionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -122,9 +122,26 @@ public class BgpCfgController extends BaseController {
|
||||
|
||||
@RequestMapping(value = { "updateBgpCfgValid" })
|
||||
@RequiresPermissions(value = { "other:bgp:config" })
|
||||
public String updateBgpCfgValid(Integer isValid, String ids, Integer functionId,
|
||||
RedirectAttributes redirectAttributes) {
|
||||
public String updateBgpCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
bgpCfgService.updateBgpCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath + "/ntc/other/bgpList?functionId=" + functionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -150,19 +150,22 @@ public class FileTransferCfgController extends BaseController {
|
||||
*/
|
||||
@RequestMapping(value = { "updateFtpCfgValid" })
|
||||
@RequiresPermissions(value = { "fileTransfer:ftp:config" })
|
||||
public String updateFtpCfgValid(Integer isValid, String ids, Integer functionId,
|
||||
RedirectAttributes redirectAttributes) {
|
||||
public String updateFtpCfgValid(Integer isValid, String ids, Integer functionId,RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||
try {
|
||||
if(!StringUtil.isEmpty(ids)) {
|
||||
fileTransferCfgService.updateFtpCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (e instanceof MaatConvertException) {
|
||||
e.printStackTrace();
|
||||
logger.info("ftp配置删除失败:" + e.getMessage());
|
||||
;
|
||||
logger.error("ftp配置删除失败:" + e.getMessage());
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
e.printStackTrace();
|
||||
logger.error("ftp配置删除失败", e);
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
@@ -303,9 +306,27 @@ public class FileTransferCfgController extends BaseController {
|
||||
|
||||
@RequestMapping(value = { "updateFileDigestValid" })
|
||||
@RequiresPermissions(value = { "fileTransfer:fileDigest:config" })
|
||||
public String updateFileDigestValid(Integer isValid, String ids, Integer functionId,
|
||||
RedirectAttributes redirectAttributes) {
|
||||
public String updateFileDigestValid(Integer isValid, String ids, Integer functionId,RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")FileDigestCfg cfg) {
|
||||
try {
|
||||
if(!StringUtil.isEmpty(ids)) {
|
||||
fileTransferCfgService.updateFileDigestCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (e instanceof MaatConvertException) {
|
||||
logger.error("文件摘要配置删除失败:" + e.getMessage());
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
logger.error("文件摘要配置删除失败", e);
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath + "/ntc/fileTransfer/fileDigestList?functionId=" + functionId;
|
||||
}
|
||||
|
||||
@@ -483,19 +504,22 @@ public class FileTransferCfgController extends BaseController {
|
||||
|
||||
@RequestMapping(value = { "updateP2pCfgValid" })
|
||||
@RequiresPermissions(value = { "fileTransfer:p2p:config" })
|
||||
public String updateP2pCfgValid(Integer isValid, String ids, Integer functionId,
|
||||
RedirectAttributes redirectAttributes) {
|
||||
public String updateP2pCfgValid(Integer isValid, String ids, Integer functionId,RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||
try {
|
||||
if(!StringUtil.isEmpty(ids)) {
|
||||
fileTransferCfgService.updateP2pCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (e instanceof MaatConvertException) {
|
||||
e.printStackTrace();
|
||||
logger.info("P2P配置删除失败:" + e.getMessage());
|
||||
;
|
||||
logger.error("P2P配置删除失败:" + e.getMessage());
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
e.printStackTrace();
|
||||
logger.error("P2P配置删除失败", e);
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
@@ -151,8 +151,27 @@ public class IpController extends BaseController{
|
||||
}
|
||||
@RequestMapping(value = {"updateValid"})
|
||||
@RequiresPermissions("iplist:config")
|
||||
public String updateIpPortCfgValid(Integer isValid,String ids,Integer functionId) {
|
||||
public String updateIpPortCfgValid(Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
ipCfgService.updateIpCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath +"/ntc/iplist/list?functionId="+functionId;
|
||||
}
|
||||
/**
|
||||
@@ -194,7 +213,7 @@ public class IpController extends BaseController{
|
||||
/*if(StringUtils.isNoneBlank(entity.getUserRegion4())) {
|
||||
ipCfgService.auditAsnCfg(entity, isAudit);
|
||||
}else {*/
|
||||
ipCfgService.auditIpCfg(entity,isAudit);
|
||||
ipCfgService.auditIpCfg(entity,isAudit,Constants.INSERT_ACTION);
|
||||
/*}*/
|
||||
addMessage(redirectAttributes,"success", "audit_success");
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -170,8 +170,26 @@ public class MailCfgController extends BaseController {
|
||||
|
||||
@RequestMapping(value = { "updateMailCfgValid" })
|
||||
@RequiresPermissions(value = { "mail:config" })
|
||||
public String updateMailCfgValid(Integer isValid, String ids, Integer functionId) {
|
||||
public String updateMailCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
mailCfgService.updateMailCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath + "/ntc/mail/mailList?functionId=" + functionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -208,8 +208,26 @@ public class WebsiteController extends BaseController {
|
||||
|
||||
@RequestMapping(value = { "updateHttpCfgValid" })
|
||||
@RequiresPermissions(value = { "website:http:config" })
|
||||
public String updateHttpCfgValid(Integer isValid, String ids, Integer functionId) {
|
||||
public String updateHttpCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
websiteCfgService.updateHttpCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath + "/ntc/website/httpList?functionId=" + functionId;
|
||||
}
|
||||
|
||||
@@ -338,8 +356,26 @@ public class WebsiteController extends BaseController {
|
||||
|
||||
@RequestMapping(value = { "updateSslCfgValid" })
|
||||
@RequiresPermissions(value = { "website:ssl:config" })
|
||||
public String updateSslCfgValid(Integer isValid, String ids, Integer functionId) {
|
||||
public String updateSslCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
websiteCfgService.updateSslCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath + "/ntc/website/sslList?functionId=" + functionId;
|
||||
}
|
||||
|
||||
@@ -460,8 +496,26 @@ public class WebsiteController extends BaseController {
|
||||
|
||||
@RequestMapping(value = { "updateDnsCfgValid" })
|
||||
@RequiresPermissions(value = { "website:dns:config" })
|
||||
public String updateDnsCfgValid(Integer isValid, String ids, Integer functionId) {
|
||||
public String updateDnsCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
websiteCfgService.updateDnsCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath + "/ntc/website/dnsList?functionId=" + functionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -97,9 +97,24 @@ public class WhiteListController extends CommonController {
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "ip/save" })
|
||||
public String saveIpCfg(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response,
|
||||
public String saveIpCfg(RedirectAttributes model, HttpServletRequest request, HttpServletResponse response, RedirectAttributes redirectAttributes,
|
||||
String ids, CfgIndexInfo entity) {
|
||||
try {
|
||||
ipCfgService.saveIpCfg(entity);
|
||||
//配置仅保存
|
||||
if(StringUtil.isEmpty(entity.getIsValid()) || entity.getIsValid()!=1) {
|
||||
addMessage(redirectAttributes, "success", "save_success");
|
||||
}else {
|
||||
//配置直接生效
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
}
|
||||
} catch (MaatConvertException e) {
|
||||
logger.error("ip白名单配置下发失败:",e);
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} catch (Exception e) {
|
||||
logger.error("ip白名单配置保存失败:",e);
|
||||
addMessage(redirectAttributes, "error", "save_failed");
|
||||
}
|
||||
return "redirect:" + adminPath + "/ntc/whitelist/ip/list?functionId=" + entity.getFunctionId();
|
||||
}
|
||||
|
||||
@@ -115,11 +130,9 @@ public class WhiteListController extends CommonController {
|
||||
entity = ipCfgService.getIpPortCfg(Long.parseLong(id), null);
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setIsValid(isValid);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
entity.setFunctionId(functionId);
|
||||
try {
|
||||
ipCfgService.auditIpCfg(entity, isAudit);
|
||||
ipCfgService.auditIpCfg(entity, isAudit,Constants.INSERT_ACTION);
|
||||
addMessage(redirectAttributes, "success", "audit_success");
|
||||
} catch (MaatConvertException e) {
|
||||
logger.info("ip配置下发失败:" + e.getMessage());
|
||||
@@ -154,8 +167,28 @@ public class WhiteListController extends CommonController {
|
||||
|
||||
@RequestMapping(value = { "updateIpValid" })
|
||||
@RequiresPermissions(value = { "whitelist:ip:config" })
|
||||
public String updateIpCfgValid(Integer isValid, String ids, Integer functionId) {
|
||||
public String updateIpCfgValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
ipCfgService.updateIpCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
//addMessage(redirectAttributes, "success", "delete_success");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return "redirect:" + adminPath + "/ntc/whitelist/ip/list?functionId=" + functionId;
|
||||
}
|
||||
|
||||
@@ -252,8 +285,26 @@ public class WhiteListController extends CommonController {
|
||||
|
||||
@RequestMapping(value = { "domain/updateValid" })
|
||||
@RequiresPermissions(value = { "whitelist:domain:config" })
|
||||
public String updateDomainValid(Integer isValid, String ids, Integer functionId) {
|
||||
public String updateDomainValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
domainService.updateDomainCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath + "/ntc/whitelist/domain/list?functionId=" + functionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -157,8 +157,26 @@ public class CachePolicyController extends BaseController{
|
||||
}
|
||||
@RequestMapping(value = {"delete"})
|
||||
@RequiresPermissions(value={"cache:policy:config"})
|
||||
public String delete(Integer isAudit,Integer isValid,String ids,Integer functionId){
|
||||
public String delete(Integer isAudit,Integer isValid,String ids,Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg){
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
cachePolicyService.updateCachePolicyValid(isValid,ids,functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath +"/proxy/cache/list?functionId="+functionId;
|
||||
}
|
||||
@RequestMapping(value = {"audit"})
|
||||
|
||||
@@ -215,8 +215,26 @@ public class HttpRedirectPolicyController extends BaseController {
|
||||
@RequiresPermissions(value = { "control:httpBlock:config", "control:httpRedirect:config",
|
||||
"control:httpReplace:config", "control:httpMinit:config",
|
||||
"control:httpWhitelist:config" }, logical = Logical.OR)
|
||||
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId) {
|
||||
public String delete(Integer isAudit, Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||
try {
|
||||
if (!StringUtil.isEmpty(ids)) {
|
||||
httpRedirectCfgService.updateHttpCfgValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
// 批量删除
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("配置删除失败:", e);
|
||||
if (e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes, "error", "request_service_failed");
|
||||
} else {
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
}
|
||||
|
||||
}
|
||||
return "redirect:" + adminPath + "/proxy/control/httpRedirect/httpRedirectList?functionId=" + functionId;
|
||||
}
|
||||
|
||||
|
||||
@@ -209,11 +209,16 @@ public class InterceptController extends CommonController {
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "updateInterceptIpValid", "updateInterceptDomainValid", "updateInterceptIpPayloadValid" })
|
||||
public String updateInterceptIpValid(Integer isValid, String ids, Integer functionId,
|
||||
RedirectAttributes redirectAttributes) {
|
||||
public String updateInterceptIpValid(Integer isValid, String ids, Integer functionId, RedirectAttributes redirectAttributes,
|
||||
HttpServletRequest request, HttpServletResponse response, @ModelAttribute("cfg")CfgIndexInfo cfg) {
|
||||
try {
|
||||
if(!StringUtil.isEmpty(ids)) {
|
||||
interceptCfgService.updatInterceptValid(isValid, ids, functionId);
|
||||
addMessage(redirectAttributes, "success", "delete_success");
|
||||
}else {
|
||||
Page<CfgIndexInfo> searchPage = new Page<CfgIndexInfo>(request, response, "a");
|
||||
deleteAll(searchPage, functionId, cfg);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("intercept ip delete failed", e);
|
||||
addMessage(redirectAttributes, "error", "delete_failed");
|
||||
|
||||
@@ -761,6 +761,25 @@
|
||||
<if test="compileId != null">
|
||||
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
|
||||
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
|
||||
<if test="index == 0">
|
||||
AND r.COMPILE_ID >= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="index == 1">
|
||||
AND r.COMPILE_ID <= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
|
||||
AND r.COMPILE_ID in
|
||||
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
|
||||
AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
@@ -931,6 +950,25 @@
|
||||
<if test="compileId != null">
|
||||
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
|
||||
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
|
||||
<if test="index == 0">
|
||||
AND r.COMPILE_ID >= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="index == 1">
|
||||
AND r.COMPILE_ID <= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
|
||||
AND r.COMPILE_ID in
|
||||
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
|
||||
AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileGroupMap != null">
|
||||
and r.COMPILE_ID in
|
||||
<foreach collection="compileGroupMap.keys" index="index" item="compileId" open="(" separator="," close=")">
|
||||
@@ -1140,6 +1178,25 @@
|
||||
<if test="compileId != null">
|
||||
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
|
||||
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
|
||||
<if test="index == 0">
|
||||
AND r.COMPILE_ID >= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="index == 1">
|
||||
AND r.COMPILE_ID <= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
|
||||
AND r.COMPILE_ID in
|
||||
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
|
||||
AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
@@ -1241,6 +1298,25 @@
|
||||
<if test="compileId != null">
|
||||
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
|
||||
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
|
||||
<if test="index == 0">
|
||||
AND r.COMPILE_ID >= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="index == 1">
|
||||
AND r.COMPILE_ID <= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
|
||||
AND r.COMPILE_ID in
|
||||
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
|
||||
AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
@@ -1539,6 +1615,25 @@
|
||||
<if test="compileId != null">
|
||||
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
|
||||
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
|
||||
<if test="index == 0">
|
||||
AND r.COMPILE_ID >= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="index == 1">
|
||||
AND r.COMPILE_ID <= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
|
||||
AND r.COMPILE_ID in
|
||||
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
|
||||
AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
|
||||
@@ -308,6 +308,25 @@
|
||||
<if test="compileId != null">
|
||||
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
|
||||
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
|
||||
<if test="index == 0">
|
||||
AND r.COMPILE_ID >= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="index == 1">
|
||||
AND r.COMPILE_ID <= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
|
||||
AND r.COMPILE_ID in
|
||||
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
|
||||
AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
|
||||
@@ -164,6 +164,25 @@
|
||||
<if test="compileId != null">
|
||||
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
|
||||
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
|
||||
<if test="index == 0">
|
||||
AND a.COMPILE_ID >= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="index == 1">
|
||||
AND a.COMPILE_ID <= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
|
||||
AND a.COMPILE_ID in
|
||||
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
|
||||
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
|
||||
@@ -352,6 +352,25 @@
|
||||
<if test="compileId != null">
|
||||
AND r.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
|
||||
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
|
||||
<if test="index == 0">
|
||||
AND r.COMPILE_ID >= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="index == 1">
|
||||
AND r.COMPILE_ID <= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
|
||||
AND r.COMPILE_ID in
|
||||
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
|
||||
AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND r.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
|
||||
@@ -234,6 +234,25 @@
|
||||
<if test="compileId != null">
|
||||
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
|
||||
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
|
||||
<if test="index == 0">
|
||||
AND a.COMPILE_ID >= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="index == 1">
|
||||
AND a.COMPILE_ID <= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
|
||||
AND a.COMPILE_ID in
|
||||
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
|
||||
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
|
||||
@@ -41,4 +41,8 @@ public interface CommonPolicyDao {
|
||||
public List<CachePolicyUserRegion> getCachePolicyUserRegionList(CachePolicyUserRegion entity);
|
||||
|
||||
public List<CachePolicyUserRegion> getCachePolicyByUserRegionList(@Param("ids")String ids);
|
||||
|
||||
public void deleteCfgBatch(@Param("tableName")String tableName,
|
||||
@Param("entity")BaseCfg entity,
|
||||
@Param("compileIds")List compileIds);
|
||||
}
|
||||
|
||||
@@ -245,6 +245,25 @@
|
||||
<if test="compileId != null">
|
||||
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
|
||||
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
|
||||
<if test="index == 0">
|
||||
AND a.COMPILE_ID >= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="index == 1">
|
||||
AND a.COMPILE_ID <= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
|
||||
AND a.COMPILE_ID in
|
||||
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
|
||||
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
@@ -917,6 +936,25 @@
|
||||
<if test="compileId != null">
|
||||
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
|
||||
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
|
||||
<if test="index == 0">
|
||||
AND a.COMPILE_ID >= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="index == 1">
|
||||
AND a.COMPILE_ID <= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
|
||||
AND a.COMPILE_ID in
|
||||
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
|
||||
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
@@ -975,5 +1013,17 @@
|
||||
where a.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
<update id="deleteCfgBatch">
|
||||
UPDATE ${tableName}
|
||||
SET is_valid =-1,is_audit=0,
|
||||
editor_id = #{entity.editorId,jdbcType=INTEGER},
|
||||
edit_time = #{entity.editTime,jdbcType=TIMESTAMP}
|
||||
<where>
|
||||
AND compile_id IN
|
||||
<foreach collection="compileIds" index="index" item="compileId" open="(" separator="," close=")">
|
||||
#{compileId}
|
||||
</foreach>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -252,6 +252,25 @@
|
||||
<if test="compileId != null">
|
||||
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
|
||||
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
|
||||
<if test="index == 0">
|
||||
AND a.COMPILE_ID >= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="index == 1">
|
||||
AND a.COMPILE_ID <= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
|
||||
AND a.COMPILE_ID in
|
||||
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
|
||||
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
@@ -696,6 +715,25 @@
|
||||
<if test="compileId != null">
|
||||
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
|
||||
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
|
||||
<if test="index == 0">
|
||||
AND a.COMPILE_ID >= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="index == 1">
|
||||
AND a.COMPILE_ID <= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
|
||||
AND a.COMPILE_ID in
|
||||
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
|
||||
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
@@ -1130,6 +1168,25 @@
|
||||
<if test="compileId != null">
|
||||
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
|
||||
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
|
||||
<if test="index == 0">
|
||||
AND a.COMPILE_ID >= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="index == 1">
|
||||
AND a.COMPILE_ID <= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
|
||||
AND a.COMPILE_ID in
|
||||
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
|
||||
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
|
||||
@@ -1105,6 +1105,25 @@
|
||||
<if test="compileId != null">
|
||||
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
|
||||
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
|
||||
<if test="index == 0">
|
||||
AND a.COMPILE_ID >= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="index == 1">
|
||||
AND a.COMPILE_ID <= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
|
||||
AND a.COMPILE_ID in
|
||||
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
|
||||
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
|
||||
@@ -127,6 +127,25 @@
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND r.compile_id=#{compileId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
|
||||
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
|
||||
<if test="index == 0">
|
||||
AND r.COMPILE_ID >= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="index == 1">
|
||||
AND r.COMPILE_ID <= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
|
||||
AND r.COMPILE_ID in
|
||||
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
|
||||
AND r.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||
AND r.src_ip_address=#{srcIpAddress,jdbcType=VARCHAR}
|
||||
@@ -637,6 +656,25 @@
|
||||
</if>
|
||||
<if test="compileId != null">
|
||||
AND a.compile_id=#{compileId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
|
||||
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
|
||||
<if test="index == 0">
|
||||
AND a.COMPILE_ID >= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="index == 1">
|
||||
AND a.COMPILE_ID <= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
|
||||
AND a.COMPILE_ID in
|
||||
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
|
||||
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||
AND a.original_dest_ip=#{srcIpAddress,jdbcType=VARCHAR}
|
||||
|
||||
@@ -196,6 +196,25 @@
|
||||
<if test="compileId != null">
|
||||
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
|
||||
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
|
||||
<if test="index == 0">
|
||||
AND a.COMPILE_ID >= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="index == 1">
|
||||
AND a.COMPILE_ID <= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
|
||||
AND a.COMPILE_ID in
|
||||
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
|
||||
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
|
||||
@@ -215,6 +215,25 @@
|
||||
<if test="compileId != null">
|
||||
AND a.COMPILE_ID=#{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="compileIdNew != null and compileIdNew != '' and compileIdNew.indexOf('-') != -1">
|
||||
<foreach collection="compileIdNew.split('-')" index="index" item="item" >
|
||||
<if test="index == 0">
|
||||
AND a.COMPILE_ID >= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="index == 1">
|
||||
AND a.COMPILE_ID <= #{item,jdbcType=INTEGER}
|
||||
</if>
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') != -1">
|
||||
AND a.COMPILE_ID in
|
||||
<foreach collection="compileIdNew.split(',')" index="index" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="compileIdNew !=null and compileIdNew != '' and compileIdNew.indexOf(',') == -1 and compileIdNew.indexOf('-') == -1">
|
||||
AND a.COMPILE_ID=#{compileIdNew,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
AND a.IS_AREA_EFFECTIVE=#{isAreaEffective,jdbcType=INTEGER}
|
||||
</if>
|
||||
|
||||
@@ -286,15 +286,15 @@ public abstract class BaseService {
|
||||
scopeSql.append(" OR (" + officeAlias + ".parent_id = '" + user.getEntity().getId() + "' AND " + officeAlias
|
||||
+ ".type>1)");
|
||||
|
||||
} else if (SysRole.DATA_SCOPE_CREATOR.equals(dataScope)) {
|
||||
} else if (SysRole.DATA_SCOPE_CREATOR.equals(dataScope)) {//操作员【非管理员用户数据】
|
||||
// scopeSql.append(" OR " + configAlias + ".is_audit !=3");
|
||||
scopeSql.append(" OR " + configAlias + ".creator_id <>1 ");
|
||||
} else if (SysRole.DATA_SCOPE_AUDITOR.equals(dataScope)) {
|
||||
scopeSql.append(" OR " + configAlias + ".is_audit = 0 or " + configAlias + ".is_audit = 1");
|
||||
scopeSql.append(" OR " + configAlias + ".creator_id <>1 ");
|
||||
} else if (SysRole.DATA_SCOPE_SHOWER.equals(dataScope)) {
|
||||
} else if (SysRole.DATA_SCOPE_AUDITOR.equals(dataScope)) {//审核员【未审核和审核通过状态的非管理员用户数据】
|
||||
scopeSql.append(" OR (" + configAlias + ".is_audit = 0 OR " + configAlias + ".is_audit = 1)");
|
||||
scopeSql.append(" AND " + configAlias + ".creator_id <>1 ");
|
||||
} else if (SysRole.DATA_SCOPE_SHOWER.equals(dataScope)) {//审计员【审核通过状态的非管理员用户数据】
|
||||
scopeSql.append(" OR " + configAlias + ".is_audit = 1");
|
||||
scopeSql.append(" OR " + configAlias + ".creator_id <>1 ");
|
||||
scopeSql.append(" AND " + configAlias + ".creator_id <>1 ");
|
||||
}
|
||||
|
||||
return scopeSql.toString();
|
||||
@@ -2344,8 +2344,7 @@ public abstract class BaseService {
|
||||
try{
|
||||
batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||
for(int index = 0; index < appPolicyCfgs.size();index++){
|
||||
AppPolicyCfg _cfg = new AppPolicyCfg();
|
||||
BeanUtils.copyProperties(appPolicyCfgs.get(index), _cfg);
|
||||
AppPolicyCfg _cfg = appPolicyCfgs.get(index);
|
||||
((AppCfgDao) batchSqlSession.getMapper(AppCfgDao.class)).insertAppPolicyCfgForBatch(_cfg);
|
||||
|
||||
}
|
||||
|
||||
@@ -306,4 +306,107 @@ public class CommonPolicyService extends CrudService<WebsiteCfgDao, CfgIndexInfo
|
||||
logger.warn("回调配置批量失效-下发耗时:end("+(end-start)+")");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置批量审核不通过
|
||||
* @param cfgList // 存放域配置类型 及 对应表名
|
||||
* @param page
|
||||
* @param entity // 保存要审核的状态类
|
||||
* @param list // 主配置表数据(在调用前查出)
|
||||
* @param hasData // 标识是否还有数据
|
||||
* @return
|
||||
*/
|
||||
public boolean batchUnApproveMaatData(List<Map<String, Object>> cfgList, Page page, BaseCfg entity,
|
||||
List<BaseCfg> list, boolean hasData) {
|
||||
|
||||
// 1.获取所有配置的编译ID
|
||||
List<Integer> compileIds = new ArrayList();
|
||||
for(BaseCfg cfg:list){
|
||||
compileIds.add(cfg.getCompileId());
|
||||
}
|
||||
|
||||
// 2.更新配置审核状态(主表)
|
||||
if(!StringUtil.isEmpty(compileIds) && !StringUtil.isEmpty(entity.getTableName())) {
|
||||
List auditHttpCompileIds= new ArrayList();
|
||||
List deleteHttpCompileIds= new ArrayList();
|
||||
|
||||
// Protocol -> HTTP 请求/响应内容关键字单独处理 ------>
|
||||
//http关键字配置失效,获取与其匹配的http url配置
|
||||
if(entity.getServiceId().equals(152) || entity.getServiceId().equals(40)) {
|
||||
List<CfgIndexInfo> httpUrlCfgs=commonPolicyDao.getHttpUrlCfgBySourceCompileId(compileIds);
|
||||
if(!StringUtil.isEmpty(httpUrlCfgs)) {
|
||||
for (CfgIndexInfo httpUrlCfg: httpUrlCfgs) {
|
||||
//审核通过的
|
||||
if(httpUrlCfg.getIsValid().equals(1) && httpUrlCfg.getIsAudit().equals(1)) {
|
||||
auditHttpCompileIds.add(httpUrlCfg.getCompileId());
|
||||
/*maatCfg = new MaatCfg();
|
||||
maatCfg.setCompileId(httpUrlCfg.getCompileId());
|
||||
maatCfg.setServiceId(httpUrlCfg.getServiceId());
|
||||
maatCfg.setIsValid(0);//无效
|
||||
configCompileList.add(maatCfg);*/
|
||||
}
|
||||
//未审核或者审核未通过的
|
||||
if(httpUrlCfg.getIsValid().equals(0) && (httpUrlCfg.getIsAudit().equals(0) || httpUrlCfg.getIsAudit().equals(2))) {
|
||||
deleteHttpCompileIds.add(httpUrlCfg.getCompileId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!StringUtil.isEmpty(auditHttpCompileIds)) {
|
||||
commonPolicyDao.auditCfgBatch("cfg_index_info", entity,auditHttpCompileIds,null);
|
||||
commonPolicyDao.auditCfgBatch("http_url_cfg", entity,auditHttpCompileIds,null);
|
||||
}
|
||||
if(!StringUtil.isEmpty(deleteHttpCompileIds)) {
|
||||
commonPolicyDao.deleteHttpUrlCfg("cfg_index_info", entity,deleteHttpCompileIds);
|
||||
commonPolicyDao.deleteHttpUrlCfg("http_url_cfg", entity,deleteHttpCompileIds);
|
||||
}
|
||||
// Protocol -> HTTP 请求/响应内容关键字单独处理 ------>
|
||||
|
||||
commonPolicyDao.auditCfgBatch( entity.getTableName(), entity,compileIds,null); // 批量审核并修改配置审核状态(主表)
|
||||
}
|
||||
|
||||
// 3.更新域配置审核状态(子表)
|
||||
if(cfgList!=null){
|
||||
for(Map<String,Object> m:cfgList){
|
||||
String tableName = m.get("tableName").toString();
|
||||
commonPolicyDao.auditCfgBatch( tableName, entity,compileIds,null);
|
||||
}
|
||||
}
|
||||
|
||||
// 4.判断是否是当前检索条件下最后一页数据 并返回结果
|
||||
page.setList(list);
|
||||
if(page.isLastPage()){
|
||||
hasData = false;
|
||||
}
|
||||
return hasData;
|
||||
|
||||
}
|
||||
public boolean batchDeleteMaatData(List<Map<String, Object>> cfgList, Page page, BaseCfg entity,
|
||||
List<BaseCfg> list, boolean hasData) {
|
||||
// 1.获取所有配置的编译ID
|
||||
List<Integer> compileIds = new ArrayList();
|
||||
for(BaseCfg cfg:list){
|
||||
compileIds.add(cfg.getCompileId());
|
||||
}
|
||||
|
||||
// 2.更新配置状态(主表)
|
||||
if(!StringUtil.isEmpty(compileIds) && !StringUtil.isEmpty(entity.getTableName())) {
|
||||
commonPolicyDao.deleteCfgBatch(entity.getTableName(), entity,compileIds); // 批量修改配置状态(主表)
|
||||
}
|
||||
|
||||
// 3.更新域配置状态(子表)
|
||||
if(cfgList != null){
|
||||
for(Map<String,Object> m : cfgList){
|
||||
String tableName = m.get("tableName").toString();
|
||||
commonPolicyDao.deleteCfgBatch(tableName, entity, compileIds);
|
||||
}
|
||||
}
|
||||
|
||||
// 4.判断是否是当前检索条件下最后一页数据 并返回结果
|
||||
page.setList(list);
|
||||
if(page.isLastPage()){
|
||||
hasData = false;
|
||||
}
|
||||
return hasData;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -720,7 +720,7 @@ public class ConfigSynchronizationService extends BaseService{
|
||||
}
|
||||
if(isUpdateCfg) {
|
||||
if(!StringUtil.isEmpty(compileIds) && !StringUtil.isEmpty(entity.getTableName())) {
|
||||
commonPolicyDao.auditCfgBatch( entity.getTableName(), entity,compileIds,null);
|
||||
commonPolicyDao.auditCfgBatch( tableName, entity,compileIds,null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -913,7 +913,7 @@ public class ConfigSynchronizationService extends BaseService{
|
||||
}
|
||||
if(isUpdateCfg) {
|
||||
if(!StringUtil.isEmpty(compileIds) && !StringUtil.isEmpty(entity.getTableName())) {
|
||||
commonPolicyDao.auditCfgBatch( entity.getTableName(), entity,compileIds,null);
|
||||
commonPolicyDao.auditCfgBatch( tableName, entity,compileIds,null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,6 +115,10 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
//设置区域运营商信息
|
||||
setAreaEffectiveIds(entity);
|
||||
|
||||
int isValid=0;
|
||||
if(!StringUtil.isEmpty(entity.getIsValid()) && entity.getIsValid()==1) {
|
||||
isValid=1;
|
||||
}
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
|
||||
@@ -189,6 +193,11 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
}
|
||||
|
||||
}
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
auditIpCfg(entity, isValid,Constants.INSERT_ACTION);
|
||||
}
|
||||
}else{
|
||||
entity.setEditTime(new Date());
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
@@ -262,6 +271,12 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(isValid==1) {
|
||||
entity.setIsAudit(1);
|
||||
entity.setIsValid(1);
|
||||
auditIpCfg(entity, isValid,Constants.UPDATE_ACTION);
|
||||
}
|
||||
}
|
||||
}
|
||||
public void updateIpCfgValid(Integer isValid,String ids,Integer functionId){
|
||||
@@ -526,12 +541,15 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
}
|
||||
}
|
||||
}
|
||||
public void auditIpCfg(CfgIndexInfo entity,Integer isAudit) throws MaatConvertException{
|
||||
public void auditIpCfg(CfgIndexInfo entity,Integer isAudit,Integer opAction) throws MaatConvertException{
|
||||
Properties props=this.getMsgProp();
|
||||
//修改数据库审核状态信息
|
||||
entity.setTableName(CfgIndexInfo.getTablename());
|
||||
entity.setIsAudit(isAudit);
|
||||
entity.setAuditorId(UserUtils.getUser().getId());
|
||||
entity.setAuditTime(new Date());
|
||||
ipCfgDao.auditCfg(entity);
|
||||
|
||||
ToMaatBean maatBean = new ToMaatBean();
|
||||
MaatCfg maatCfg = new MaatCfg();
|
||||
List<MaatCfg> configCompileList = new ArrayList();
|
||||
@@ -665,7 +683,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
maatBean.setCreatorName(entity.getCurrentUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
maatBean.setOpAction(Constants.INSERT_ACTION);
|
||||
maatBean.setOpAction(opAction);
|
||||
//限速需要发Droprate=0.001 ,暂不支持Bandwidth=200kbps
|
||||
if(entity.getAction().equals(Constants.RATELIMIT_ACTION)){
|
||||
if(entity.getUserRegion1().equals("0")){//丢包率
|
||||
|
||||
@@ -1507,3 +1507,5 @@ effective=Effective
|
||||
admin_user_warn=Admin User Warn
|
||||
interface_total=Interface Total
|
||||
service_total=Service Total
|
||||
unapproved_all=UnApprove all configurations!
|
||||
delete_all=Delete all configurations!
|
||||
@@ -1505,3 +1505,5 @@ effective=\u6709\u6548
|
||||
admin_user_warn=\u7ba1\u7406\u5458\u7528\u6237\u9884\u8b66
|
||||
interface_total=\u754c\u9762\u603b\u91cf
|
||||
service_total=\u670d\u52a1\u603b\u91cf
|
||||
unapproved_all=\u5ba1\u6838\u4E0D\u901a\u8fc7\u6240\u6709\u914d\u7f6e!
|
||||
delete_all=\u5220\u9664\u6240\u6709\u914d\u7f6e!
|
||||
5
src/main/resources/sql/201904011/add_save_and_audit.sql
Normal file
5
src/main/resources/sql/201904011/add_save_and_audit.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
#审核并下发功能,只有将此菜单分配给保存并下发用户的角色,此角色下的用户新增的配置可直接下发(此版本注意角色分配)
|
||||
#新增审核并下发菜单
|
||||
INSERT INTO `sys_menu`(`parent_id`, `parent_ids`, `code`, `name`, `sort`, `href`, `target`, `icon`, `is_show`, `permission`, `create_by`, `create_date`, `update_by`, `update_date`, `remarks`, `del_flag`, `menu_bg`, `quick_action`, `is_top`, `function_id`) VALUES (86, '0,1,86,', 'save_and_audit', '保存并下发按钮', 5060, '', '', '', 0, 'save:audit:permission', '1', '2019-04-08 11:30:31', '1', '2019-04-08 11:47:16', '保存并下发功能权限', 1, NULL, 0, 0, NULL);
|
||||
#新增审核并下发角色
|
||||
INSERT INTO `sys_role`(`NAME`, `DATA_SCOPE`, `REMARK`, `STATUS`, `CREATE_TIME`, `ROLE_TYPE`) VALUES ('saveAndAudit', 10, '', 1, '2019-04-09 11:33:40', 'user');
|
||||
@@ -67,16 +67,13 @@ DELETE FROM ip_reuse_policy_cfg;
|
||||
DELETE FROM user_manage;
|
||||
#clear vpn
|
||||
DELETE FROM service_dict_info where item_type='5';
|
||||
#<23><><EFBFBD><EFBFBD>DNS<4E><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>100<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><EFBFBD>Է<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>101<EFBFBD><EFBFBD>ʼ
|
||||
#<23><><EFBFBD><EFBFBD>DNS<4E><53><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD><D2B2>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>100<30><30><EFBFBD><EFBFBD><EFBFBD>Բ<EFBFBD><D4B2>Է<EFBFBD><D4B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>101<30><31>ʼ
|
||||
ALTER TABLE policy_group_info auto_increment = 101;
|
||||
#<23><><EFBFBD><EFBFBD>asn<EFBFBD>ŷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#<23><><EFBFBD>asn<73>ŷ<EFBFBD><C5B7><EFBFBD><EFBFBD>
|
||||
DELETE FROM asn_group_info;
|
||||
#Ĭ<>϶<EFBFBD>̬IP<49><50>ַ<EFBFBD><D6B7>
|
||||
#Ĭ<>϶<EFBFBD>̬IP<49><50>ַ<EFBFBD><D6B7>
|
||||
INSERT INTO `ip_reuse_addr_pool` (`cfg_id`, `addr_pool_name`, `ip_total`, `action`, `is_valid`, `is_audit`, `cfg_region_code`, `cfg_type`, `function_id`, `service_id`, `compile_id`, `is_area_effective`, `area_effective_ids`, `request_id`, `classify`, `attribute`, `lable`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `auditor_id`, `audit_time`, `description`, `cancel_request_id`, `user_region1`, `user_region2`, `user_region3`, `user_region4`, `user_region5`) VALUES ('0', 'dynamic_pool', '1', '96', '1', '1', '1', 'IR_STATIC_NOMINEE_IP', '633', '834', '0', '0', '', '0', '0', '0', '0', '0', '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', NULL, '', '', '', '', '');
|
||||
UPDATE ip_reuse_addr_pool set cfg_id=0 where addr_pool_name= 'dynamic_pool';
|
||||
DELETE FROM schedule_cfg;
|
||||
DELETE FROM schedule_exce_log;
|
||||
DELETE FROM schedule_exce_new;
|
||||
DELETE FROM sys_log;
|
||||
DELETE FROM sys_cfg_operation_log;
|
||||
DELETE FROM sys_cfg_operation_log;
|
||||
@@ -85,11 +82,13 @@ DELETE FROM cfg_num_statistics;
|
||||
DELETE FROM request_num_statistics;
|
||||
DELETE FROM common_keyword_cfg;
|
||||
DELETE FROM pxy_obj_spoofing_ip_pool;
|
||||
DELETE FROM schedule_cfg;
|
||||
DELETE FROM schedule_exce_log;
|
||||
DELETE FROM schedule_exce_new;
|
||||
|
||||
|
||||
|
||||
|
||||
#<23><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1>ؽ<EFBFBD>sql<71><6C><EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD><DAB8><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD>ؽ<EFBFBD><D8BD><EFBFBD>
|
||||
#<23><>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD>ı<EFBFBD><C4B1>ؽ<EFBFBD>sql<71><6C><EFBFBD><EFBFBD><EFBFBD>ڸ<EFBFBD><DAB8><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD>ؽ<EFBFBD><D8BD><EFBFBD>
|
||||
# In your Quartz properties file, you'll need to set
|
||||
# org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate
|
||||
#
|
||||
|
||||
@@ -225,12 +225,29 @@
|
||||
<div class="row">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="examine"/></label>
|
||||
<div class="col-md-6">
|
||||
<!-- 拥有配置新增直接生效的功能权限导入时默认导入+下发 -->
|
||||
<shiro:hasPermission name="save:audit:permission">
|
||||
<c:set var="auditPermission" value="true"></c:set>
|
||||
</shiro:hasPermission>
|
||||
<c:choose>
|
||||
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isSend" value="0"><spring:message code="no"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isSend" value="1" checked><spring:message code="yes"/>
|
||||
</label>
|
||||
</button>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isSend" value="0" checked><spring:message code="no"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isSend" value="1"><spring:message code="yes"/>
|
||||
</label>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
</br>
|
||||
|
||||
@@ -62,101 +62,11 @@ $(document).ready(function() {
|
||||
$('#${id} tbody tr td input.i-checks').iCheck('uncheck');
|
||||
});
|
||||
});
|
||||
//删除
|
||||
function del(url){
|
||||
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
|
||||
if($(checkboxes).filter(":checked").length>0){
|
||||
if(validateIsDelete(checkboxes)){
|
||||
top.$.jBox.tip("<spring:message code='has_prohibit_delete'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}else{
|
||||
var serviceGroupIds=[],ids=[],canDel=true;
|
||||
$(checkboxes).filter(":checked").each(function(){
|
||||
if($(this).attr("serviceGroupId")&&$(this).attr("isValid")){
|
||||
if($(this).attr("isValid")==1){//下发过的组的ip才需要判断是否是组内最后一个IP
|
||||
serviceGroupIds.push($(this).attr("serviceGroupId"));
|
||||
}
|
||||
ids.push($(this).attr("id"));
|
||||
}
|
||||
|
||||
})
|
||||
if(serviceGroupIds.length>0){
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:'${ctx}/basics/asn/ajaxIsLast',
|
||||
data:{"serviceGroupIds":serviceGroupIds.join(','),"ids":ids.join(',')},
|
||||
async:false,
|
||||
success:function(data,textStatus){//处理返回结果
|
||||
if(data){
|
||||
top.$.jBox.tip('<spring:message code="last_ip_in_asn_group"/>');
|
||||
canDel=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(canDel){
|
||||
doAll(checkboxes,url);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
//修改配置
|
||||
function update(url){
|
||||
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
var cked = $("tbody tr td input.i-checks:checkbox:checked");
|
||||
|
||||
/* var schedulerFlag = $(cked).parent().parent().find(".schedulerFlag").find("span").attr("isScheduler");
|
||||
if(schedulerFlag!= "undefined" && schedulerFlag=="yes"){//验证配置是否是定时任务,如果是定时任务,不允许修改
|
||||
top.$.jBox.tip("<spring:message code='scheduler_warning'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
} */
|
||||
if($(checkboxes).filter(":checked").length==1){
|
||||
if(cked.val()==1){
|
||||
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}/*else if(cked.val()==3){
|
||||
top.$.jBox.tip("<spring:message code='cancel_approved'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}*/
|
||||
//处理asnIp,asn组下发过的ip配置不允许修改
|
||||
if(cked.attr("asnGroup")&&cked.attr("isValid")){
|
||||
var asnGroup=cked.attr("asnGroup");
|
||||
var _isValid=cked.attr("isValid");
|
||||
if(asnGroup&&_isValid==1){
|
||||
top.$.jBox.tip("<spring:message code='can_not_edit_issued_ans_group'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
doAll(checkboxes,url);
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
//通过
|
||||
function passOpt(url){
|
||||
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
|
||||
if($(checkboxes).filter(":checked").length>0){
|
||||
/* if(validateIsScheduler(checkboxes)){//验证配置是否是定时任务,如果是定时任务,不允许手动审核
|
||||
top.$.jBox.tip("<spring:message code='scheduler_warning'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
} */
|
||||
if(validateAllNoAudit(checkboxes)){
|
||||
top.$.jBox.tip("<spring:message code='has_prohibit_pass'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}else{
|
||||
doAll(checkboxes,url);
|
||||
}
|
||||
}else{
|
||||
url=url+"&"
|
||||
//配置批量下发
|
||||
if( url.indexOf("functionId=3&") > -1 //ip whitelist
|
||||
// 判断该业务是否可以批量操作配置
|
||||
function isBatch(url){
|
||||
var flag = false;
|
||||
if(url.indexOf("functionId=3&") > -1 //ip whitelist
|
||||
|| url.indexOf("functionId=5&") > -1 //ip
|
||||
|| url.indexOf("functionId=212&") > -1 //ip
|
||||
|| url.indexOf("functionId=214&") > -1 //ip
|
||||
@@ -210,6 +120,117 @@ var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
|| url.indexOf("functionId=571&") > -1 //Trusted Certificate
|
||||
|| url.indexOf("functionId=600&") > -1 //Trusted Certificate
|
||||
){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
//删除
|
||||
function del(url){
|
||||
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
|
||||
if($(checkboxes).filter(":checked").length>0){
|
||||
if(validateIsDelete(checkboxes)){
|
||||
top.$.jBox.tip("<spring:message code='has_prohibit_delete'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}else{
|
||||
var serviceGroupIds=[],ids=[],canDel=true;
|
||||
$(checkboxes).filter(":checked").each(function(){
|
||||
if($(this).attr("serviceGroupId")&&$(this).attr("isValid")){
|
||||
if($(this).attr("isValid")==1){//下发过的组的ip才需要判断是否是组内最后一个IP
|
||||
serviceGroupIds.push($(this).attr("serviceGroupId"));
|
||||
}
|
||||
ids.push($(this).attr("id"));
|
||||
}
|
||||
|
||||
})
|
||||
if(serviceGroupIds.length>0){
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:'${ctx}/basics/asn/ajaxIsLast',
|
||||
data:{"serviceGroupIds":serviceGroupIds.join(','),"ids":ids.join(',')},
|
||||
async:false,
|
||||
success:function(data,textStatus){//处理返回结果
|
||||
if(data){
|
||||
top.$.jBox.tip('<spring:message code="last_ip_in_asn_group"/>');
|
||||
canDel=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(canDel){
|
||||
doAll(checkboxes,url);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
url = url+"&"
|
||||
if(isBatch(url)) {
|
||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='delete_all'/>",function(v,h,f){
|
||||
if(v=="ok"){
|
||||
$("#searchForm").attr("action",url);
|
||||
page();
|
||||
}
|
||||
});
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
//修改配置
|
||||
function update(url){
|
||||
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
var cked = $("tbody tr td input.i-checks:checkbox:checked");
|
||||
|
||||
/* var schedulerFlag = $(cked).parent().parent().find(".schedulerFlag").find("span").attr("isScheduler");
|
||||
if(schedulerFlag!= "undefined" && schedulerFlag=="yes"){//验证配置是否是定时任务,如果是定时任务,不允许修改
|
||||
top.$.jBox.tip("<spring:message code='scheduler_warning'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
} */
|
||||
if($(checkboxes).filter(":checked").length==1){
|
||||
//TODO 生效配置可更改功能,在最后功能实现完成后打开【打开时确认来函和专项是否影响】
|
||||
if(cked.val()==1){
|
||||
top.$.jBox.tip("<spring:message code='has_approved'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}/*else if(cked.val()==3){
|
||||
top.$.jBox.tip("<spring:message code='cancel_approved'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}*/
|
||||
//处理asnIp,asn组下发过的ip配置不允许修改
|
||||
if(cked.attr("asnGroup")&&cked.attr("isValid")){
|
||||
var asnGroup=cked.attr("asnGroup");
|
||||
var _isValid=cked.attr("isValid");
|
||||
if(asnGroup&&_isValid==1){
|
||||
top.$.jBox.tip("<spring:message code='can_not_edit_issued_ans_group'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
doAll(checkboxes,url);
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
//通过
|
||||
function passOpt(url){
|
||||
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
|
||||
if($(checkboxes).filter(":checked").length>0){
|
||||
/* if(validateIsScheduler(checkboxes)){//验证配置是否是定时任务,如果是定时任务,不允许手动审核
|
||||
top.$.jBox.tip("<spring:message code='scheduler_warning'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
} */
|
||||
if(validateAllNoAudit(checkboxes)){
|
||||
top.$.jBox.tip("<spring:message code='has_prohibit_pass'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}else{
|
||||
doAll(checkboxes,url);
|
||||
}
|
||||
}else{
|
||||
url = url+"&"
|
||||
//配置批量下发
|
||||
if(isBatch(url)){
|
||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='approved_all'/>",function(v,h,f){
|
||||
if(v=="ok"){
|
||||
$("#searchForm").attr("action",url);
|
||||
@@ -224,7 +245,7 @@ var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
}
|
||||
//未通过
|
||||
function noPassOpt(url){
|
||||
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
|
||||
if($(checkboxes).filter(":checked").length>0){
|
||||
if(validateAllNoAudit(checkboxes)){
|
||||
@@ -233,10 +254,22 @@ var checkboxes=$("#${id} ${value} tbody tr td input.i-checks:checkbox");
|
||||
}else{
|
||||
doAll(checkboxes,url);
|
||||
}
|
||||
|
||||
}else{
|
||||
url = url+"&"
|
||||
//配置批量审核(未通过)
|
||||
if(isBatch(url)){
|
||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='unapproved_all'/>",function(v,h,f){
|
||||
if(v=="ok"){
|
||||
$("#searchForm").attr("action",url);
|
||||
page();
|
||||
}
|
||||
});
|
||||
}else{
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
//配置取消
|
||||
function cancelPassOpt(url){
|
||||
@@ -301,62 +334,9 @@ function cancelPassOpt(url){
|
||||
}
|
||||
|
||||
}else{
|
||||
url=url+"&"
|
||||
url = url+"&"
|
||||
//配置批量取消
|
||||
if( url.indexOf("functionId=3&") > -1 //ip whitelist
|
||||
|| url.indexOf("functionId=5&") > -1 //ip
|
||||
|| url.indexOf("functionId=212&") > -1 //ip
|
||||
|| url.indexOf("functionId=214&") > -1 //ip
|
||||
|| url.indexOf("functionId=6&") > -1 //http url
|
||||
|| url.indexOf("functionId=7&") > -1 //dns
|
||||
|| url.indexOf("functionId=37&") > -1 //mail address
|
||||
|| url.indexOf("functionId=35&") > -1 //mail advanced
|
||||
|| url.indexOf("functionId=210&") > -1 //https monitor
|
||||
|| url.indexOf("functionId=207&") > -1 //https block
|
||||
|| url.indexOf("functionId=208&") > -1 //https redirect
|
||||
|| url.indexOf("functionId=209&") > -1 //https replace
|
||||
|| url.indexOf("functionId=211&") > -1 //https whitelist
|
||||
|| url.indexOf("functionId=407&") > -1 //Protocol Identify
|
||||
|| url.indexOf("functionId=63&") > -1 //App Identify
|
||||
|| url.indexOf("functionId=408&") > -1 //Behavior Identify
|
||||
|| url.indexOf("functionId=61&") > -1 //BGP
|
||||
|| url.indexOf("functionId=34&") > -1 //SSL
|
||||
|| url.indexOf("functionId=635&") > -1 //Website Keyword
|
||||
|| url.indexOf("functionId=8&") > -1 //HTTP Advanced
|
||||
|| url.indexOf("functionId=51&") > -1 //FTP
|
||||
|| url.indexOf("functionId=510&") > -1 //P2P
|
||||
|| url.indexOf("functionId=22&") > -1 //Streaming media
|
||||
|| url.indexOf("functionId=24&") > -1 //VoIP
|
||||
|| url.indexOf("functionId=52&") > -1 //File Digest
|
||||
|| url.indexOf("functionId=28&") > -1 //Audio Sample
|
||||
|| url.indexOf("functionId=29&") > -1 //Video Sample
|
||||
|| url.indexOf("functionId=30&") > -1 //Picture Sample
|
||||
|| url.indexOf("functionId=31&") > -1 //VoIP Voice Sample
|
||||
|| url.indexOf("functionId=630&") > -1 //Speaker Recognization
|
||||
|| url.indexOf("functionId=631&") > -1 //Logo Detection
|
||||
|| url.indexOf("functionId=632&") > -1 //Face Recognization
|
||||
|| url.indexOf("functionId=301&") > -1 //DDOS
|
||||
|| url.indexOf("functionId=200&") > -1 //Intercept Policy
|
||||
|| url.indexOf("functionId=210&") > -1 //HTTPS monitor
|
||||
|| url.indexOf("functionId=207&") > -1 //HTTPS block
|
||||
|| url.indexOf("functionId=208&") > -1 //HTTPS Redirect
|
||||
|| url.indexOf("functionId=209&") > -1 //HTTPS Replace
|
||||
|| url.indexOf("functionId=211&") > -1 //whitelist
|
||||
|| url.indexOf("functionId=213&") > -1 //Cache
|
||||
|| url.indexOf("functionId=560&") > -1 //Focused Website
|
||||
|| url.indexOf("functionId=405&") > -1 //APP IP
|
||||
|| url.indexOf("functionId=403&") > -1 //APP DOMAIN
|
||||
//|| url.indexOf("functionId=520&") > -1 //APP SSL CERT
|
||||
|| url.indexOf("functionId=563&") > -1 //APP Payload
|
||||
|| url.indexOf("functionId=565&") > -1 //APP HTTP
|
||||
|| url.indexOf("functionId=566&") > -1 //APP SSL
|
||||
|| url.indexOf("functionId=564&") > -1 //APP DNS
|
||||
|| url.indexOf("functionId=400&") > -1 //DNS Response Profiles
|
||||
|| url.indexOf("functionId=401&") > -1 //Spoofing IP
|
||||
|| url.indexOf("functionId=570&") > -1 //Key Ring
|
||||
|| url.indexOf("functionId=571&") > -1 //Trusted Certificate
|
||||
|| url.indexOf("functionId=600&") > -1 //Trusted Certificate
|
||||
){
|
||||
if(isBatch(url)){
|
||||
top.$.jBox.confirm("<spring:message code='confirm_message'/>","<spring:message code='cancel_all'/>",function(v,h,f){
|
||||
if(v=="ok"){
|
||||
$("#searchForm").attr("action",url);
|
||||
|
||||
@@ -80,7 +80,7 @@ $(function(){
|
||||
<div class="form-group asnNo">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="asn_no"/></label>
|
||||
<div class="col-md-6">
|
||||
<input id="asnNo" class="form-control required asnNoUnique number" type="text" name="asnId" value="${_cfg.asnId}" autocomplete="off" maxlength="15" ctx="${ctx }">
|
||||
<input id="asnNo" class="form-control required asnNoUnique digits" type="text" name="asnId" value="${_cfg.asnId}" autocomplete="off" maxlength="15" ctx="${ctx }">
|
||||
</div>
|
||||
<div for="asnId"></div>
|
||||
</div>
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.cfgKeywords}"){
|
||||
$("#intype").val("${cfg.cfgKeywords}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgKeywords"><spring:message code="domain"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
|
||||
</form:select>
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
$("#intype").val("${cfg.destPort}");
|
||||
} else if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
} else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
} else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
} else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
@@ -130,7 +130,7 @@
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="destIpAddress"><spring:message code="server_ip"></spring:message></form:option>
|
||||
<form:option value="destPort"><spring:message code="server_port"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
|
||||
</form:select>
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.ipCfg.destIpAddress}"){
|
||||
$("#intype").val("${cfg.ipCfg.destIpAddress}");
|
||||
}else if("${cfg.strCfg.cfgKeywords}"){
|
||||
@@ -187,7 +187,7 @@
|
||||
<div class="input-group-btn">
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<c:if test="${cfg.functionId ne 564 && cfg.functionId ne 567}">
|
||||
<form:option value="ipCfg.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
||||
|
||||
@@ -22,9 +22,9 @@ $(function(){
|
||||
$(".ratelimitAction").addClass("hidden");
|
||||
}
|
||||
if(($(".action:checked").val()==1) || ($(".action:checked").val()==16)){
|
||||
$(".subscribeId").show();
|
||||
$(".subscribeId").show().removeClass("disabled");
|
||||
}else{
|
||||
$(".subscribeId").hide();
|
||||
$(".subscribeId").hide().addClass("disabled");
|
||||
}
|
||||
if($(this).val()==1){
|
||||
$(".ipPortAdd").click();
|
||||
@@ -44,9 +44,9 @@ $(function(){
|
||||
$(".ratelimitAction").addClass("hidden");
|
||||
}
|
||||
if(($(".action:checked").val()==1) || ($(".action:checked").val()==16)){
|
||||
$(".subscribeId").show();
|
||||
$(".subscribeId").show().removeClass("disabled");
|
||||
}else{
|
||||
$(".subscribeId").hide();
|
||||
$(".subscribeId").hide().addClass("disabled");
|
||||
}
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.ipPort.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.ipPort.srcIpAddress}");
|
||||
}else if("${cfg.ipPort.destIpAddress}"){
|
||||
@@ -181,7 +181,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
||||
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
||||
<form:option value="action"><spring:message code="block_type"></spring:message></form:option>
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.cfgKeywords}"){
|
||||
$("#intype").val("${cfg.cfgKeywords}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
@@ -109,7 +109,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgKeywords"><spring:message code="keywords"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
|
||||
</form:select>
|
||||
|
||||
@@ -12,8 +12,8 @@
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.cfgKeywords}"){
|
||||
$("#intype").val("${cfg.cfgKeywords}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
@@ -125,7 +125,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgKeywords"><spring:message code="domain"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
|
||||
</form:select>
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.ipPort.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.ipPort.srcIpAddress}");
|
||||
}else if("${cfg.ipPort.destIpAddress}"){
|
||||
@@ -178,7 +178,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"/></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"/></form:option>
|
||||
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
||||
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
||||
<form:option value="avContUrlCfg.cfgKeywords"><spring:message code="URL"></spring:message></form:option>
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
@@ -105,7 +105,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="action"><spring:message code="block_type"></spring:message></form:option>
|
||||
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
|
||||
</form:select>
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.ipPort.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.ipPort.srcIpAddress}");
|
||||
}else if("${cfg.ipPort.destIpAddress}"){
|
||||
@@ -99,6 +99,11 @@
|
||||
$("#"+openId).show();
|
||||
$("#"+closeId).parent().parent().next("tr").hide();
|
||||
});
|
||||
if($("#exportType").val() != null && $("#exportType").val() != ""){
|
||||
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||
$("#exportValue").val($("#intype").val());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -143,6 +148,8 @@
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/ntc/av/voipList?functionId=${cfg.functionId}" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<input id="exportType" type="hidden" value="${cfg.seltype}"/>
|
||||
<input id="exportValue" type="hidden" value=""/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
|
||||
@@ -169,7 +176,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"/></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"/></form:option>
|
||||
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
||||
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
||||
<form:option value="voipAccount.cfgKeywords"><spring:message code="keywords"/></form:option>
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.ipPort.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.ipPort.srcIpAddress}");
|
||||
}else if("${cfg.ipPort.destIpAddress}"){
|
||||
@@ -184,7 +184,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
||||
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
||||
<form:option value="action"><spring:message code="block_type"></spring:message></form:option>
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.ipPort.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.ipPort.srcIpAddress}");
|
||||
}else if("${cfg.ipPort.destIpAddress}"){
|
||||
@@ -181,7 +181,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
||||
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
||||
<%-- <form:option value="ntcSubscribeIdCfg.cfgKeywords"><spring:message code="APP_SUBSCRIBE_ID"></spring:message></form:option> --%>
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
@@ -176,7 +176,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="cfdsLevel"><spring:message code="harm_level"/></form:option>
|
||||
<form:option value="action"><spring:message code="block_type"></spring:message></form:option>
|
||||
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
|
||||
|
||||
@@ -51,12 +51,12 @@
|
||||
submitHandler : function(form) {
|
||||
|
||||
var flag = true;
|
||||
var boxSolidLenth=$(".boxSolid").length;
|
||||
/* var subscribeId=0;
|
||||
//存在隐藏的subscribeId,不算进域配置
|
||||
if($(".boxSolid.hidden").hasClass("subscribeId")){
|
||||
subscribeId=1;
|
||||
}
|
||||
var boxSolidLenth=$(".boxSolid").length;
|
||||
if($(".boxSolid").hasClass("subscribeId")){
|
||||
boxSolidLenth=boxSolidLenth-1;
|
||||
} */
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.ipPort.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.ipPort.srcIpAddress}");
|
||||
}else if("${cfg.ipPort.destIpAddress}"){
|
||||
@@ -151,7 +151,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
||||
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
||||
<form:option value="searchKeywords"><spring:message code="keywords"/></form:option>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.ipPort.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.ipPort.srcIpAddress}");
|
||||
}else if("${cfg.ipPort.destIpAddress}"){
|
||||
@@ -165,7 +165,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
||||
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
||||
<form:option value="p2pKeyword.cfgKeywords"><spring:message code="p2p_eMule_keywords"/></form:option>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.ipPort.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.ipPort.srcIpAddress}");
|
||||
}else if("${cfg.ipPort.destIpAddress}"){
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
||||
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
||||
<c:if test="${cfg.functionId eq 212}">
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<option asnId="${policyGroup.asnId}" value="${policyGroup.groupName}" <c:if test="${asn==policyGroup.groupName }">selected</c:if>><spring:message code="${policyGroup.groupName}"/></option>
|
||||
</c:forEach>
|
||||
</select> --%>
|
||||
<input class="form-control required invisibleChar asnMustExists" type="text" name="userRegion5" value="${_cfg.userRegion5}" ctx="${ctx}">
|
||||
<input class="form-control required invisibleChar asnMustExists digits" type="text" name="userRegion5" value="${_cfg.userRegion5}" ctx="${ctx}">
|
||||
<input class="form-control required invisibleChar orgMustExists hidden" type="text" name="userRegion4" value="${asn}" ctx="${ctx}">
|
||||
</div>
|
||||
<div for="userRegion5"></div>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.ipPort.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.ipPort.srcIpAddress}");
|
||||
}else if("${cfg.ipPort.destIpAddress}"){
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
||||
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
||||
<form:option value="action"><spring:message code="block_type"></spring:message></form:option>
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.ipPort.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.ipPort.srcIpAddress}");
|
||||
}else if("${cfg.ipPort.destIpAddress}"){
|
||||
@@ -164,7 +164,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<c:if test="${cfg.functionId eq '35'}">
|
||||
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
||||
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.srcIpAddress}");
|
||||
}else if("${cfg.srcPort}"){
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="srcIpAddress"><spring:message code="original_dest_ip"></spring:message></form:option>
|
||||
<form:option value="srcPort"><spring:message code="original_dest_port"></spring:message></form:option>
|
||||
<%-- <form:option value="destIpAddress"><spring:message code="translated_dest_ip"></spring:message></form:option> --%>
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
$("#intype").val("${cfg.userName}");
|
||||
}else if("${cfg.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.srcIpAddress}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else{
|
||||
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
|
||||
}
|
||||
@@ -123,7 +123,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<%-- <form:option value="srcIpAddress"><spring:message code="ip"></spring:message></form:option> --%>
|
||||
<form:option value="userName"><spring:message code="user"></spring:message></form:option>
|
||||
<%-- <form:option value="userType"><spring:message code="user_type"></spring:message></form:option> --%>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.ipPort.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.ipPort.srcIpAddress}");
|
||||
}else if("${cfg.ipPort.destIpAddress}"){
|
||||
@@ -165,7 +165,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
||||
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
||||
<form:option value="ntcBgpAsCfg.cfgKeywords"><spring:message code="keywords"/></form:option>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.strCfg.cfgKeywords}"){
|
||||
$("#intype").val("${cfg.strCfg.cfgKeywords}");
|
||||
}else{
|
||||
@@ -84,6 +84,11 @@
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
$("#protocolId").val($(this).attr("protocolId"));
|
||||
});
|
||||
if($("#exportType").val() != null && $("#exportType").val() != ""){
|
||||
if($("#intype").val() != null && $("#intype").val() != ""){
|
||||
$("#exportValue").val($("#intype").val());
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
@@ -122,6 +127,8 @@
|
||||
<form:form id="searchForm" modelAttribute="cfg" action="${actionPath }" method="post" class="form-search">
|
||||
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
|
||||
<input id="audit" name="audit" type="hidden" value="${audit}"/>
|
||||
<input id="exportType" type="hidden" value="${cfg.seltype}"/>
|
||||
<input id="exportValue" type="hidden" value=""/>
|
||||
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
|
||||
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
|
||||
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
|
||||
@@ -148,7 +155,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="strCfg.cfgKeywords"><spring:message code="keywords"></spring:message></form:option>
|
||||
<form:option value="action"><spring:message code="block_type"></spring:message></form:option>
|
||||
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.ipPort.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.ipPort.srcIpAddress}");
|
||||
}else if("${cfg.ipPort.destIpAddress}"){
|
||||
@@ -358,7 +358,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
||||
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
||||
<form:option value="httpUrl.cfgKeywords"><spring:message code="URL"></spring:message></form:option>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.ipPort.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.ipPort.srcIpAddress}");
|
||||
}else if("${cfg.ipPort.destIpAddress}"){
|
||||
@@ -163,7 +163,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
||||
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
||||
<form:option value="searchKeywords"><spring:message code="keywords"></spring:message></form:option>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.ipPort.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.ipPort.srcIpAddress}");
|
||||
}else if("${cfg.ipPort.destIpAddress}"){
|
||||
@@ -316,7 +316,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<c:if test="${cfg.functionId eq 8}">
|
||||
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
||||
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.ipPort.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.ipPort.srcIpAddress}");
|
||||
}else if("${cfg.ipPort.destIpAddress}"){
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
||||
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
||||
<form:option value="sslCfg.cfgKeywords"><spring:message code="keywords"></spring:message></form:option>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.httpUrl.cfgKeywords}"){
|
||||
$("#intype").val("${cfg.httpUrl.cfgKeywords}");
|
||||
}else{
|
||||
@@ -145,7 +145,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="httpUrl.cfgKeywords"><spring:message code="URL"></spring:message></form:option>
|
||||
<form:option value="action"><spring:message code="block_type"></spring:message></form:option>
|
||||
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
|
||||
|
||||
@@ -169,6 +169,8 @@
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" name="isValid" value="${_cfg.isValid}">
|
||||
<input type="hidden" name="isAudit" value="${_cfg.isAudit}">
|
||||
<!-- <input type="hidden" name="protocol" value="0">
|
||||
<input type="hidden" name="direction" value="0"> -->
|
||||
<input type="hidden" name="isAreaEffective" value="0" >
|
||||
@@ -342,9 +344,23 @@
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<c:set var="auditPermission" value="false"></c:set>
|
||||
<!-- 拥有配置新增直接生效的功能权限 -->
|
||||
<shiro:hasPermission name="save:audit:permission">
|
||||
<c:set var="auditPermission" value="true"></c:set>
|
||||
</shiro:hasPermission>
|
||||
<c:choose>
|
||||
<c:when test="${!(fns:getUser().isAdmin()) && auditPermission}">
|
||||
<button id="audit" type="submit" class="btn green">
|
||||
<spring:message code="submit" />
|
||||
</button>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<button id="save" type="submit" class="btn green">
|
||||
<spring:message code="submit" />
|
||||
</button>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
<button id="cancel" type="button" class="btn default">
|
||||
<spring:message code="cancel" />
|
||||
</button>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
//搜索框提示语初始化
|
||||
if("${cfg.cfgDesc}"){
|
||||
$("#intype").val("${cfg.cfgDesc}");
|
||||
}else if("${cfg.compileId}"){
|
||||
$("#intype").val("${cfg.compileId}");
|
||||
}else if("${cfg.compileIdNew}"){
|
||||
$("#intype").val("${cfg.compileIdNew}");
|
||||
}else if("${cfg.ipPort.srcIpAddress}"){
|
||||
$("#intype").val("${cfg.ipPort.srcIpAddress}");
|
||||
}else if("${cfg.ipPort.destIpAddress}"){
|
||||
@@ -160,7 +160,7 @@
|
||||
|
||||
<form:select path="seltype" class="selectpicker select2 input-small" >
|
||||
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
|
||||
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<form:option value="compileIdNew"><spring:message code="cfg_id"></spring:message></form:option>
|
||||
<%-- <form:option value="voipIp.srcIpAddress"><spring:message code="client_ip"/></form:option>
|
||||
<form:option value="voipIp.srcPort"><spring:message code="client_port"/></form:option>
|
||||
<form:option value="voipAccount.cfgKeywords"><spring:message code="key_word"/></form:option>
|
||||
|
||||
@@ -24,6 +24,24 @@
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
//cfgId 新增配置ID查询条件验证 1,2,3 1-3
|
||||
jQuery.validator.addMethod("compileIdCheck",function(value,element){
|
||||
var flagTypeSame=true;
|
||||
if(this.optional(element) || /^(\d+,)*\d+$/.test(value) || /^(\d+-)?\d+$/.test(value)){
|
||||
flagTypeSame=true;
|
||||
if(/^(\d+-)?\d+$/.test(value)){
|
||||
var strArr=value.split("-");
|
||||
if(Number(strArr[0])>Number(strArr[1])){
|
||||
flagTypeSame=false;
|
||||
}else{
|
||||
flagTypeSame=true;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
flagTypeSame=false;
|
||||
}
|
||||
return flagTypeSame ;
|
||||
},$.validator.messages.compileIdCheck);
|
||||
jQuery.validator.addMethod("hexCheck", function(value, element) {
|
||||
return this.optional(element) || /^([0-9|a-f|A-F]*)$/.test(value);
|
||||
}, $.validator.messages.hexCheck);
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!",
|
||||
log_no_data:"This hour no data",
|
||||
expireTip:"Start time and end time interval is at least 1 minute",
|
||||
compareTip:"Start time should not be less than the current time plus 2 minutes."
|
||||
compareTip:"Start time should not be less than the current time plus 2 minutes.",
|
||||
compileIdCheck:"Please enter the correct query format"
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!",
|
||||
log_no_data:"Нет данных за этот час",
|
||||
expireTip:"Start time and end time interval is at least 1 minute",
|
||||
compareTip:"Start time should not be less than the current time plus 2 minutes."
|
||||
compareTip:"Start time should not be less than the current time plus 2 minutes.",
|
||||
compileIdCheck:"Please enter the correct query format"
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
protect_warn:"该策略执行条件过于宽泛,会消耗较多的计算资源。慎用!",
|
||||
log_no_data:"本小时无数据",
|
||||
expireTip:"开始时间结束时间间隔至少为1分钟",
|
||||
compareTip:"开始时间不能小于当前时间加上2分钟 "
|
||||
compareTip:"开始时间不能小于当前时间加上2分钟 ",
|
||||
compileIdCheck:"请输入正确的查询格式"
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
@@ -739,25 +739,25 @@ window.onload=function(){
|
||||
$("div[class='content content5']").find("label:lt(1)").addClass("keyword-disinline");//page.css 关键词换行
|
||||
})
|
||||
// 配置id的搜索下拉框选择切换
|
||||
if ($("#searchForm #seltype").val() == 'compileId') {
|
||||
$("#searchForm #intype").addClass("number");
|
||||
if ($("#searchForm #seltype").val() == 'compileIdNew') {
|
||||
$("#searchForm #intype").addClass("compileIdCheck");
|
||||
} else {
|
||||
$("#searchForm #intype").removeClass("number");
|
||||
$("#searchForm #intype").removeClass("compileIdCheck");
|
||||
}
|
||||
// reset时去掉number
|
||||
$("#resetBtn").on("click", function() {
|
||||
if ($("#searchForm #seltype").val() == 'compileId') {
|
||||
$("#searchForm #intype").addClass("number");
|
||||
if ($("#searchForm #seltype").val() == 'compileIdNew') {
|
||||
$("#searchForm #intype").addClass("compileIdCheck");
|
||||
} else {
|
||||
$("#searchForm #intype").removeClass("number");
|
||||
$("#searchForm #intype").removeClass("compileIdCheck");
|
||||
}
|
||||
});
|
||||
// 切换时为compileId加上number
|
||||
$("#searchForm #seltype").on("change", function() {
|
||||
if ($("#searchForm #seltype").val() == 'compileId') {
|
||||
$("#searchForm #intype").addClass("number");
|
||||
if ($("#searchForm #seltype").val() == 'compileIdNew') {
|
||||
$("#searchForm #intype").addClass("compileIdCheck");
|
||||
} else {
|
||||
$("#searchForm #intype").removeClass("number");
|
||||
$("#searchForm #intype").removeClass("compileIdCheck");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user