Compare commits
19 Commits
demo_appse
...
devlop_url
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9942cfe1e7 | ||
|
|
2dd73adfbb | ||
|
|
2404bd69a4 | ||
|
|
b8c9b88196 | ||
|
|
3a1580bb0c | ||
|
|
d0994b7f98 | ||
|
|
16d1382909 | ||
|
|
80ede65fb1 | ||
|
|
31edf93fdc | ||
|
|
efbb596bd5 | ||
|
|
9b36df1a00 | ||
|
|
127a281df8 | ||
|
|
ff61fa313a | ||
|
|
fda327e4c1 | ||
|
|
6ffdcd0dff | ||
|
|
e5d8f038ea | ||
|
|
e4b44e6b8c | ||
|
|
ae4cca4dfe | ||
|
|
67f44a9b30 |
@@ -44,43 +44,23 @@ public class AppComplexFeatureCfg extends BaseCfg<AppComplexFeatureCfg> {
|
||||
private List<AppIpCfg> ipPortList = new ArrayList();
|
||||
private String cfgRegionCode1;
|
||||
//以下参数为APP PAYLOAD L3_HEADER的特殊属性(使用偏移表达式处理)
|
||||
private String ver; // s: 为session组件复用时的属性含义 // s:传输协议
|
||||
private String ihl; // s:L7层协议未知×
|
||||
private String tos; // s:L7层协议
|
||||
private String totalLength; // s:链接建立方式
|
||||
private String flags; // s:TCP包发送特性
|
||||
private String fragmentOffset; // s:域名初筛标识
|
||||
private String protocol; // s:S2C Frequent Payload Size
|
||||
private String icmpType; // s:S2C Payload Size Sequence
|
||||
private String icmpCode; // s:C2S Frequent Payload Size
|
||||
private String icmpIdentifier; // s:C2S Payload Size Sequence
|
||||
private String headerType; // s:传输服务端端口
|
||||
|
||||
private String ver;
|
||||
private String ihl;
|
||||
private String tos;
|
||||
private String totalLength;
|
||||
private String flags;
|
||||
private String fragmentOffset;
|
||||
private String protocol;
|
||||
private String icmpType;
|
||||
private String icmpCode;
|
||||
private String icmpIdentifier;
|
||||
private String headerType;
|
||||
//以下参数为APP payload payload的特殊属性(偏移量表达式时处理)
|
||||
private Integer payloadOffset; // s:session size min
|
||||
private Integer payloadSize;//下发综合服务接口时,为单独的域配置 // s:session size max
|
||||
private String payloadPacketDirection;//下发综合服务接口时,为单独的域配置 // s:清洗标识
|
||||
|
||||
private String sessionC2sRadio;
|
||||
private String sessionS2cRadio;
|
||||
|
||||
private Integer payloadOffset;
|
||||
private Integer payloadSize;//下发综合服务接口时,为单独的域配置
|
||||
private String payloadPacketDirection;//下发综合服务接口时,为单独的域配置
|
||||
|
||||
|
||||
public String getSessionC2sRadio() {
|
||||
return sessionC2sRadio;
|
||||
}
|
||||
|
||||
public void setSessionC2sRadio(String sessionC2sRadio) {
|
||||
this.sessionC2sRadio = sessionC2sRadio;
|
||||
}
|
||||
|
||||
public String getSessionS2cRadio() {
|
||||
return sessionS2cRadio;
|
||||
}
|
||||
|
||||
public void setSessionS2cRadio(String sessionS2cRadio) {
|
||||
this.sessionS2cRadio = sessionS2cRadio;
|
||||
}
|
||||
|
||||
public String getCfgRegionCode1() {
|
||||
return cfgRegionCode1;
|
||||
}
|
||||
|
||||
@@ -8,9 +8,6 @@
|
||||
*/
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
@@ -41,10 +38,6 @@ public class AppDomainCfg extends BaseCfg<AppDomainCfg> {
|
||||
private String cfgKeywords;
|
||||
@ExcelField(title="social_app",sort=2)
|
||||
private String appName;
|
||||
|
||||
private AppFeatureProperties appFeaturePropCfg;
|
||||
private List<AppFeatureProperties> appFeaturePropCfgList = new ArrayList();
|
||||
|
||||
/**
|
||||
* 表达式类型
|
||||
*/
|
||||
@@ -78,22 +71,6 @@ public class AppDomainCfg extends BaseCfg<AppDomainCfg> {
|
||||
|
||||
|
||||
|
||||
public AppFeatureProperties getAppFeaturePropCfg() {
|
||||
return appFeaturePropCfg;
|
||||
}
|
||||
|
||||
public void setAppFeaturePropCfg(AppFeatureProperties appFeaturePropCfg) {
|
||||
this.appFeaturePropCfg = appFeaturePropCfg;
|
||||
}
|
||||
|
||||
public List<AppFeatureProperties> getAppFeaturePropCfgList() {
|
||||
return appFeaturePropCfgList;
|
||||
}
|
||||
|
||||
public void setAppFeaturePropCfgList(List<AppFeatureProperties> appFeaturePropCfgList) {
|
||||
this.appFeaturePropCfgList = appFeaturePropCfgList;
|
||||
}
|
||||
|
||||
public Integer getIsHex() {
|
||||
return isHex;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ package com.nis.domain.configuration;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
|
||||
@@ -36,12 +37,8 @@ public class AppFeatureIndex extends BaseCfg<AppFeatureIndex> {
|
||||
private AppByteCfg strCfg;
|
||||
private AppIpCfg ipCfg;
|
||||
private List<AppIpCfg> ipPortList = new ArrayList();
|
||||
private AppFeatureProperties appFeaturePropCfg;
|
||||
private List<AppFeatureProperties> appFeaturePropCfgList = new ArrayList();
|
||||
|
||||
private List<AppStringFeatureCfg> strList = new ArrayList();
|
||||
private List<AppComplexFeatureCfg> complexList = new ArrayList();
|
||||
private List<AppComplexFeatureCfg> sessionList = new ArrayList();
|
||||
private List<AppTcpCfg> numCfgList = new ArrayList();
|
||||
protected Integer exprType ;
|
||||
protected Integer matchMethod ;
|
||||
@@ -197,23 +194,4 @@ public class AppFeatureIndex extends BaseCfg<AppFeatureIndex> {
|
||||
this.relationTime = relationTime;
|
||||
}
|
||||
|
||||
public List<AppComplexFeatureCfg> getSessionList() {
|
||||
return sessionList;
|
||||
}
|
||||
public void setSessionList(List<AppComplexFeatureCfg> sessionList) {
|
||||
this.sessionList = sessionList;
|
||||
}
|
||||
|
||||
public AppFeatureProperties getAppFeaturePropCfg() {
|
||||
return appFeaturePropCfg;
|
||||
}
|
||||
public void setAppFeaturePropCfg(AppFeatureProperties appFeaturePropCfg) {
|
||||
this.appFeaturePropCfg = appFeaturePropCfg;
|
||||
}
|
||||
public List<AppFeatureProperties> getAppFeaturePropCfgList() {
|
||||
return appFeaturePropCfgList;
|
||||
}
|
||||
public void setAppFeaturePropCfgList(List<AppFeatureProperties> appFeaturePropCfgList) {
|
||||
this.appFeaturePropCfgList = appFeaturePropCfgList;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,94 +0,0 @@
|
||||
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.nis.util.excel.ExcelField;
|
||||
|
||||
/**
|
||||
*
|
||||
* @ClassName:AppCorrelationIpCfg
|
||||
* @Description:TODO(这里用一句话描述这个类的作用)
|
||||
* @author zdx
|
||||
* @date 2019年1月28日 下午6:09:24
|
||||
* @version V1.0
|
||||
*/
|
||||
public class AppFeatureProperties extends BaseCfg<AppFeatureProperties> {
|
||||
|
||||
private static final long serialVersionUID = -5994798049255256431L;
|
||||
private static final String tableName="app_feature_prop_cfg";
|
||||
@Expose
|
||||
@ExcelField(title="cfg_id",sort=0)
|
||||
private Long cfgId;
|
||||
private Integer compileId;
|
||||
private Integer dropOpt;
|
||||
private Integer loopOpt;
|
||||
private String weakFeature;
|
||||
private String whitelistFeature;
|
||||
private Integer extendScanPktNum;
|
||||
private Integer correlationValidTime;
|
||||
private String correlationBlockAfter;
|
||||
private Integer longStreamLockTime;
|
||||
public Long getCfgId() {
|
||||
return cfgId;
|
||||
}
|
||||
public void setCfgId(Long cfgId) {
|
||||
this.cfgId = cfgId;
|
||||
}
|
||||
public Integer getCompileId() {
|
||||
return compileId;
|
||||
}
|
||||
public void setCompileId(Integer compileId) {
|
||||
this.compileId = compileId;
|
||||
}
|
||||
public Integer getDropOpt() {
|
||||
return dropOpt;
|
||||
}
|
||||
public void setDropOpt(Integer dropOpt) {
|
||||
this.dropOpt = dropOpt;
|
||||
}
|
||||
public Integer getLoopOpt() {
|
||||
return loopOpt;
|
||||
}
|
||||
public void setLoopOpt(Integer loopOpt) {
|
||||
this.loopOpt = loopOpt;
|
||||
}
|
||||
public String getWeakFeature() {
|
||||
return weakFeature;
|
||||
}
|
||||
public void setWeakFeature(String weakFeature) {
|
||||
this.weakFeature = weakFeature;
|
||||
}
|
||||
public String getWhitelistFeature() {
|
||||
return whitelistFeature;
|
||||
}
|
||||
public void setWhitelistFeature(String whitelistFeature) {
|
||||
this.whitelistFeature = whitelistFeature;
|
||||
}
|
||||
public Integer getExtendScanPktNum() {
|
||||
return extendScanPktNum;
|
||||
}
|
||||
public void setExtendScanPktNum(Integer extendScanPktNum) {
|
||||
this.extendScanPktNum = extendScanPktNum;
|
||||
}
|
||||
public Integer getCorrelationValidTime() {
|
||||
return correlationValidTime;
|
||||
}
|
||||
public void setCorrelationValidTime(Integer correlationValidTime) {
|
||||
this.correlationValidTime = correlationValidTime;
|
||||
}
|
||||
public String getCorrelationBlockAfter() {
|
||||
return correlationBlockAfter;
|
||||
}
|
||||
public void setCorrelationBlockAfter(String correlationBlockAfter) {
|
||||
this.correlationBlockAfter = correlationBlockAfter;
|
||||
}
|
||||
public Integer getLongStreamLockTime() {
|
||||
return longStreamLockTime;
|
||||
}
|
||||
public void setLongStreamLockTime(Integer longStreamLockTime) {
|
||||
this.longStreamLockTime = longStreamLockTime;
|
||||
}
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
@@ -43,9 +42,6 @@ public class AppIpCfg extends BaseCfg<AppIpCfg> {
|
||||
protected String srcPort;
|
||||
@ExcelField(title="server_port",sort=5)
|
||||
protected String destPort;
|
||||
private AppFeatureProperties appFeaturePropCfg;
|
||||
private List<AppFeatureProperties> appFeaturePropCfgList = new ArrayList();
|
||||
|
||||
|
||||
/**
|
||||
* 方向
|
||||
@@ -75,18 +71,6 @@ public class AppIpCfg extends BaseCfg<AppIpCfg> {
|
||||
public Integer getIpType() {
|
||||
return ipType;
|
||||
}
|
||||
public AppFeatureProperties getAppFeaturePropCfg() {
|
||||
return appFeaturePropCfg;
|
||||
}
|
||||
public void setAppFeaturePropCfg(AppFeatureProperties appFeaturePropCfg) {
|
||||
this.appFeaturePropCfg = appFeaturePropCfg;
|
||||
}
|
||||
public List<AppFeatureProperties> getAppFeaturePropCfgList() {
|
||||
return appFeaturePropCfgList;
|
||||
}
|
||||
public void setAppFeaturePropCfgList(List<AppFeatureProperties> appFeaturePropCfgList) {
|
||||
this.appFeaturePropCfgList = appFeaturePropCfgList;
|
||||
}
|
||||
/**
|
||||
* @param ipType the ipType to set
|
||||
*/
|
||||
|
||||
@@ -744,14 +744,10 @@ public class ConfigServiceUtil {
|
||||
result= response.readEntity(String.class);
|
||||
logger.info("cgi info:"+result);
|
||||
}else{
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
map = (Map<String, String>) JSON.parse(result);
|
||||
String error = map.get("error");
|
||||
if (!StringUtil.isEmpty(error)) {
|
||||
error=cgiError(error);
|
||||
throw new MaatConvertException(error);
|
||||
}else{
|
||||
throw new MaatConvertException(null);
|
||||
if(response!= null) {
|
||||
throw new MaatConvertException("<spring:message code=\"cgi_service_failed\"/>:"+response.readEntity(String.class));
|
||||
}else {
|
||||
throw new MaatConvertException("<spring:message code=\"cgi_service_failed\"/>");
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
@@ -764,28 +760,6 @@ public class ConfigServiceUtil {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
public static String cgiError(String error){
|
||||
String cgiError="";
|
||||
String er=error.toLowerCase().trim();
|
||||
String errors=Constants.CGI_ERROR;
|
||||
if(!StringUtil.isEmpty(errors)){
|
||||
String [] ers=errors.toLowerCase().split(",");
|
||||
for (int i = 0; i < ers.length; i++) {
|
||||
if(ers[i].trim().equals(er)){
|
||||
cgiError=error;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return cgiError;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 配置全量更新指令下发
|
||||
* @param params
|
||||
|
||||
@@ -831,8 +831,4 @@ public final class Constants {
|
||||
* 时间格式化
|
||||
*/
|
||||
public static final String COMMON_TIME_FORMAT = "HH:mm:ss";
|
||||
/**
|
||||
* vpn cgi接口报错信息
|
||||
*/
|
||||
public static final String CGI_ERROR = Configurations.getStringProperty("cgiError","");;
|
||||
}
|
||||
|
||||
@@ -1,39 +1,27 @@
|
||||
package com.nis.web.controller.basics;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import jersey.repackaged.com.google.common.collect.Lists;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.FunctionRegionDict;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.AsnGroupInfo;
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.DnsKeywordCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
//import com.nis.util.AsnCacheUtils;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
@@ -119,7 +107,7 @@ public class DnsKeywordController extends BaseController{
|
||||
,HttpServletResponse response
|
||||
,RedirectAttributes redirectAttributes) {
|
||||
//选中配置审核
|
||||
/*if(!StringUtil.isEmpty(ids)) {
|
||||
if(!StringUtil.isEmpty(ids)) {
|
||||
List<DnsKeywordCfg> infoList=dnsKeywordCfgService.getByIds(ids);
|
||||
Map<Long,List<DnsKeywordCfg>> dnsKeywordMap=Maps.newHashMap();
|
||||
for(DnsKeywordCfg entity:infoList) {
|
||||
@@ -136,10 +124,10 @@ public class DnsKeywordController extends BaseController{
|
||||
dnsKeywordMap.put(Long.parseLong(entity.getUserRegion1()), keywords);
|
||||
}
|
||||
}
|
||||
*//********************每次下发一个组的region,保证事物********************//*
|
||||
//********************每次下发一个组的region,保证事物********************//*
|
||||
for (Long groupId : dnsKeywordMap.keySet()) {
|
||||
try {
|
||||
dnsKeywordCfgService.auditDnsKeywordBatch(dnsKeywordMap.get(groupId),groupId,isValid);
|
||||
dnsKeywordCfgService.auditDnsKeywordBatch(dnsKeywordMap.get(groupId),groupId,isAudit,isValid);
|
||||
} catch (Exception e) {
|
||||
logger.error("配置下发失败:",e);
|
||||
if(e instanceof MaatConvertException) {
|
||||
@@ -150,7 +138,7 @@ public class DnsKeywordController extends BaseController{
|
||||
|
||||
}
|
||||
}
|
||||
}else {
|
||||
}/*else {
|
||||
//条件下所有配置审核
|
||||
Page<AsnIpCfg> searchPage=new Page<AsnIpCfg>(request,response,"a");
|
||||
Page<AsnIpCfg> auditPage=new Page<AsnIpCfg>(request,response,"a");
|
||||
|
||||
@@ -346,7 +346,6 @@ public class AppCfgController extends BaseController {
|
||||
public String ipCfgForm(Model model, String ids, AppIpCfg entity) {
|
||||
if (StringUtils.isNotBlank(ids)) {
|
||||
entity = appCfgService.getAppIpCfg(Long.parseLong(ids));
|
||||
entity.setAppFeaturePropCfgList(appMultiFeatureCfgService.getAppFeaturePropCfg(entity.getCompileId(), entity.getFunctionId(), null));
|
||||
initUpdateFormCondition(model, entity);
|
||||
} else {
|
||||
initFormCondition(model, entity);
|
||||
@@ -672,7 +671,6 @@ public class AppCfgController extends BaseController {
|
||||
public String domainCfgForm(Model model, String ids, AppDomainCfg entity) {
|
||||
if (StringUtils.isNotBlank(ids)) {
|
||||
entity = appCfgService.getAppDomainCfg(Long.parseLong(ids));
|
||||
entity.setAppFeaturePropCfgList(appMultiFeatureCfgService.getAppFeaturePropCfg(entity.getCompileId(), entity.getFunctionId(), null));
|
||||
initUpdateFormCondition(model, entity);
|
||||
} else {
|
||||
initFormCondition(model, entity);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.nis.web.controller.configuration;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@@ -11,25 +12,52 @@ import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.apache.taglibs.standard.functions.Functions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.FunctionRegionDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.SysDataDictionaryItem;
|
||||
import com.nis.domain.configuration.AppBuiltInFeatureFile;
|
||||
import com.nis.domain.configuration.AppByteCfg;
|
||||
import com.nis.domain.configuration.AppComplexFeatureCfg;
|
||||
import com.nis.domain.configuration.AppDomainCfg;
|
||||
import com.nis.domain.configuration.AppFeatureIndex;
|
||||
import com.nis.domain.configuration.AppFeatureProperties;
|
||||
import com.nis.domain.configuration.AppHeaderCfg;
|
||||
import com.nis.domain.configuration.AppHttpCfg;
|
||||
import com.nis.domain.configuration.AppIpCfg;
|
||||
import com.nis.domain.configuration.AppPolicyCfg;
|
||||
import com.nis.domain.configuration.AppSslCertCfg;
|
||||
import com.nis.domain.configuration.AppStringFeatureCfg;
|
||||
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.PxyObjTrustedCaCert;
|
||||
import com.nis.domain.configuration.WebsiteDomainTopic;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.maat.ToMaatResult.ResponseData;
|
||||
import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.exceptions.CallExternalProceduresException;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.FileUtils;
|
||||
import com.nis.util.JsonMapper;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.controller.BaseController;
|
||||
import com.nis.web.security.UserUtils;
|
||||
@@ -82,27 +110,15 @@ public class AppFeatureCfgController extends BaseController {
|
||||
appMultiFeatureCfgService.getAppIpRangeCfg(entity.getCompileId(), entity.getFunctionId()));
|
||||
entity.setStrList(appMultiFeatureCfgService.getAppStringFeatureCfg(entity.getCompileId(),
|
||||
entity.getFunctionId(), null));
|
||||
entity.setComplexList(appMultiFeatureCfgService.getAppComplexFeatureCfgNotRegionCode(entity.getCompileId(),
|
||||
entity.getFunctionId(), 6));
|
||||
entity.setSessionList(appMultiFeatureCfgService.getAppComplexFeatureCfg(entity.getCompileId(),
|
||||
entity.getFunctionId(), 6));
|
||||
entity.setComplexList(appMultiFeatureCfgService.getAppComplexFeatureCfg(entity.getCompileId(),
|
||||
entity.getFunctionId(), null));
|
||||
entity.setNumCfgList(
|
||||
appMultiFeatureCfgService.getAppTcpCfg(entity.getCompileId(), entity.getFunctionId(), null));
|
||||
entity.setAppFeaturePropCfgList(appMultiFeatureCfgService.getAppFeaturePropCfg(entity.getCompileId(), entity.getFunctionId(), null));
|
||||
initUpdateFormCondition(model, entity);
|
||||
} else {
|
||||
initFormCondition(model, entity);
|
||||
}
|
||||
// 获取L7 Protocol
|
||||
SpecificServiceCfg specificServiceCfg = new SpecificServiceCfg();
|
||||
specificServiceCfg.setCfgType(3);
|
||||
List<SpecificServiceCfg> l7ProtoList = specificServiceCfgService.findAllSpecificServiceCfg(specificServiceCfg, null);
|
||||
|
||||
model.addAttribute("_cfg", entity);
|
||||
model.addAttribute("l7ProtoList", l7ProtoList);
|
||||
if(entity.getFunctionId() == 567) { // APP关联特征配置
|
||||
return "/cfg/app/appCorrelationFeatureCfgForm";
|
||||
}
|
||||
return "/cfg/app/appMultiFeatureCfgForm";
|
||||
}
|
||||
|
||||
@@ -253,26 +269,8 @@ public class AppFeatureCfgController extends BaseController {
|
||||
Integer.valueOf(cfgRegionCode[i]));
|
||||
map.put("numCfgList", numCfgList);
|
||||
}
|
||||
if ("8".equals(cfgRegionType[i])) {
|
||||
List<AppComplexFeatureCfg> sessionList = appMultiFeatureCfgService
|
||||
.getAppComplexFeatureCfg(compileId, functionId, Integer.valueOf(cfgRegionCode[i]));
|
||||
map.put("sessionList", sessionList);
|
||||
}
|
||||
if ("9".equals(cfgRegionType[i])) {
|
||||
List<AppFeatureProperties> featureList = appMultiFeatureCfgService
|
||||
.getAppFeaturePropCfg(compileId, functionId, null);
|
||||
map.put("featureList", featureList);
|
||||
}
|
||||
|
||||
tabList.add(map);
|
||||
}
|
||||
// 获取L7 Protocol
|
||||
SpecificServiceCfg specificServiceCfg = new SpecificServiceCfg();
|
||||
specificServiceCfg.setCfgType(3);
|
||||
List<SpecificServiceCfg> l7ProtoList = specificServiceCfgService.findAllSpecificServiceCfg(specificServiceCfg, null);
|
||||
|
||||
model.addAttribute("l7ProtoList", l7ProtoList);
|
||||
|
||||
} else {
|
||||
Map<String, Object> map = new HashMap();
|
||||
map.put("regionType", "0");
|
||||
|
||||
@@ -132,8 +132,8 @@ public class UserManageController extends BaseController{
|
||||
exUser=exUser.substring(0, exUser.length()-1);
|
||||
message+="<br/> "+msgProp.getProperty("user")+" "+exUser+" "+msgProp.getProperty("user_check");
|
||||
}
|
||||
if(!StringUtil.isEmpty(e.getMessage())) {
|
||||
addMessage(redirectAttributes,"error",e.getMessage());
|
||||
if(e instanceof MaatConvertException) {
|
||||
addMessage(redirectAttributes,"error",message);
|
||||
}else {
|
||||
addMessage(redirectAttributes,"error",message);
|
||||
}
|
||||
@@ -274,18 +274,10 @@ public class UserManageController extends BaseController{
|
||||
|
||||
}
|
||||
} catch (MaatConvertException e) {
|
||||
if(!StringUtil.isEmpty(e.getMessage())) {
|
||||
addMessage(redirectAttributes,"error",e.getMessage());
|
||||
}else{
|
||||
addMessage(redirectAttributes,"error",message);
|
||||
}
|
||||
addMessage(redirectAttributes,"error",message);
|
||||
return "redirect:" + adminPath +"/maintenance/userManage/list";
|
||||
} catch (Exception e) {
|
||||
if(!StringUtil.isEmpty(e.getMessage())) {
|
||||
addMessage(redirectAttributes,"error",e.getMessage());
|
||||
}else{
|
||||
addMessage(redirectAttributes,"error",message);
|
||||
}
|
||||
addMessage(redirectAttributes,"error",message);
|
||||
return "redirect:" + adminPath +"/maintenance/userManage/list";
|
||||
}
|
||||
return "redirect:" + adminPath +"/maintenance/userManage/list";
|
||||
|
||||
@@ -404,11 +404,11 @@ public class WebsiteController extends BaseController {
|
||||
if (StringUtils.isNotBlank(ids)) {
|
||||
entity = websiteCfgService.getDnsCfg(Long.parseLong(ids), null);
|
||||
entity.setGroupType(12);
|
||||
//entity.setUdFlag(1);
|
||||
entity.setUdFlag(1);
|
||||
initUpdateFormCondition(model, entity);
|
||||
} else {
|
||||
entity.setGroupType(12);
|
||||
//entity.setUdFlag(1);
|
||||
entity.setUdFlag(1);
|
||||
initFormCondition(model, entity);
|
||||
}
|
||||
// 获取所有响应策略信息
|
||||
@@ -457,7 +457,7 @@ public class WebsiteController extends BaseController {
|
||||
}
|
||||
}
|
||||
}
|
||||
List<PolicyGroupInfo> policyGroupInfos = policyGroupInfoService.findPolicyGroupInfosByTypeforUD(12, null);
|
||||
List<PolicyGroupInfo> policyGroupInfos = policyGroupInfoService.findPolicyGroupInfosByTypeforUD(12, 1);
|
||||
model.addAttribute("policyGroupInfos", policyGroupInfos);// 显示分组名称 12:dns 1:有效
|
||||
model.addAttribute("_cfg", cfg);
|
||||
model.addAttribute("index", index);
|
||||
|
||||
@@ -203,7 +203,7 @@ public class WhiteListController extends CommonController {
|
||||
entity.getHttpUrlList().add(urlCfg);
|
||||
}
|
||||
entity.setGroupType(11);
|
||||
//entity.setUdFlag(1);
|
||||
entity.setUdFlag(1);
|
||||
initUpdateFormCondition(model, entity);
|
||||
} else {
|
||||
HttpUrlCfg urlCfg = new HttpUrlCfg();
|
||||
@@ -213,7 +213,7 @@ public class WhiteListController extends CommonController {
|
||||
urlList.add(urlCfg);
|
||||
entity.setHttpUrlList(urlList);
|
||||
entity.setGroupType(11);
|
||||
//entity.setUdFlag(1);
|
||||
entity.setUdFlag(1);
|
||||
initFormCondition(model, entity);
|
||||
}
|
||||
model.addAttribute("_cfg", entity);
|
||||
@@ -249,7 +249,7 @@ public class WhiteListController extends CommonController {
|
||||
}
|
||||
}
|
||||
}
|
||||
List<PolicyGroupInfo> policyGroupInfos = policyGroupInfoService.findPolicyGroupInfosByTypeforUD(11, null);
|
||||
List<PolicyGroupInfo> policyGroupInfos = policyGroupInfoService.findPolicyGroupInfosByTypeforUD(11, 1);
|
||||
model.addAttribute("policyGroupInfos", policyGroupInfos);// 显示分组名称 11:url 1:有效
|
||||
model.addAttribute("_cfg", cfg);
|
||||
model.addAttribute("index", index);
|
||||
|
||||
@@ -121,7 +121,7 @@ public class UserController extends BaseController{
|
||||
for (AuthenticationInfo auth : cache.values()) {
|
||||
userRealm.getAuthenticationCache().remove(auth.getPrincipals().getPrimaryPrincipal());
|
||||
}
|
||||
systemService.deleteAuthenticationCache(keyPrefix + user.getLoginId());
|
||||
systemService.deleteAuthenticationCache(keyPrefix + user.getName());
|
||||
systemService.deleteAuthenticationCache(keyPrefix + user.getId());
|
||||
}
|
||||
}
|
||||
@@ -331,7 +331,7 @@ public class UserController extends BaseController{
|
||||
for (AuthenticationInfo auth : cache.values()) {
|
||||
userRealm.getAuthenticationCache().remove(auth.getPrincipals().getPrimaryPrincipal());
|
||||
}
|
||||
systemService.deleteAuthenticationCache(keyPrefix + user.getLoginId());
|
||||
systemService.deleteAuthenticationCache(keyPrefix + user.getName());
|
||||
systemService.deleteAuthenticationCache(keyPrefix + user.getId());
|
||||
}
|
||||
|
||||
|
||||
@@ -27,4 +27,6 @@ public interface PolicyGroupInfoDao extends CrudDao<PolicyGroupInfo> {
|
||||
|
||||
List<PolicyGroupInfo> findPolicyByGroupInfoList(@Param("ids")String ids);
|
||||
List<PolicyGroupInfo> findPolicyGroupInfosByTypeForUD(@Param("groupType")Integer groupType,@Param("flag")Integer flag);
|
||||
List<PolicyGroupInfo> getInfoByServiceGroupId(@Param("serviceGroupId")Long serviceGroupId);
|
||||
int updateUdFlag(PolicyGroupInfo policyGroupInfo);
|
||||
}
|
||||
@@ -178,7 +178,30 @@
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
<update id="updateUdFlag" parameterType="com.nis.domain.basics.PolicyGroupInfo" >
|
||||
update policy_group_info
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="udFlag != null " >
|
||||
ud_flag = #{udFlag,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null and editTime != ''" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
<if test="groupId != null" >
|
||||
and group_id = #{groupId,jdbcType=INTEGER}
|
||||
</if>
|
||||
<if test="serviceGroupId != null" >
|
||||
and service_group_id = #{serviceGroupId,jdbcType=INTEGER}
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
<select id="getById" resultType="com.nis.domain.basics.PolicyGroupInfo">
|
||||
select <include refid="PolicyGroupInfoColumns"/>
|
||||
from policy_group_info r
|
||||
@@ -204,7 +227,11 @@
|
||||
</if>
|
||||
</trim>
|
||||
</select>
|
||||
|
||||
<select id="getInfoByServiceGroupId" resultType="com.nis.domain.basics.PolicyGroupInfo">
|
||||
select <include refid="PolicyGroupInfoColumns"/>,ud_flag
|
||||
from policy_group_info r
|
||||
where r.service_group_id =#{serviceGroupId}
|
||||
</select>
|
||||
<select id="getHasAreaPolicyGroups" resultType="com.nis.domain.basics.PolicyGroupInfo">
|
||||
SELECT
|
||||
<include refid="PolicyGroupInfoColumns"/>
|
||||
@@ -272,7 +299,7 @@
|
||||
<include refid="PolicyGroupInfoColumns"/>
|
||||
FROM policy_group_info r
|
||||
where r.is_valid=1 and r.group_type=#{groupType,jdbcType=INTEGER}
|
||||
<if test="flag!=null and flag != ''">
|
||||
<if test="flag!=null">
|
||||
and ud_flag=#{flag}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
@@ -1,16 +1,34 @@
|
||||
package com.nis.web.dao.configuration;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.AppByteCfg;
|
||||
import com.nis.domain.configuration.AppComplexFeatureCfg;
|
||||
import com.nis.domain.configuration.AppComplexKeywordCfg;
|
||||
import com.nis.domain.configuration.AppDomainCfg;
|
||||
import com.nis.domain.configuration.AppFeatureIndex;
|
||||
import com.nis.domain.configuration.AppFeatureProperties;
|
||||
import com.nis.domain.configuration.AppHeaderCfg;
|
||||
import com.nis.domain.configuration.AppHttpCfg;
|
||||
import com.nis.domain.configuration.AppIdCfg;
|
||||
import com.nis.domain.configuration.AppIdCfg.AppFeaturesIndex;
|
||||
import com.nis.domain.configuration.AppInnerRuleCfg;
|
||||
import com.nis.domain.configuration.AppIpCfg;
|
||||
import com.nis.domain.configuration.AppPolicyCfg;
|
||||
import com.nis.domain.configuration.AppSslCertCfg;
|
||||
import com.nis.domain.configuration.AppStringCfg;
|
||||
import com.nis.domain.configuration.AppStringFeatureCfg;
|
||||
import com.nis.domain.configuration.AppTcpCfg;
|
||||
import com.nis.domain.configuration.AppTopicDomainCfg;
|
||||
import com.nis.domain.configuration.BaseCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.WebsiteDomainTopic;
|
||||
import com.nis.web.dao.CrudDao;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
|
||||
@@ -41,8 +59,6 @@ public interface AppMultiFeatureCfgDao {
|
||||
//数值类特征配置
|
||||
public List<AppTcpCfg> getAppTcpCfg(@Param("compileId")Integer compileId,
|
||||
@Param("functionId")Integer functionId,@Param("cfgRegionCode")Integer cfgRegionCode);
|
||||
public List<AppComplexFeatureCfg> getAppComplexFeatureCfgNotRegionCode(@Param("compileId")Integer compileId,
|
||||
@Param("functionId")Integer functionId,@Param("cfgRegionCode")Integer cfgRegionCode);
|
||||
public int insertAppTcpCfg(AppTcpCfg entity);
|
||||
public void deleteAppTcpCfg(BaseCfg entity);
|
||||
|
||||
@@ -55,11 +71,4 @@ public interface AppMultiFeatureCfgDao {
|
||||
public void deleteAppIpRangeCfg(BaseCfg entity);
|
||||
|
||||
public List<AppFeatureIndex> findAppByFeatureIndexList(@Param("ids")String ids);
|
||||
//App特征属性配置
|
||||
public List<AppFeatureProperties> getAppFeaturePropCfg(@Param("compileId")Integer compileId,
|
||||
@Param("functionId")Integer functionId,@Param("cfgRegionCode")Integer cfgRegionCode);
|
||||
|
||||
public int insertAppFeaturePropCfg(AppFeatureProperties entity);
|
||||
public void deleteAppFeaturePropCfg(BaseCfg entity);
|
||||
|
||||
}
|
||||
|
||||
@@ -118,12 +118,6 @@
|
||||
<result column="payload_offset" property="payloadOffset" jdbcType="INTEGER" />
|
||||
<result column="payload_size" property="payloadSize" jdbcType="INTEGER" />
|
||||
<result column="payload_packet_direction" property="payloadPacketDirection" jdbcType="VARCHAR" />
|
||||
<result column="user_region1" property="userRegion1" jdbcType="VARCHAR" />
|
||||
<result column="user_region2" property="userRegion2" jdbcType="VARCHAR" />
|
||||
<result column="user_region3" property="userRegion3" jdbcType="VARCHAR" />
|
||||
<result column="user_region4" property="userRegion4" jdbcType="VARCHAR" />
|
||||
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
|
||||
|
||||
</resultMap>
|
||||
<!-- APP字符串类配置映射 -->
|
||||
<resultMap id="AppStringFeatureCfgMap" type="com.nis.domain.configuration.AppStringFeatureCfg" >
|
||||
@@ -187,36 +181,6 @@
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<!-- APP 特征属性配置映射 -->
|
||||
<resultMap id="AppFeaturePropCfgMap" type="com.nis.domain.configuration.AppFeatureProperties" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="drop_opt" property="dropOpt" jdbcType="INTEGER" />
|
||||
<result column="loop_opt" property="loopOpt" jdbcType="INTEGER" />
|
||||
<result column="weak_feature" property="weakFeature" jdbcType="VARCHAR" />
|
||||
<result column="whitelist_feature" property="whitelistFeature" jdbcType="VARCHAR" />
|
||||
<result column="extend_scan_pkt_num" property="extendScanPktNum" jdbcType="INTEGER" />
|
||||
<result column="correlation_valid_time" property="correlationValidTime" jdbcType="INTEGER" />
|
||||
<result column="correlation_block_after" property="correlationBlockAfter" jdbcType="VARCHAR" />
|
||||
<result column="long_stream_lock_time" property="longStreamLockTime" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<sql id="AppFeaturePropCfg_Column" >
|
||||
r.CFG_ID, r.compile_id,r.function_id,r.service_id,r.request_id,r.is_valid,
|
||||
r.is_audit,r.creator_id,r.create_time,r.editor_id,r.edit_time,r.auditor_id,r.audit_time,
|
||||
r.drop_opt,r.loop_opt,r.weak_feature,r.whitelist_feature,
|
||||
r.extend_scan_pkt_num,r.correlation_valid_time,r.correlation_block_after,r.long_stream_lock_time
|
||||
</sql>
|
||||
|
||||
<sql id="AppFeatureIndex_Column" >
|
||||
r.CFG_ID,r.CFG_DESC,r.ACTION,r.IS_VALID,r.IS_AUDIT,
|
||||
@@ -242,7 +206,6 @@
|
||||
r.SERVICE_ID,r.REQUEST_ID,r.COMPILE_ID,r.IS_AREA_EFFECTIVE,r.CLASSIFY,
|
||||
r.ATTRIBUTE,r.LABLE,r.AREA_EFFECTIVE_IDS,r.FUNCTION_ID,r.CFG_TYPE,r.CFG_REGION_CODE,
|
||||
r.DISTRICT,r.CFG_KEYWORDS,r.EXPR_TYPE,r.MATCH_METHOD,r.IS_HEXBIN,r.DO_LOG,
|
||||
r.USER_REGION1,r.USER_REGION2,r.USER_REGION3,r.USER_REGION4,r.USER_REGION5,
|
||||
r.ver,r.ihl,r.tos,r.total_length,r.flags,r.fragment_offset,r.protocol,r.icmp_type,r.icmp_code,r.icmp_identifier,
|
||||
r.header_type,r.payload_offset,r.payload_size,r.payload_packet_direction
|
||||
</sql>
|
||||
@@ -548,16 +511,6 @@
|
||||
AND r.cfg_region_code = #{cfgRegionCode,jdbcType=BIGINT}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getAppComplexFeatureCfgNotRegionCode" resultMap="AppComplexFeatureCfgMap">
|
||||
SELECT
|
||||
<include refid="AppComplexFeatureCfg_Column" />
|
||||
FROM app_complex_feature_cfg r
|
||||
WHERE r.compile_id=#{compileId} and r.function_id=#{functionId}
|
||||
<if test="cfgRegionCode !=null ">
|
||||
AND r.cfg_region_code != #{cfgRegionCode,jdbcType=BIGINT}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<!-- 新增app_ip_range子配置 -->
|
||||
<insert id="insertAppIpRangeCfg" parameterType="com.nis.domain.configuration.AppIpCfg" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
@@ -700,39 +653,5 @@
|
||||
where r.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
<insert id="insertAppFeaturePropCfg" parameterType="com.nis.domain.configuration.AppFeatureProperties" >
|
||||
<selectKey resultType="java.lang.Long" order="AFTER" keyProperty="cfgId">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into app_feature_prop_cfg(
|
||||
compile_id,function_id,service_id,request_id,is_valid,
|
||||
is_audit,creator_id,create_time,editor_id,edit_time,auditor_id,
|
||||
audit_time,drop_opt,loop_opt,weak_feature,whitelist_feature,
|
||||
extend_scan_pkt_num,correlation_valid_time,correlation_block_after,long_stream_lock_time
|
||||
)values (
|
||||
#{compileId,jdbcType=INTEGER},#{functionId,jdbcType=INTEGER},#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},#{isValid,jdbcType=INTEGER},#{isAudit,jdbcType=INTEGER},
|
||||
#{creatorId,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},#{auditorId,jdbcType=INTEGER},#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{dropOpt,jdbcType=INTEGER},#{loopOpt,jdbcType=INTEGER},
|
||||
#{weakFeature,jdbcType=VARCHAR},#{whitelistFeature,jdbcType=VARCHAR},#{extendScanPktNum,jdbcType=INTEGER},
|
||||
#{correlationValidTime,jdbcType=INTEGER},#{correlationBlockAfter,jdbcType=VARCHAR},
|
||||
#{longStreamLockTime,jdbcType=INTEGER}
|
||||
)
|
||||
</insert>
|
||||
<!-- 删除App 特征属性子配置 -->
|
||||
<delete id="deleteAppFeaturePropCfg" >
|
||||
delete from app_feature_prop_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
<!-- 查询特征属性配置列表 -->
|
||||
<select id="getAppFeaturePropCfg" resultMap="AppFeaturePropCfgMap">
|
||||
SELECT
|
||||
<include refid="AppFeaturePropCfg_Column" />
|
||||
FROM app_feature_prop_cfg r
|
||||
WHERE r.compile_id=#{compileId} and r.function_id=#{functionId}
|
||||
<if test="cfgRegionCode !=null ">
|
||||
AND r.cfg_region_code = #{cfgRegionCode,jdbcType=BIGINT}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -23,5 +23,6 @@ public interface DnsKeywordCfgDao extends CrudDao<DnsKeywordCfg>{
|
||||
public void saveDnsKeywordsCfg(ComplexkeywordCfg entity);
|
||||
public List<DnsKeywordCfg> findPage(DnsKeywordCfg entity);
|
||||
public List<DnsKeywordCfg> getByIds(@Param("ids")String ids);
|
||||
public int hasValidDnsKeyword(@Param("groupId")Long groupId);
|
||||
public void delete(@Param("ids")String ids);
|
||||
}
|
||||
|
||||
@@ -1,340 +1,371 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.configuration.DnsKeywordCfgDao" >
|
||||
|
||||
<resultMap id="CfgIndexInfoMap" type="com.nis.domain.configuration.CfgIndexInfo" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="dns_strategy_id" property="dnsStrategyId" jdbcType="INTEGER" />
|
||||
<result column="dns_strategy_name" property="dnsStrategyName" jdbcType="VARCHAR" />
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
<result column="user_region1" property="userRegion1" jdbcType="VARCHAR" />
|
||||
<result column="user_region2" property="userRegion2" jdbcType="VARCHAR" />
|
||||
<result column="user_region3" property="userRegion3" jdbcType="VARCHAR" />
|
||||
<result column="user_region4" property="userRegion4" jdbcType="VARCHAR" />
|
||||
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
|
||||
<result column="source_compile_id" property="sourceCompileId" jdbcType="INTEGER" />
|
||||
<result column="cancel_request_id" property="cancelRequestId" jdbcType="INTEGER" />
|
||||
<result column="do_blacklist" property="doBlackList" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<resultMap id="stringCfgMap" type="com.nis.domain.configuration.BaseStringCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
|
||||
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="dnsKeywordCfgMap" type="com.nis.domain.configuration.DnsKeywordCfg" >
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
|
||||
<result column="district" property="district" jdbcType="VARCHAR" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective" jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
|
||||
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds" jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode" jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<sql id="configIndexColumn" >
|
||||
a.CFG_ID,a.CFG_DESC,a.ACTION,a.IS_VALID,a.IS_AUDIT,
|
||||
a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME,
|
||||
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
|
||||
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.dns_strategy_id,a.user_region1,
|
||||
a.user_region2,a.user_region3,a.user_region4,a.user_region5,a.do_log,a.source_compile_id,a.cancel_request_id,
|
||||
a.do_blacklist
|
||||
</sql>
|
||||
<sql id="ipCfgColumn" >
|
||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
||||
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
||||
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
||||
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
||||
a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable
|
||||
,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||
</sql>
|
||||
<sql id="strCfgColumn" >
|
||||
a.cfg_id,a.cfg_desc,a.cfg_keywords,a.cfg_type,
|
||||
a.action,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id,a.edit_time, a.auditor_id,
|
||||
a.audit_time,a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
||||
a.expr_type,a.match_method,a.is_hexbin,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||
</sql>
|
||||
<sql id="complexCfgColumn" >
|
||||
a.cfg_id,a.cfg_desc,a.cfg_keywords,a.cfg_type,a.district,a.user_region1,
|
||||
a.action,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id,a.edit_time, a.auditor_id,
|
||||
a.audit_time,a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
||||
a.expr_type,a.match_method,a.is_hexbin,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||
</sql>
|
||||
|
||||
<!-- dns域名查询 -->
|
||||
<select id="findPage" resultMap="dnsKeywordCfgMap" parameterType="com.nis.domain.configuration.DnsKeywordCfg">
|
||||
SELECT
|
||||
<include refid="complexCfgColumn" />
|
||||
,s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
FROM dns_domain_cfg a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on a.editor_id=e.id
|
||||
<mapper namespace="com.nis.web.dao.configuration.DnsKeywordCfgDao">
|
||||
|
||||
<resultMap id="CfgIndexInfoMap" type="com.nis.domain.configuration.CfgIndexInfo">
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective"
|
||||
jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds"
|
||||
jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="dns_strategy_id" property="dnsStrategyId"
|
||||
jdbcType="INTEGER" />
|
||||
<result column="dns_strategy_name" property="dnsStrategyName"
|
||||
jdbcType="VARCHAR" />
|
||||
<result column="do_log" property="doLog" jdbcType="INTEGER" />
|
||||
<result column="user_region1" property="userRegion1" jdbcType="VARCHAR" />
|
||||
<result column="user_region2" property="userRegion2" jdbcType="VARCHAR" />
|
||||
<result column="user_region3" property="userRegion3" jdbcType="VARCHAR" />
|
||||
<result column="user_region4" property="userRegion4" jdbcType="VARCHAR" />
|
||||
<result column="user_region5" property="userRegion5" jdbcType="VARCHAR" />
|
||||
<result column="source_compile_id" property="sourceCompileId"
|
||||
jdbcType="INTEGER" />
|
||||
<result column="cancel_request_id" property="cancelRequestId"
|
||||
jdbcType="INTEGER" />
|
||||
<result column="do_blacklist" property="doBlackList" jdbcType="INTEGER" />
|
||||
</resultMap>
|
||||
<resultMap id="stringCfgMap" type="com.nis.domain.configuration.BaseStringCfg">
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective"
|
||||
jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
|
||||
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds"
|
||||
jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode"
|
||||
jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<resultMap id="dnsKeywordCfgMap" type="com.nis.domain.configuration.DnsKeywordCfg">
|
||||
<id column="cfg_id" property="cfgId" jdbcType="BIGINT" />
|
||||
<result column="cfg_desc" property="cfgDesc" jdbcType="VARCHAR" />
|
||||
<result column="cfg_keywords" property="cfgKeywords" jdbcType="VARCHAR" />
|
||||
<result column="district" property="district" jdbcType="VARCHAR" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
<result column="action" property="action" jdbcType="INTEGER" />
|
||||
<result column="is_valid" property="isValid" jdbcType="INTEGER" />
|
||||
<result column="is_audit" property="isAudit" jdbcType="INTEGER" />
|
||||
<result column="creator_id" property="creatorId" jdbcType="INTEGER" />
|
||||
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
|
||||
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
|
||||
<result column="edit_time" property="editTime" jdbcType="TIMESTAMP" />
|
||||
<result column="auditor_id" property="auditorId" jdbcType="INTEGER" />
|
||||
<result column="audit_time" property="auditTime" jdbcType="TIMESTAMP" />
|
||||
<result column="service_id" property="serviceId" jdbcType="INTEGER" />
|
||||
<result column="request_id" property="requestId" jdbcType="INTEGER" />
|
||||
<result column="compile_id" property="compileId" jdbcType="INTEGER" />
|
||||
<result column="is_area_effective" property="isAreaEffective"
|
||||
jdbcType="INTEGER" />
|
||||
<result column="classify" property="classify" jdbcType="VARCHAR" />
|
||||
<result column="attribute" property="attribute" jdbcType="VARCHAR" />
|
||||
<result column="lable" property="lable" jdbcType="VARCHAR" />
|
||||
<result column="expr_type " property="exprType" jdbcType="INTEGER" />
|
||||
<result column="match_method" property="matchMethod" jdbcType="INTEGER" />
|
||||
<result column="is_hexbin" property="isHexbin" jdbcType="INTEGER" />
|
||||
<result column="area_effective_ids" property="areaEffectiveIds"
|
||||
jdbcType="VARCHAR" />
|
||||
<result column="function_id" property="functionId" jdbcType="INTEGER" />
|
||||
<result column="cfg_region_code" property="cfgRegionCode"
|
||||
jdbcType="INTEGER" />
|
||||
<result column="cfg_type" property="cfgType" jdbcType="VARCHAR" />
|
||||
</resultMap>
|
||||
<sql id="configIndexColumn">
|
||||
a.CFG_ID,a.CFG_DESC,a.ACTION,a.IS_VALID,a.IS_AUDIT,
|
||||
a.CREATOR_ID,a.CREATE_TIME,a.EDITOR_ID,a.EDIT_TIME,a.AUDITOR_ID,a.AUDIT_TIME,
|
||||
a.SERVICE_ID,a.REQUEST_ID,a.COMPILE_ID,a.IS_AREA_EFFECTIVE,a.CLASSIFY,
|
||||
a.ATTRIBUTE,a.LABLE,a.AREA_EFFECTIVE_IDS,a.function_id,a.dns_strategy_id,a.user_region1,
|
||||
a.user_region2,a.user_region3,a.user_region4,a.user_region5,a.do_log,a.source_compile_id,a.cancel_request_id,
|
||||
a.do_blacklist
|
||||
</sql>
|
||||
<sql id="ipCfgColumn">
|
||||
a.cfg_id,a.cfg_desc,a.ip_type,a.src_ip_address,a.ip_pattern,a.port_pattern,a.src_port
|
||||
,a.protocol,a.protocol_id,a.direction,a.cfg_type,a.action,a.dest_port,a.dest_ip_address
|
||||
,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id
|
||||
,a.edit_time,a.auditor_id,a.audit_time,a.service_id,a.request_id,
|
||||
a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable
|
||||
,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||
</sql>
|
||||
<sql id="strCfgColumn">
|
||||
a.cfg_id,a.cfg_desc,a.cfg_keywords,a.cfg_type,
|
||||
a.action,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id,a.edit_time,
|
||||
a.auditor_id,
|
||||
a.audit_time,a.service_id,a.request_id,a.compile_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
||||
a.expr_type,a.match_method,a.is_hexbin,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||
</sql>
|
||||
<sql id="complexCfgColumn">
|
||||
a.cfg_id,a.cfg_desc,a.cfg_keywords,a.cfg_type,a.district,a.user_region1,
|
||||
a.action,a.is_valid,a.is_audit,a.creator_id,a.create_time,a.editor_id,a.edit_time,
|
||||
a.auditor_id,
|
||||
a.audit_time,a.service_id,a.request_id,a.compile_id,a.region_id,a.is_area_effective,a.classify,a.attribute,a.lable,
|
||||
a.expr_type,a.match_method,a.is_hexbin,a.area_effective_ids,a.function_id,a.cfg_region_code
|
||||
</sql>
|
||||
|
||||
<!-- dns域名查询 -->
|
||||
<select id="findPage" resultMap="dnsKeywordCfgMap"
|
||||
parameterType="com.nis.domain.configuration.DnsKeywordCfg">
|
||||
SELECT
|
||||
<include refid="complexCfgColumn" />
|
||||
,s.name as creator_name,e.name as editor_name,u.name as auditor_name
|
||||
FROM dns_domain_cfg a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on
|
||||
a.editor_id=e.id
|
||||
left join sys_user u on a.auditor_id=u.id
|
||||
where service_id=-2 and function_id=#{functionId}
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
and a.cfg_type =#{cfgType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</select>
|
||||
<select id="get" resultMap="dnsKeywordCfgMap">
|
||||
select
|
||||
<include refid="complexCfgColumn"></include>
|
||||
from dns_domain_cfg a
|
||||
where a.cfg_id=#{cfgId}
|
||||
</select>
|
||||
<select id="getByIds" resultMap="dnsKeywordCfgMap">
|
||||
select
|
||||
<include refid="complexCfgColumn"></include>
|
||||
from dns_domain_cfg a
|
||||
where a.cfg_id in (${ids}) and is_valid !=-1
|
||||
</select>
|
||||
<update id="updateCfgValid" parameterType="com.nis.domain.configuration.BaseCfg">
|
||||
update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER},
|
||||
editor_id = #{editorId,jdbcType=INTEGER} ,
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP}
|
||||
<if test="isAudit !=null ">
|
||||
,is_audit = #{isAudit,jdbcType=BIGINT}
|
||||
</if>
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="cfgId !=null ">
|
||||
AND cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
where service_id=-2 and function_id=#{functionId}
|
||||
<if test="cfgType != null and cfgType != ''">
|
||||
and a.cfg_type =#{cfgType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="compileId !=null ">
|
||||
AND compile_id = #{compileId,jdbcType=INTEGER}
|
||||
</select>
|
||||
<select id="get" resultMap="dnsKeywordCfgMap">
|
||||
select
|
||||
<include refid="complexCfgColumn"></include>
|
||||
from dns_domain_cfg a
|
||||
where a.cfg_id=#{cfgId}
|
||||
</select>
|
||||
<select id="getByIds" resultMap="dnsKeywordCfgMap">
|
||||
select
|
||||
<include refid="complexCfgColumn"></include>
|
||||
from dns_domain_cfg a
|
||||
where a.cfg_id in (${ids}) and a.is_valid !=-1
|
||||
</select>
|
||||
<!-- 查询审核通过的域配置数量 -->
|
||||
<select id="hasValidDnsKeyword" resultType="java.lang.Integer">
|
||||
select count(1) from
|
||||
dns_domain_cfg where is_valid=1 and is_audit=1 and
|
||||
user_region1=#{groupId}
|
||||
</select>
|
||||
<!-- 查询引用dns组的maat配置数量 -->
|
||||
<select id="hasDnsMaatPz" resultType="java.lang.Integer">
|
||||
select count(1) from
|
||||
dns_domain_cfg where is_valid=1 and is_audit=1 and
|
||||
user_region1=#{groupId}
|
||||
</select>
|
||||
<update id="updateCfgValid" parameterType="com.nis.domain.configuration.BaseCfg">
|
||||
update ${tableName} set is_valid = #{isValid,jdbcType=INTEGER},
|
||||
editor_id = #{editorId,jdbcType=INTEGER} ,
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP}
|
||||
<if test="isAudit !=null ">
|
||||
,is_audit = #{isAudit,jdbcType=BIGINT}
|
||||
</if>
|
||||
and function_id=#{functionId,jdbcType=INTEGER}
|
||||
</trim>
|
||||
</update>
|
||||
<update id="auditCfg" parameterType="com.nis.domain.configuration.BaseCfg">
|
||||
update ${tableName} set is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
audit_time = #{auditTime,jdbcType=TIMESTAMP}
|
||||
<if test="isValid != null" >
|
||||
,is_valid = #{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="cfgId !=null ">
|
||||
AND cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
AND cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="compileId !=null ">
|
||||
AND compile_id = #{compileId,jdbcType=INTEGER}
|
||||
AND compile_id = #{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
and function_id=#{functionId,jdbcType=INTEGER}
|
||||
</trim>
|
||||
|
||||
</update>
|
||||
<!-- insert dns_domain_cfg表信息 -->
|
||||
<insert id="saveDnsKeywordsCfg" parameterType="com.nis.domain.configuration.DnsKeywordCfg" >
|
||||
insert into dns_domain_cfg (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
COMPILE_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
district,
|
||||
cfg_keywords,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
expr_type,
|
||||
match_method,
|
||||
is_hexbin,
|
||||
user_region1
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{district,jdbcType=VARCHAR},
|
||||
#{cfgKeywords,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{exprType,jdbcType=INTEGER},
|
||||
#{matchMethod,jdbcType=INTEGER},
|
||||
#{isHexbin,jdbcType=INTEGER},
|
||||
#{userRegion1,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<!-- 删除dns公共组域名配置 -->
|
||||
<delete id="deleteDnsDomainCfg">
|
||||
delete from dns_domain_cfg where compile_id=#{compileId} and function_id=#{functionId}
|
||||
</delete>
|
||||
<delete id="delete" parameterType="java.lang.String" >
|
||||
delete from dns_domain_cfg where cfg_id in (${ids})
|
||||
</delete>
|
||||
<update id="update" parameterType="com.nis.domain.configuration.DnsKeywordCfg" >
|
||||
update dns_domain_cfg
|
||||
<set >
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null and cfgDesc != ''" >
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="action != null" >
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null" >
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null" >
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editorId != null" >
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null and editTime != ''" >
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditorId != null" >
|
||||
AUDITOR_ID = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime != ''" >
|
||||
AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="serviceId != null" >
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="requestId != null" >
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null" >
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null and classify != ''" >
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''" >
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null and lable != ''" >
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null" >
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null" >
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="district != null" >
|
||||
district = #{district,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgKeywords != null and cfgKeywords != ''" >
|
||||
cfg_keywords = #{cfgKeywords,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgType != null" >
|
||||
cfg_type = #{cfgType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cfgRegionCode != null" >
|
||||
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="exprType != null and exprType != ''" >
|
||||
expr_type = #{exprType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="matchMethod != null" >
|
||||
match_method = #{matchMethod,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isHexbin != null" >
|
||||
is_hexbin = #{isHexbin,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="userRegion1 != null and userRegion1 != ''" >
|
||||
user_region1 = #{userRegion1,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="compileId != null and compileId != ''" >
|
||||
compile_id = #{compileId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
and cfg_id = #{cfgId,jdbcType=INTEGER}
|
||||
</where>
|
||||
</update>
|
||||
|
||||
</trim>
|
||||
</update>
|
||||
<update id="auditCfg" parameterType="com.nis.domain.configuration.BaseCfg">
|
||||
update ${tableName} set is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
auditor_id = #{auditorId,jdbcType=INTEGER},
|
||||
audit_time = #{auditTime,jdbcType=TIMESTAMP}
|
||||
<if test="isValid != null">
|
||||
,is_valid = #{isValid,jdbcType=INTEGER}
|
||||
</if>
|
||||
<trim prefix="WHERE" prefixOverrides="AND |OR ">
|
||||
<if test="cfgId !=null ">
|
||||
AND cfg_id = #{cfgId,jdbcType=BIGINT}
|
||||
</if>
|
||||
<if test="compileId !=null ">
|
||||
AND compile_id = #{compileId,jdbcType=INTEGER}
|
||||
</if>
|
||||
and function_id=#{functionId,jdbcType=INTEGER}
|
||||
</trim>
|
||||
|
||||
</update>
|
||||
<!-- insert dns_domain_cfg表信息 -->
|
||||
<insert id="saveDnsKeywordsCfg" parameterType="com.nis.domain.configuration.DnsKeywordCfg">
|
||||
insert into dns_domain_cfg (
|
||||
CFG_DESC,
|
||||
ACTION,
|
||||
IS_VALID,
|
||||
IS_AUDIT,
|
||||
CREATOR_ID,
|
||||
CREATE_TIME,
|
||||
EDITOR_ID,
|
||||
EDIT_TIME,
|
||||
AUDITOR_ID,
|
||||
AUDIT_TIME,
|
||||
SERVICE_ID,
|
||||
REQUEST_ID,
|
||||
COMPILE_ID,
|
||||
REGION_ID,
|
||||
IS_AREA_EFFECTIVE,
|
||||
CLASSIFY,
|
||||
ATTRIBUTE,
|
||||
LABLE,
|
||||
AREA_EFFECTIVE_IDS,
|
||||
function_id,
|
||||
district,
|
||||
cfg_keywords,
|
||||
cfg_type,
|
||||
cfg_region_code,
|
||||
expr_type,
|
||||
match_method,
|
||||
is_hexbin,
|
||||
user_region1
|
||||
)values (
|
||||
#{cfgDesc,jdbcType=VARCHAR},
|
||||
#{action,jdbcType=INTEGER},
|
||||
0,
|
||||
0,
|
||||
#{creatorId,jdbcType=INTEGER},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{editorId,jdbcType=INTEGER},
|
||||
#{editTime,jdbcType=TIMESTAMP},
|
||||
#{auditorId,jdbcType=INTEGER},
|
||||
#{auditTime,jdbcType=TIMESTAMP},
|
||||
#{serviceId,jdbcType=INTEGER},
|
||||
#{requestId,jdbcType=INTEGER},
|
||||
#{compileId,jdbcType=INTEGER},
|
||||
#{regionId,jdbcType=INTEGER},
|
||||
#{isAreaEffective,jdbcType=INTEGER},
|
||||
#{classify,jdbcType=VARCHAR},
|
||||
#{attribute,jdbcType=VARCHAR},
|
||||
#{lable,jdbcType=VARCHAR},
|
||||
#{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
#{functionId,jdbcType=INTEGER},
|
||||
#{district,jdbcType=VARCHAR},
|
||||
#{cfgKeywords,jdbcType=VARCHAR},
|
||||
#{cfgType,jdbcType=VARCHAR},
|
||||
#{cfgRegionCode,jdbcType=INTEGER},
|
||||
#{exprType,jdbcType=INTEGER},
|
||||
#{matchMethod,jdbcType=INTEGER},
|
||||
#{isHexbin,jdbcType=INTEGER},
|
||||
#{userRegion1,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
<!-- 删除dns公共组域名配置 -->
|
||||
<delete id="deleteDnsDomainCfg">
|
||||
delete from dns_domain_cfg where compile_id=#{compileId} and
|
||||
function_id=#{functionId}
|
||||
</delete>
|
||||
<delete id="delete" parameterType="java.lang.String">
|
||||
delete from dns_domain_cfg where cfg_id in (${ids})
|
||||
</delete>
|
||||
<update id="update" parameterType="com.nis.domain.configuration.DnsKeywordCfg">
|
||||
update dns_domain_cfg
|
||||
<set>
|
||||
<trim suffixOverrides=",">
|
||||
<if test="cfgDesc != null and cfgDesc != ''">
|
||||
cfg_desc = #{cfgDesc,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="action != null">
|
||||
action = #{action,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isValid != null">
|
||||
is_valid = #{isValid,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAudit != null">
|
||||
is_audit = #{isAudit,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editorId != null">
|
||||
editor_id = #{editorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="editTime != null and editTime != ''">
|
||||
edit_time = #{editTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="auditorId != null">
|
||||
AUDITOR_ID = #{auditorId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="auditTime != null and auditTime != ''">
|
||||
AUDIT_TIME = #{auditTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="serviceId != null">
|
||||
service_id = #{serviceId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="requestId != null">
|
||||
request_id = #{requestId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isAreaEffective != null">
|
||||
is_area_effective = #{isAreaEffective,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="classify != null and classify != ''">
|
||||
classify = #{classify,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="attribute != null and attribute != ''">
|
||||
attribute = #{attribute,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="lable != null and lable != ''">
|
||||
lable = #{lable,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="areaEffectiveIds != null">
|
||||
area_effective_ids = #{areaEffectiveIds,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="functionId != null">
|
||||
function_id = #{functionId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="district != null">
|
||||
district = #{district,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgKeywords != null and cfgKeywords != ''">
|
||||
cfg_keywords = #{cfgKeywords,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="cfgType != null">
|
||||
cfg_type = #{cfgType,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="cfgRegionCode != null">
|
||||
cfg_region_code = #{cfgRegionCode,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="exprType != null and exprType != ''">
|
||||
expr_type = #{exprType,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="matchMethod != null">
|
||||
match_method = #{matchMethod,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isHexbin != null">
|
||||
is_hexbin = #{isHexbin,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="userRegion1 != null and userRegion1 != ''">
|
||||
user_region1 = #{userRegion1,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="compileId != null and compileId != ''">
|
||||
compile_id = #{compileId,jdbcType=INTEGER},
|
||||
</if>
|
||||
</trim>
|
||||
</set>
|
||||
<where>
|
||||
and cfg_id = #{cfgId,jdbcType=INTEGER}
|
||||
</where>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -775,7 +775,7 @@
|
||||
sys_user u on r.auditor_id = u.id
|
||||
left join
|
||||
request_info ri on r.request_id = ri.id
|
||||
where r.CFG_ID in (${ids})
|
||||
where a.CFG_ID in (${ids})
|
||||
</select>
|
||||
|
||||
<select id="findPageByDnat" resultMap="dnatPolicyMap">
|
||||
|
||||
@@ -167,6 +167,6 @@
|
||||
FROM user_manage a
|
||||
left join sys_user s on a.creator_id=s.id
|
||||
left join sys_user e on a.editor_id=e.id
|
||||
where a.id in (${ids})
|
||||
where a.CFG_ID in (${ids})
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -14,6 +14,9 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javax.ws.rs.client.Entity;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
import org.apache.ibatis.session.ExecutorType;
|
||||
import org.apache.ibatis.session.SqlSession;
|
||||
@@ -66,6 +69,7 @@ import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.DdosIpCfg;
|
||||
import com.nis.domain.configuration.DnsIpCfg;
|
||||
import com.nis.domain.configuration.DnsKeywordCfg;
|
||||
import com.nis.domain.configuration.DnsResStrategy;
|
||||
import com.nis.domain.configuration.FileDigestCfg;
|
||||
import com.nis.domain.configuration.IpReusePolicyCfg;
|
||||
@@ -2954,6 +2958,63 @@ public abstract class BaseService {
|
||||
logger.warn("asnIPRegionSendToMaat finish,cost:"+(end-start));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @Description: 公共组域配置 下发 修改 删除
|
||||
* @author(zdx)
|
||||
* @date 2019年2月19日 上午11:37:37
|
||||
* @param regionList
|
||||
* @param action
|
||||
*/
|
||||
public void commonGroupRegionSendToMaat(List<?> regionList,Integer action) {
|
||||
logger.warn("commonGroupRegionSendToMaat start");
|
||||
long start=System.currentTimeMillis();
|
||||
GroupReuseAddBean maatBean = new GroupReuseAddBean();
|
||||
List<GroupReuseCfg> groupReuseList=new ArrayList<>();
|
||||
GroupReuseCfg groupReuseCfg=new GroupReuseCfg();
|
||||
List<IpCfg> ipRegionList = new ArrayList<>();
|
||||
List<StringCfg> strRegionList = new ArrayList<>();
|
||||
List<NumBoundaryCfg> numRegionList = new ArrayList<>();
|
||||
if (!StringUtil.isEmpty(regionList)&®ionList.get(0) instanceof BaseIpCfg) {
|
||||
ipRegionList = (List<IpCfg>) regionList;
|
||||
}
|
||||
if (!StringUtil.isEmpty(regionList)&®ionList.get(0) instanceof StringCfg) {
|
||||
strRegionList = (List<StringCfg>) regionList;
|
||||
}
|
||||
if (!StringUtil.isEmpty(regionList)&®ionList.get(0) instanceof NumBoundaryCfg) {
|
||||
numRegionList = (List<NumBoundaryCfg>) regionList;
|
||||
}
|
||||
groupReuseCfg.setIpRegionList(ipRegionList);
|
||||
groupReuseCfg.setStrRegionList(strRegionList);
|
||||
groupReuseCfg.setNumRegionList(numRegionList);
|
||||
groupReuseList.add(groupReuseCfg);
|
||||
maatBean.setGroupReuseCfgList(groupReuseList);
|
||||
maatBean.setAuditTime(new Date());
|
||||
maatBean.setCreatorName(UserUtils.getUser().getName());
|
||||
maatBean.setVersion(Constants.MAAT_VERSION);
|
||||
//公共组域删除接口的访问方式为PUT,所以在配置取消时 应该把opAction设置为2;
|
||||
maatBean.setOpAction(Constants.OPACTION_DELETE==Integer.valueOf(action)?Constants.OPACTION_PUT:action);
|
||||
//调用服务接口下发配置数据
|
||||
String json=gsonToJson(maatBean);
|
||||
String optionStr = "添加";
|
||||
if(action.equals(Constants.OPACTION_PUT)){
|
||||
optionStr = "修改";
|
||||
}
|
||||
if(action.equals(Constants.OPACTION_DELETE)){
|
||||
optionStr = "删除";
|
||||
}
|
||||
if(regionList.size()<=100) {
|
||||
logger.info("公共组域配置 "+optionStr+"操作,参数:"+json);
|
||||
}else {
|
||||
logger.info("公共组域配置"+optionStr+"操作数据条数:"+regionList.size());
|
||||
}
|
||||
//调用服务接口下发配置
|
||||
ToMaatResult result =ConfigServiceUtil.auditCommonGroupRegionSources(json,action);
|
||||
//logger.info("asn ip复用域 "+action+" 配置响应信息:"+result.getMsg());
|
||||
logger.info("公共组域配置 "+optionStr+"操作,响应信息:");
|
||||
long end=System.currentTimeMillis();
|
||||
logger.warn("commonGroupRegionSendToMaat finish,cost:"+(end-start));
|
||||
}
|
||||
/**
|
||||
* ASN关键字配置处理
|
||||
* @param asnList
|
||||
|
||||
@@ -5,8 +5,6 @@ import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.session.ExecutorType;
|
||||
@@ -17,28 +15,16 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.beust.jcommander.internal.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.AsnGroupInfo;
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.domain.basics.PolicyGroupInfo;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.DnsKeywordCfg;
|
||||
import com.nis.domain.maat.GroupReuseAddBean;
|
||||
import com.nis.domain.maat.GroupReuseCfg;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.MaatCfg.DigestCfg;
|
||||
import com.nis.domain.maat.MaatCfg.GroupCfg;
|
||||
import com.nis.domain.maat.MaatCfg.IpCfg;
|
||||
import com.nis.domain.maat.MaatCfg.NumBoundaryCfg;
|
||||
import com.nis.domain.maat.MaatCfg.StringCfg;
|
||||
import com.nis.domain.maat.ToMaatBean;
|
||||
import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.domain.specific.ConfigGroupInfo;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.StringUtil;
|
||||
@@ -77,7 +63,7 @@ public class DnsKeywordCfgService extends CrudService<CrudDao<DnsKeywordCfg>, Dn
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"r"));
|
||||
entity.setPage(page);
|
||||
List<DnsKeywordCfg> list=dnsKeywordCfgDao.findPage(entity);
|
||||
List<PolicyGroupInfo> policyGroupInfos = policyGroupInfoDao.findPolicyGroupInfosByTypeForUD(12,1);
|
||||
List<PolicyGroupInfo> policyGroupInfos = policyGroupInfoDao.findPolicyGroupInfosByTypeForUD(12,null);
|
||||
Map<String, String> policyGroupMap = new HashMap<String, String>();
|
||||
for (PolicyGroupInfo policyGroupInfo : policyGroupInfos) {
|
||||
if (!StringUtil.isEmpty(policyGroupInfo.getServiceGroupId())) {
|
||||
@@ -159,12 +145,15 @@ public class DnsKeywordCfgService extends CrudService<CrudDao<DnsKeywordCfg>, Dn
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
if (!StringUtil.isEmpty(entity.getDomainList())) {
|
||||
for(ComplexkeywordCfg cfg:entity.getDomainList()){
|
||||
List<Integer> regionIdList = ConfigServiceUtil.getId(3, entity.getDomainList().size());
|
||||
for (int i = 0; i < entity.getDomainList().size(); i++) {
|
||||
ComplexkeywordCfg cfg = entity.getDomainList().get(i);
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode"});
|
||||
if(StringUtils.isNoneBlank(cfg.getDistrictShowName()) && cfg.getDistrict().equals("others")){
|
||||
cfg.setDistrict(cfg.getDistrictShowName());
|
||||
}
|
||||
cfg.setRegionId(regionIdList.get(i));
|
||||
dnsKeywordCfgDao.saveDnsKeywordsCfg(cfg);
|
||||
}
|
||||
}
|
||||
@@ -197,6 +186,74 @@ public class DnsKeywordCfgService extends CrudService<CrudDao<DnsKeywordCfg>, Dn
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @Description:Dns 关键字公共组配置审核功能
|
||||
* @author(zdx)
|
||||
* @date 2019年2月21日 下午6:44:11
|
||||
* @param infoList
|
||||
* @param serviceGroupId
|
||||
* @param isValid
|
||||
*/
|
||||
@Transactional(readOnly=false,rollbackFor=RuntimeException.class)
|
||||
public void auditDnsKeywordBatch(List<DnsKeywordCfg> infoList,Long serviceGroupId,Integer isAudit,Integer isValid) {
|
||||
SqlSessionFactory sqlSessionFactory=SpringContextHolder.getBean(SqlSessionFactory.class);
|
||||
final SqlSession batchSqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH, false);
|
||||
try{
|
||||
if(!StringUtil.isEmpty(infoList)){
|
||||
List regionList = new ArrayList();
|
||||
for(int index = 0; index < infoList.size();index++){
|
||||
DnsKeywordCfg t = infoList.get(index);
|
||||
BaseStringCfg baseStrCfg=new BaseStringCfg();
|
||||
StringCfg strCfg = new StringCfg();
|
||||
BeanUtils.copyProperties(t, baseStrCfg);
|
||||
BeanUtils.copyProperties(t, strCfg);
|
||||
strCfg.setGroupId(Integer.valueOf(t.getUserRegion1()));
|
||||
baseStrCfg.setTableName(DnsKeywordCfg.getTablename());
|
||||
regionList.add(strCfg);
|
||||
((StringCfgDao) batchSqlSession.getMapper(StringCfgDao.class)).audit(baseStrCfg);
|
||||
}
|
||||
batchSqlSession.commit();
|
||||
if (isAudit!=Constants.AUDIT_NO) {//审核未通过 跳过
|
||||
PolicyGroupInfo dnsGroupInfo = null;
|
||||
List<PolicyGroupInfo> dnsGroupInfoList=policyGroupInfoDao.getInfoByServiceGroupId(serviceGroupId);
|
||||
if (!StringUtil.isEmpty(dnsGroupInfoList)) {
|
||||
dnsGroupInfo = dnsGroupInfoList.get(0);
|
||||
}
|
||||
List<IpCfg> ipRegionList = new ArrayList();
|
||||
List<StringCfg> strRegionList = new ArrayList();
|
||||
List<NumBoundaryCfg> numRegionList = new ArrayList();
|
||||
if(isValid==Constants.VALID_YES) {//审核通过
|
||||
if (Integer.valueOf(dnsGroupInfo.getUdFlag())==0) {
|
||||
dnsGroupInfo.setEditorId(UserUtils.getUser().getId());
|
||||
dnsGroupInfo.setEditTime(new Date());
|
||||
dnsGroupInfo.setUdFlag(1);
|
||||
policyGroupInfoDao.updateUdFlag(dnsGroupInfo);
|
||||
}
|
||||
commonGroupRegionSendToMaat(regionList,Constants.OPACTION_POST);
|
||||
}else if(isValid==Constants.VALID_NO) {//取消审核通过
|
||||
|
||||
//如果一个dns组下没有域了,需要把policy的udFlag设置为0(如果还有dns配置未取消提示需要先取消配置才能取消最后一个域)
|
||||
if(!hasValidDnsKeyword(serviceGroupId)) {
|
||||
//需要先判断是否有生效配置引用该组
|
||||
dnsGroupInfo.setEditorId(UserUtils.getUser().getId());
|
||||
dnsGroupInfo.setEditTime(new Date());
|
||||
dnsGroupInfo.setUdFlag(0);
|
||||
policyGroupInfoDao.updateUdFlag(dnsGroupInfo);
|
||||
}
|
||||
commonGroupRegionSendToMaat(regionList,Constants.OPACTION_DELETE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}finally {
|
||||
if(batchSqlSession != null){
|
||||
batchSqlSession.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
public boolean hasValidDnsKeyword(Long maatGroupId) {
|
||||
return dnsKeywordCfgDao.hasValidDnsKeyword(maatGroupId)>0;
|
||||
}
|
||||
public List<DnsKeywordCfg> getByIds(String ids) {
|
||||
if(ids==null) {
|
||||
throw new RuntimeException("ids is null!");
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -13,11 +14,12 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.AsnIpCfg;
|
||||
import com.nis.domain.basics.Varibles;
|
||||
import com.nis.domain.configuration.AppByteCfg;
|
||||
import com.nis.domain.configuration.AppDomainCfg;
|
||||
import com.nis.domain.configuration.AppFeatureIndex;
|
||||
import com.nis.domain.configuration.AppFeatureProperties;
|
||||
import com.nis.domain.configuration.AppHeaderCfg;
|
||||
import com.nis.domain.configuration.AppHttpCfg;
|
||||
import com.nis.domain.configuration.AppIpCfg;
|
||||
@@ -26,7 +28,9 @@ import com.nis.domain.configuration.AppSslCertCfg;
|
||||
import com.nis.domain.configuration.AppTcpCfg;
|
||||
import com.nis.domain.configuration.AppTopicDomainCfg;
|
||||
import com.nis.domain.configuration.AreaIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.BaseStringCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
@@ -46,11 +50,11 @@ import com.nis.domain.specific.SpecificServiceCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.util.StringUtils;
|
||||
import com.nis.web.dao.basics.AsnIpCfgDao;
|
||||
import com.nis.web.dao.configuration.AppCfgDao;
|
||||
import com.nis.web.dao.configuration.AppMultiFeatureCfgDao;
|
||||
import com.nis.web.dao.configuration.AreaIpCfgDao;
|
||||
import com.nis.web.dao.configuration.IpCfgDao;
|
||||
import com.nis.web.dao.configuration.StringCfgDao;
|
||||
@@ -82,73 +86,6 @@ public class AppCfgService extends BaseService {
|
||||
protected ConfigGroupInfoDao configGroupInfoDao;
|
||||
@Autowired
|
||||
protected AsnIpCfgDao asnIpCfgDao;
|
||||
@Autowired
|
||||
protected AppMultiFeatureCfgDao appMultiFeatureCfgDao;
|
||||
|
||||
@Transactional(readOnly = false, rollbackFor = RuntimeException.class)
|
||||
public void saveOrUpdateAppFeaturePropCfg(AppFeatureIndex entity) throws Exception {
|
||||
if (entity.getCfgId() == null) {
|
||||
Integer compileId = 0;
|
||||
try {
|
||||
List<Integer> idList = ConfigServiceUtil.getId(1, 1);
|
||||
if (idList != null && idList.size() > 0) {
|
||||
compileId = idList.get(0);
|
||||
}
|
||||
entity.setCompileId(compileId);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
appMultiFeatureCfgDao.insertAppFeatureIndex(entity);
|
||||
if(entity.getIpPortList()!=null){
|
||||
for(AppIpCfg cfg:entity.getIpPortList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
appMultiFeatureCfgDao.insertAppIpRangeCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(!StringUtil.isEmpty(entity.getAppFeaturePropCfgList())){
|
||||
for(AppFeatureProperties cfg:entity.getAppFeaturePropCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg);
|
||||
appMultiFeatureCfgDao.insertAppFeaturePropCfg(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
throw new MaatConvertException(e.getMessage());
|
||||
}
|
||||
} else {
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
appMultiFeatureCfgDao.updateAppFeatureIndex(entity);
|
||||
appMultiFeatureCfgDao.deleteAppIpRangeCfg(entity);
|
||||
appMultiFeatureCfgDao.deleteAppFeaturePropCfg(entity);
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
if(entity.getIpPortList()!=null){
|
||||
for(AppIpCfg cfg:entity.getIpPortList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
appMultiFeatureCfgDao.insertAppIpRangeCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(entity.getIpPortList()!=null){
|
||||
for(AppIpCfg cfg:entity.getIpPortList()){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
appMultiFeatureCfgDao.insertAppIpRangeCfg(cfg);
|
||||
}
|
||||
}
|
||||
if(!StringUtil.isEmpty(entity.getAppFeaturePropCfgList())){
|
||||
for(AppFeatureProperties cfg:entity.getAppFeaturePropCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg);
|
||||
appMultiFeatureCfgDao.insertAppFeaturePropCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Page<AppPolicyCfg> findAppPolicyList(Page<AppPolicyCfg> page, AppPolicyCfg entity) {
|
||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(), "r"));
|
||||
@@ -493,19 +430,11 @@ public class AppCfgService extends BaseService {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
// 保存 控管参数和特征属性组件信息
|
||||
if(entity.getAppFeaturePropCfgList()!=null){
|
||||
for(AppFeatureProperties cfg:entity.getAppFeaturePropCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg);
|
||||
appMultiFeatureCfgDao.insertAppFeaturePropCfg(cfg);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
entity.setEditorId(entity.getCurrentUser().getId());
|
||||
entity.setEditTime(new Date());
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
appMultiFeatureCfgDao.deleteAppFeaturePropCfg(entity);
|
||||
appCfgDao.updateAppIpCfg(entity);
|
||||
// 删除旧的区域IP,新增新的区域IP
|
||||
AreaIpCfg area = new AreaIpCfg();
|
||||
@@ -525,13 +454,6 @@ public class AppCfgService extends BaseService {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
// 更新 控管参数和特征属性组件信息
|
||||
if(entity.getAppFeaturePropCfgList()!=null){
|
||||
for(AppFeatureProperties cfg:entity.getAppFeaturePropCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg);
|
||||
appMultiFeatureCfgDao.insertAppFeaturePropCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void saveAppHttpCfg(List<ComplexkeywordCfg> cfgs) {
|
||||
@@ -635,13 +557,6 @@ public class AppCfgService extends BaseService {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
// 保存 控管参数和特征属性组件信息
|
||||
if(entity.getAppFeaturePropCfgList()!=null){
|
||||
for(AppFeatureProperties cfg:entity.getAppFeaturePropCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg);
|
||||
appMultiFeatureCfgDao.insertAppFeaturePropCfg(cfg);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
logger.info("获取编译ID出错");
|
||||
@@ -652,7 +567,6 @@ public class AppCfgService extends BaseService {
|
||||
entity.setEditTime(new Date());
|
||||
entity.setIsValid(0);
|
||||
entity.setIsAudit(0);
|
||||
appMultiFeatureCfgDao.deleteAppFeaturePropCfg(entity);
|
||||
appCfgDao.updateAppDomainCfg(entity);
|
||||
// 删除旧的区域IP,新增新的区域IP
|
||||
AreaIpCfg area = new AreaIpCfg();
|
||||
@@ -669,13 +583,6 @@ public class AppCfgService extends BaseService {
|
||||
areaIpCfgDao.saveAreaIpCfg(cfg);
|
||||
}
|
||||
}
|
||||
// 更新 控管参数和特征属性组件信息
|
||||
if(entity.getAppFeaturePropCfgList()!=null){
|
||||
for(AppFeatureProperties cfg:entity.getAppFeaturePropCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg);
|
||||
appMultiFeatureCfgDao.insertAppFeaturePropCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1298,43 +1205,6 @@ public class AppCfgService extends BaseService {
|
||||
specificServiceCfg.setOpTime(new Date());
|
||||
specificServiceCfgDao.update(specificServiceCfg);
|
||||
}
|
||||
|
||||
List<AppFeatureProperties> appFeaturePropCfgList = appMultiFeatureCfgDao.getAppFeaturePropCfg(entitys.get(0).getCompileId(), entitys.get(0).getFunctionId(), null);
|
||||
String featureUserRegion = "";
|
||||
if(!StringUtil.isEmpty(appFeaturePropCfgList)){
|
||||
AppFeatureProperties cfg = appFeaturePropCfgList.get(0);
|
||||
// 处理下发userRegion
|
||||
if(!StringUtil.isEmpty(cfg.getDropOpt())){
|
||||
featureUserRegion += "DKC=10;DKS="+cfg.getDropOpt()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getLoopOpt())){
|
||||
featureUserRegion += "DKC=4;DKS="+cfg.getLoopOpt()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getExtendScanPktNum())){
|
||||
featureUserRegion += "DKC=7;DKS="+cfg.getExtendScanPktNum()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getLongStreamLockTime())){
|
||||
featureUserRegion += "DKC=16;DKS="+cfg.getLongStreamLockTime()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getCorrelationValidTime())){
|
||||
featureUserRegion += "DKC=3;DKS="+cfg.getCorrelationValidTime()+";";
|
||||
}
|
||||
|
||||
if(!StringUtil.isEmpty(cfg.getWeakFeature())){
|
||||
featureUserRegion += cfg.getWeakFeature();
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getWhitelistFeature())){
|
||||
featureUserRegion += cfg.getWhitelistFeature();
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getCorrelationBlockAfter())){
|
||||
featureUserRegion += cfg.getCorrelationBlockAfter();
|
||||
}
|
||||
AppFeatureProperties appFeatureProp = new AppFeatureProperties();
|
||||
BeanUtils.copyProperties(entitys.get(0), appFeatureProp, new String[] { "cfgId" });
|
||||
appFeatureProp.setTableName(AppFeatureProperties.getTablename());
|
||||
appCfgDao.auditCfg(appFeatureProp);
|
||||
}
|
||||
|
||||
Integer groupId=configGroupInfo.getGroupId();
|
||||
// 构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if (isAudit == 1) {
|
||||
@@ -1363,9 +1233,7 @@ public class AppCfgService extends BaseService {
|
||||
maatCfg.setIsValid(entitys.get(0).getIsValid());
|
||||
// 设置APP自定义域
|
||||
String userRegion = "APP_ID=" + entitys.get(0).getAppCode()/*+Constants.USER_REGION_SPLIT+"ASEV_ID="+businessType*/;
|
||||
if(!StringUtil.isEmpty(featureUserRegion)){
|
||||
maatCfg.setUserRegion(userRegion + ";" +featureUserRegion);
|
||||
}
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entitys.get(0).getAuditTime());
|
||||
@@ -1573,42 +1441,6 @@ public class AppCfgService extends BaseService {
|
||||
areaIpRegionList = map.get("dstList");
|
||||
}
|
||||
}
|
||||
List<AppFeatureProperties> appFeaturePropCfgList = appMultiFeatureCfgDao.getAppFeaturePropCfg(entity.getCompileId(), entity.getFunctionId(), null);
|
||||
String featureUserRegion = "";
|
||||
if(!StringUtil.isEmpty(appFeaturePropCfgList)){
|
||||
AppFeatureProperties cfg = appFeaturePropCfgList.get(0);
|
||||
// 处理下发userRegion
|
||||
if(!StringUtil.isEmpty(cfg.getDropOpt())){
|
||||
featureUserRegion += "DKC=10;DKS="+cfg.getDropOpt()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getLoopOpt())){
|
||||
featureUserRegion += "DKC=4;DKS="+cfg.getLoopOpt()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getExtendScanPktNum())){
|
||||
featureUserRegion += "DKC=7;DKS="+cfg.getExtendScanPktNum()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getLongStreamLockTime())){
|
||||
featureUserRegion += "DKC=16;DKS="+cfg.getLongStreamLockTime()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getCorrelationValidTime())){
|
||||
featureUserRegion += "DKC=3;DKS="+cfg.getCorrelationValidTime()+";";
|
||||
}
|
||||
|
||||
if(!StringUtil.isEmpty(cfg.getWeakFeature())){
|
||||
featureUserRegion += cfg.getWeakFeature();
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getWhitelistFeature())){
|
||||
featureUserRegion += cfg.getWhitelistFeature();
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getCorrelationBlockAfter())){
|
||||
featureUserRegion += cfg.getCorrelationBlockAfter();
|
||||
}
|
||||
AppFeatureProperties appFeatureProp = new AppFeatureProperties();
|
||||
BeanUtils.copyProperties(entity, appFeatureProp, new String[] { "cfgId" });
|
||||
appFeatureProp.setTableName(AppFeatureProperties.getTablename());
|
||||
appCfgDao.auditCfg(appFeatureProp);
|
||||
}
|
||||
|
||||
// 构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if (isAudit == 1) {
|
||||
maatCfg.initDefaultValue();
|
||||
@@ -1630,9 +1462,8 @@ public class AppCfgService extends BaseService {
|
||||
if(!StringUtil.isEmpty(entity.getUserRegion5())){
|
||||
userRegion+=";"+Constants.INTERCEPT_DOMAN_INTENSITY_USER_REGION_KEY+"="+entity.getUserRegion5();
|
||||
}
|
||||
if(!StringUtil.isEmpty(featureUserRegion)) {
|
||||
maatCfg.setUserRegion(userRegion + ";" +featureUserRegion);
|
||||
}
|
||||
|
||||
maatCfg.setUserRegion(userRegion);
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
@@ -1981,13 +1812,6 @@ public class AppCfgService extends BaseService {
|
||||
cfg.setTableName(AreaIpCfg.getTablename());
|
||||
appCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
//修改特征属性配置表状态
|
||||
if (!StringUtil.isEmpty(entity.getAppFeaturePropCfgList())) {
|
||||
AppFeatureProperties cfg = new AppFeatureProperties();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[] { "cfgId" });
|
||||
cfg.setTableName(AppFeatureProperties.getTablename());
|
||||
appMultiFeatureCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2057,13 +1881,6 @@ public class AppCfgService extends BaseService {
|
||||
cfg.setTableName(AreaIpCfg.getTablename());
|
||||
appCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
//修改特征属性配置表状态
|
||||
if (!StringUtil.isEmpty(entity.getAppFeaturePropCfgList())) {
|
||||
AppFeatureProperties cfg = new AppFeatureProperties();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[] { "cfgId" });
|
||||
cfg.setTableName(AppFeatureProperties.getTablename());
|
||||
appMultiFeatureCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -17,10 +17,17 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.configuration.AppComplexFeatureCfg;
|
||||
import com.nis.domain.configuration.AppFeatureIndex;
|
||||
import com.nis.domain.configuration.AppFeatureProperties;
|
||||
import com.nis.domain.configuration.AppHttpCfg;
|
||||
import com.nis.domain.configuration.AppIpCfg;
|
||||
import com.nis.domain.configuration.AppStringFeatureCfg;
|
||||
import com.nis.domain.configuration.AppTcpCfg;
|
||||
import com.nis.domain.configuration.CfgIndexInfo;
|
||||
import com.nis.domain.configuration.ComplexkeywordCfg;
|
||||
import com.nis.domain.configuration.HttpUrlCfg;
|
||||
import com.nis.domain.configuration.IpPortCfg;
|
||||
import com.nis.domain.configuration.NtcSubscribeIdCfg;
|
||||
import com.nis.domain.configuration.P2pHashCfg;
|
||||
import com.nis.domain.configuration.P2pKeywordCfg;
|
||||
import com.nis.domain.maat.MaatCfg;
|
||||
import com.nis.domain.maat.MaatCfg.DigestCfg;
|
||||
import com.nis.domain.maat.MaatCfg.GroupCfg;
|
||||
@@ -32,6 +39,7 @@ import com.nis.domain.maat.ToMaatResult;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.util.StringUtil;
|
||||
import com.nis.web.dao.configuration.AppMultiFeatureCfgDao;
|
||||
import com.nis.web.security.UserUtils;
|
||||
@@ -143,31 +151,6 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
|
||||
}
|
||||
}
|
||||
// Session组件
|
||||
if(entity.getSessionList() != null) {
|
||||
for (AppComplexFeatureCfg cfg : entity.getSessionList()) {
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin","userRegion3","userRegion4","userRegion5"});
|
||||
/*cfg.setExprType(1);
|
||||
cfg.setMatchMethod(0);
|
||||
cfg.setIsHexbin(0);
|
||||
cfg.setIsCaseInsenstive(0);*/
|
||||
this.setSessionKeyword(cfg);
|
||||
if("c2sPayload".equals(cfg.getSessionC2sRadio())) {
|
||||
cfg.setIcmpCode(null);
|
||||
}else if("c2sFrequent".equals(cfg.getSessionC2sRadio())){
|
||||
cfg.setIcmpIdentifier(null);
|
||||
}
|
||||
|
||||
if("s2cPayload".equals(cfg.getSessionS2cRadio())) {
|
||||
cfg.setProtocol(null);
|
||||
}else if("s2cFrequent".equals(cfg.getSessionS2cRadio())){
|
||||
cfg.setIcmpType(null);
|
||||
}
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(entity.getNumCfgList()!=null){
|
||||
for(AppTcpCfg cfg:entity.getNumCfgList()){
|
||||
if(cfg.getLowBoundary()!=null && cfg.getUpBoundary()!=null){
|
||||
@@ -177,13 +160,6 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
|
||||
}
|
||||
}
|
||||
if(entity.getAppFeaturePropCfgList()!=null){
|
||||
for(AppFeatureProperties cfg:entity.getAppFeaturePropCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg);
|
||||
appMultiFeatureCfgDao.insertAppFeaturePropCfg(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
@@ -200,7 +176,6 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
appMultiFeatureCfgDao.deleteAppStringFeatureCfg(entity);
|
||||
appMultiFeatureCfgDao.deleteAppComplexFeatureCfg(entity);
|
||||
appMultiFeatureCfgDao.deleteAppTcpCfg(entity);//复用AppTcpCfg对象作为数值类对象
|
||||
appMultiFeatureCfgDao.deleteAppFeaturePropCfg(entity);//复用AppTcpCfg对象作为数值类对象
|
||||
entity.setCreateTime(new Date());
|
||||
entity.setCreatorId(entity.getCurrentUser().getId());
|
||||
if(entity.getIpPortList()!=null){
|
||||
@@ -260,31 +235,6 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
}
|
||||
}
|
||||
}
|
||||
// Session组件
|
||||
if(entity.getSessionList() != null) {
|
||||
for (AppComplexFeatureCfg cfg : entity.getSessionList()) {
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin","userRegion3","userRegion4","userRegion5"});
|
||||
/*cfg.setExprType(1);
|
||||
cfg.setMatchMethod(0);
|
||||
cfg.setIsHexbin(0);
|
||||
cfg.setIsCaseInsenstive(0);*/
|
||||
this.setSessionKeyword(cfg);
|
||||
if("c2sPayload".equals(cfg.getSessionC2sRadio())) {
|
||||
cfg.setIcmpCode(null);
|
||||
}else if("c2sFrequent".equals(cfg.getSessionC2sRadio())){
|
||||
cfg.setIcmpIdentifier(null);
|
||||
}
|
||||
|
||||
if("s2cPayload".equals(cfg.getSessionS2cRadio())) {
|
||||
cfg.setProtocol(null);
|
||||
}else if("s2cFrequent".equals(cfg.getSessionS2cRadio())){
|
||||
cfg.setIcmpType(null);
|
||||
}
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(entity.getNumCfgList()!=null){
|
||||
for(AppTcpCfg cfg:entity.getNumCfgList()){
|
||||
if(cfg.getLowBoundary()!=null && cfg.getUpBoundary()!=null){
|
||||
@@ -293,82 +243,9 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
}
|
||||
}
|
||||
}
|
||||
//特征属性配置
|
||||
if(entity.getAppFeaturePropCfgList()!=null){
|
||||
for(AppFeatureProperties cfg:entity.getAppFeaturePropCfgList()){
|
||||
BeanUtils.copyProperties(entity, cfg);
|
||||
appMultiFeatureCfgDao.insertAppFeaturePropCfg(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void setSessionKeyword(AppComplexFeatureCfg cfg) {
|
||||
// 处理与表达式字符串
|
||||
String keyword = "";
|
||||
if(!cfg.getFunctionId().equals(566)) {
|
||||
if(StringUtils.isNotBlank(cfg.getHeaderType())) { // 传输服务端端口
|
||||
keyword += "DPORT=" + cfg.getHeaderType() + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getVer())) { // 传输协议
|
||||
keyword += "TSP=" + cfg.getVer() + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getTos())) { // L7层协议
|
||||
if(cfg.getTos().equals("0")) {
|
||||
keyword += "PROTO_ID=0" + Constants.USER_REGION_SPLIT + "C2S_SEQ>=1" + Constants.USER_REGION_SPLIT + "S2C_SEQ>=1" + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}else {
|
||||
keyword += "PROTO_ID=" + cfg.getTos() + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
}
|
||||
/*if(StringUtils.isNotBlank(cfg.getIhl())) { // L7层协议未知
|
||||
keyword += "PROTO_ID=0" + Constants.USER_REGION_SPLIT + "C2S_SEQ>=1" + Constants.USER_REGION_SPLIT + "S2C_SEQ>=1" + Constants.KEYWORD_EXPR;
|
||||
}*/
|
||||
if(StringUtils.isNotBlank(cfg.getTotalLength())) { // 链接建立方式
|
||||
keyword += "CR=2" + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getFlags())) { // Tcp包发送特性
|
||||
keyword += "C2S_SEQ=C2S_P" + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getFragmentOffset())) { // 域名初筛标识
|
||||
keyword += "IPD_ID=" + cfg.getAppCode() + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getPayloadPacketDirection())) { // 清洗标识
|
||||
keyword += "CLI_APP_ID=" + cfg.getAppCode() + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
cfg.setUserRegion3(null);
|
||||
cfg.setUserRegion4(null);
|
||||
cfg.setUserRegion5(null);
|
||||
}else {
|
||||
if(StringUtils.isNotBlank(cfg.getUserRegion3())) {
|
||||
keyword += "SSL_RES" + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getUserRegion4())) {
|
||||
keyword += "SINGLE_CERT" + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getUserRegion5())) {
|
||||
keyword += "SELF_ISSUED" + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
cfg.setHeaderType(null);
|
||||
cfg.setVer(null);
|
||||
cfg.setTos(null);
|
||||
cfg.setIhl(null);
|
||||
cfg.setTotalLength(null);
|
||||
cfg.setFlags(null);
|
||||
cfg.setFragmentOffset(null);
|
||||
cfg.setProtocol(null);
|
||||
|
||||
}
|
||||
if(StringUtils.isNotBlank(keyword)) {
|
||||
keyword = keyword.substring(0,keyword.lastIndexOf(Constants.KEYWORD_EXPR));
|
||||
cfg.setCfgKeywords(keyword);
|
||||
}else {
|
||||
cfg.setCfgKeywords("session_default_keyword");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void setL3HeaderKeyword(AppComplexFeatureCfg cfg) {
|
||||
String keyword = "";
|
||||
if(cfg.getHeaderType().equals("L3_header_IP")){
|
||||
@@ -457,8 +334,7 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
//List<AppComplexFeatureCfg> complexList = appMultiFeatureCfgDao.getAppComplexFeatureCfg(entity.getCompileId(),entity.getFunctionId(),null);
|
||||
List<AppComplexFeatureCfg> complexList = appMultiFeatureCfgDao.getAppComplexFeatureCfgNotRegionCode(entity.getCompileId(),entity.getFunctionId(),6);
|
||||
List<AppComplexFeatureCfg> complexList = appMultiFeatureCfgDao.getAppComplexFeatureCfg(entity.getCompileId(),entity.getFunctionId(),null);
|
||||
if(complexList!=null && complexList.size()>0){
|
||||
AppComplexFeatureCfg cfg = new AppComplexFeatureCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
@@ -505,116 +381,6 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
|
||||
}
|
||||
}
|
||||
// session组件
|
||||
// TODO 确保查询出的appSessionList 只有session域配置信息
|
||||
List<AppComplexFeatureCfg> appSessionList = appMultiFeatureCfgDao.getAppComplexFeatureCfg(entity.getCompileId(), entity.getFunctionId(), 6);
|
||||
if(appSessionList != null && appSessionList.size() > 0) {
|
||||
AppComplexFeatureCfg featureCfg = new AppComplexFeatureCfg();
|
||||
BeanUtils.copyProperties(entity, featureCfg, new String[]{"cfgId"});
|
||||
featureCfg.setTableName(AppComplexFeatureCfg.getTablename());
|
||||
appMultiFeatureCfgDao.auditCfg(featureCfg);
|
||||
if(isAudit==1){
|
||||
List<AppTcpCfg> numCfgList = new ArrayList<AppTcpCfg>();
|
||||
List<AppComplexFeatureCfg> appSessionList2 = new ArrayList<AppComplexFeatureCfg>();
|
||||
for (AppComplexFeatureCfg cfg : appSessionList) {
|
||||
// 【1-8处理 】
|
||||
this.setSessionKeyword(cfg);
|
||||
cfg.setCfgType("APP_PAYLOAD");
|
||||
cfg.setDistrict("Attribute");
|
||||
|
||||
boolean flag = false;
|
||||
String keyword = "";
|
||||
// 非APP_SSL
|
||||
if(!cfg.getFunctionId().equals(566)) {
|
||||
AppComplexFeatureCfg cfg2 = new AppComplexFeatureCfg();
|
||||
BeanUtils.copyProperties(cfg, cfg2, new String[]{"cfgId"});
|
||||
|
||||
if(!StringUtil.isBlank(cfg2.getIcmpIdentifier())) { // C2S
|
||||
keyword += cfg2.getIcmpIdentifier().replace(";", ";"+Constants.KEYWORD_EXPR) + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
flag = true;
|
||||
}
|
||||
if(!StringUtil.isBlank(cfg2.getIcmpCode())) {
|
||||
keyword += cfg2.getIcmpCode().replace(";", ";"+Constants.KEYWORD_EXPR) + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
flag = true;
|
||||
}
|
||||
if(flag) {
|
||||
cfg2.setCfgType("APP_PAYLOAD");
|
||||
cfg2.setDistrict("C2S_session_size");
|
||||
cfg2.setCfgKeywords(keyword.substring(0,keyword.lastIndexOf(Constants.KEYWORD_EXPR)));
|
||||
appSessionList2.add(cfg2);
|
||||
}
|
||||
|
||||
AppComplexFeatureCfg cfg3 = new AppComplexFeatureCfg();
|
||||
BeanUtils.copyProperties(cfg, cfg3, new String[]{"cfgId"});
|
||||
flag = false;
|
||||
keyword = "";
|
||||
|
||||
if(!StringUtil.isBlank(cfg3.getIcmpType())) { // S2C
|
||||
keyword += cfg3.getIcmpType().replace(";", ";"+Constants.KEYWORD_EXPR) + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
flag = true;
|
||||
}
|
||||
if(!StringUtil.isBlank(cfg3.getProtocol())) {
|
||||
keyword += cfg3.getProtocol().replace(";", ";"+Constants.KEYWORD_EXPR) + Constants.USER_REGION_SPLIT + Constants.KEYWORD_EXPR;
|
||||
flag = true;
|
||||
}
|
||||
if(flag) {
|
||||
cfg3.setCfgType("APP_PAYLOAD");
|
||||
cfg3.setDistrict("S2C_session_size");
|
||||
cfg3.setCfgKeywords(keyword.substring(0,keyword.lastIndexOf(Constants.KEYWORD_EXPR)));
|
||||
appSessionList2.add(cfg3);
|
||||
}
|
||||
|
||||
// 数值域
|
||||
if(cfg.getPayloadOffset() != null && cfg.getPayloadSize() != null) {
|
||||
AppTcpCfg numCfg = new AppTcpCfg();
|
||||
numCfg.setCfgType("APP_PAYLOAD_SIZE");
|
||||
numCfg.setLowBoundary(cfg.getPayloadOffset());
|
||||
numCfg.setUpBoundary(cfg.getPayloadSize());
|
||||
numCfgList.add(numCfg);
|
||||
}
|
||||
|
||||
}else {
|
||||
if(!StringUtil.isBlank(cfg.getUserRegion3())) {
|
||||
keyword += "SSL_RES;" + Constants.KEYWORD_EXPR;
|
||||
flag = true;
|
||||
}
|
||||
if(!StringUtil.isBlank(cfg.getUserRegion4())) {
|
||||
keyword += "SINGLE_CERT;" + Constants.KEYWORD_EXPR;
|
||||
flag = true;
|
||||
}
|
||||
if(!StringUtil.isBlank(cfg.getUserRegion5())) {
|
||||
keyword += "SELF_ISSUED;" + Constants.KEYWORD_EXPR;
|
||||
flag = true;
|
||||
}
|
||||
if(flag) {
|
||||
keyword = keyword.substring(0,keyword.lastIndexOf(Constants.KEYWORD_EXPR));
|
||||
cfg.setCfgKeywords(keyword);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(appSessionList.get(0).getCfgKeywords().equals("session_default_keyword")) {
|
||||
appSessionList.remove(0);
|
||||
}
|
||||
if(appSessionList2.size() > 0) {
|
||||
appSessionList.addAll(appSessionList2);
|
||||
}
|
||||
|
||||
Map<String,List> map = cfgConvert(strRegionList,appSessionList,2,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
|
||||
if(numCfgList.size() > 0) {
|
||||
Map<String,List> map2 = cfgConvert(numRegionList,numCfgList,4,entity,groupRelationList);
|
||||
groupRelationList=map2.get("groupList");
|
||||
numRegionList=map2.get("dstList");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
List<AppTcpCfg> numCfgList = appMultiFeatureCfgDao.getAppTcpCfg(entity.getCompileId(),entity.getFunctionId(),null);
|
||||
if(numCfgList!=null && numCfgList.size()>0){
|
||||
AppTcpCfg cfg = new AppTcpCfg();
|
||||
@@ -627,42 +393,6 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
numRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
List<AppFeatureProperties> appFeaturePropCfgList = this.getAppFeaturePropCfg(entity.getCompileId(), entity.getFunctionId(), null);
|
||||
String featureUserRegion = "";
|
||||
if(!StringUtil.isEmpty(appFeaturePropCfgList)){
|
||||
AppFeatureProperties cfg = appFeaturePropCfgList.get(0);
|
||||
// 处理下发userRegion
|
||||
if(!StringUtil.isEmpty(cfg.getDropOpt())){
|
||||
featureUserRegion += "DKC=10;DKS="+cfg.getDropOpt()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getLoopOpt())){
|
||||
featureUserRegion += "DKC=4;DKS="+cfg.getLoopOpt()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getExtendScanPktNum())){
|
||||
featureUserRegion += "DKC=7;DKS="+cfg.getExtendScanPktNum()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getLongStreamLockTime())){
|
||||
featureUserRegion += "DKC=16;DKS="+cfg.getLongStreamLockTime()+";";
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getCorrelationValidTime())){
|
||||
featureUserRegion += "DKC=3;DKS="+cfg.getCorrelationValidTime()+";";
|
||||
}
|
||||
|
||||
if(!StringUtil.isEmpty(cfg.getWeakFeature())){
|
||||
featureUserRegion += cfg.getWeakFeature();
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getWhitelistFeature())){
|
||||
featureUserRegion += cfg.getWhitelistFeature();
|
||||
}
|
||||
if(!StringUtil.isEmpty(cfg.getCorrelationBlockAfter())){
|
||||
featureUserRegion += cfg.getCorrelationBlockAfter();
|
||||
}
|
||||
AppFeatureProperties appFeatureProp = new AppFeatureProperties();
|
||||
BeanUtils.copyProperties(entity, appFeatureProp, new String[] { "cfgId" });
|
||||
appFeatureProp.setTableName(AppFeatureProperties.getTablename());
|
||||
appMultiFeatureCfgDao.auditCfg(appFeatureProp);
|
||||
}
|
||||
|
||||
// 构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if (isAudit == 1) {
|
||||
maatCfg.initDefaultValue();
|
||||
@@ -685,10 +415,7 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
}else{
|
||||
maatCfg.setUserRegion(entity.getUserRegion1());
|
||||
}
|
||||
if(!StringUtil.isEmpty(featureUserRegion)){
|
||||
maatCfg.setUserRegion(maatCfg.getUserRegion() + ";" +featureUserRegion);
|
||||
}
|
||||
|
||||
|
||||
configCompileList.add(maatCfg);
|
||||
maatBean.setConfigCompileList(configCompileList);
|
||||
maatBean.setAuditTime(entity.getAuditTime());
|
||||
@@ -760,21 +487,9 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
cfg.setTableName(AppTcpCfg.getTablename());
|
||||
appMultiFeatureCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
//修改特征属性配置表状态
|
||||
if (!StringUtil.isEmpty(entity.getAppFeaturePropCfgList())) {
|
||||
AppFeatureProperties cfg = new AppFeatureProperties();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[] { "cfgId" });
|
||||
cfg.setTableName(AppFeatureProperties.getTablename());
|
||||
appMultiFeatureCfgDao.updateCfgValid(cfg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
//session
|
||||
public List<AppComplexFeatureCfg> getAppComplexFeatureCfgNotRegionCode(Integer compileId,Integer functionId,Integer cfgRegionCode){
|
||||
return appMultiFeatureCfgDao.getAppComplexFeatureCfgNotRegionCode(compileId,functionId,cfgRegionCode);
|
||||
}
|
||||
|
||||
//字符串类特征配置列表
|
||||
public List<AppStringFeatureCfg> getAppStringFeatureCfg(Integer compileId,Integer functionId,Integer cfgRegionCode){
|
||||
@@ -792,11 +507,7 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
public List<AppTcpCfg> getAppTcpCfg(Integer compileId,Integer functionId,Integer cfgRegionCode){
|
||||
return appMultiFeatureCfgDao.getAppTcpCfg(compileId,functionId,cfgRegionCode);
|
||||
}
|
||||
//特征属性配置列表
|
||||
public List<AppFeatureProperties> getAppFeaturePropCfg(Integer compileId,Integer functionId,Integer cfgRegionCode){
|
||||
return appMultiFeatureCfgDao.getAppFeaturePropCfg(compileId,functionId,cfgRegionCode);
|
||||
}
|
||||
|
||||
|
||||
public Map<String, List> exportFeature(AppFeatureIndex entity){
|
||||
Map<String, List> dataMap=new HashMap<String, List>();
|
||||
List<AppIpCfg> ipRangeList = appMultiFeatureCfgDao.getAppIpRangeCfg(entity.getCompileId(),entity.getFunctionId());
|
||||
|
||||
@@ -1498,25 +1498,10 @@ Is_schduler=Scheduler
|
||||
v4_num=IPv4 Number
|
||||
v6_num=IPv6 Number
|
||||
is_schduler=Scheduler
|
||||
dnsGroup=DNS Keyword Group
|
||||
dnsGroup=DNS Group
|
||||
urlGroup=Http URL Group
|
||||
#add common group
|
||||
url_group_manage=URL Group Manage
|
||||
url_group_configuration=URL Group Config
|
||||
dns_keyword_group_manage=DNS Keyword Group Manage
|
||||
dns_keyword_group_configuration=DNS Keyword Group Config
|
||||
current_hour_no_data=There is no data this hour.
|
||||
#app
|
||||
app_ip_correlation=APP Correlation IP
|
||||
APP_IP_CORRELATION=Correlation IP
|
||||
APP_FEATURE_PROPERTIES=Feature Properties
|
||||
drop_option=Drop Keep Time
|
||||
loop_option=Loop Keep Time
|
||||
weak_feature=Weak Feature
|
||||
whitelist_feature=Whitelist Feature
|
||||
extend_scan_pktNum=Extend Scan PktNum
|
||||
long_stream_lock_time=Long Stream Lock Time
|
||||
correlation_valid_time=Correlation Valid Time
|
||||
correlation_block_after=Block After Correlated
|
||||
|
||||
common_group=Common Group
|
||||
dns_keyword_group_manage=DNS Group Manage
|
||||
dns_keyword_group_configuration=DNS Group Config
|
||||
@@ -1500,25 +1500,10 @@ v4_num=IPv4 Number
|
||||
v6_num=IPv6 Number
|
||||
on=On
|
||||
is_schduler=Scheduler
|
||||
dnsGroup=\u0413\u0440\u0443\u043F\u043F\u0430 DNS \u041A\u043B\u044E\u0447. \u0421\u043B\u043E\u0432\u0430\u0445
|
||||
urlGroup=URL \u0413\u0440\u0443\u043F\u043F\u0430
|
||||
dnsGroup=DNS Group
|
||||
urlGroup=Http URL Group
|
||||
#add common group
|
||||
url_group_manage=\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 URL \u0413\u0440\u0443\u043F\u043F\u043E\u0439
|
||||
url_group_configuration=\u0413\u0440\u0443\u043F\u043F\u0430 \u041A\u043E\u043D\u0444\u0438\u0433. URL
|
||||
dns_keyword_group_manage=\u0423\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u0413\u0440\u0443\u043F\u043F\u043E\u0439 DNS \u041A\u043B\u044E\u0447. \u0421\u043B\u043E\u0432\u0430\u0445
|
||||
dns_keyword_group_configuration=\u0413\u0440\u0443\u043F\u043F\u0430 \u041A\u043E\u043D\u0444\u0438\u0433. DNS \u041A\u043B\u044E\u0447. \u0421\u043B\u043E\u0432\u0430\u0445
|
||||
current_hour_no_data=\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445 \u0437\u0430 \u044D\u0442\u043E\u0442 \u0447\u0430\u0441.
|
||||
#app
|
||||
app_ip_correlation=\u041A\u043E\u0440\u0440\u0435\u043B\u044F\u0446\u0438\u044F IP \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F
|
||||
APP_IP_CORRELATION=\u041A\u043E\u0440\u0440\u0435\u043B\u044F\u0446\u0438\u044F IP \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u044F
|
||||
APP_FEATURE_PROPERTIES=Feature Properties
|
||||
drop_option=Drop Keep Time
|
||||
loop_option=Loop Keep Time
|
||||
weak_feature=Weak Feature
|
||||
whitelist_feature=Whitelist Feature
|
||||
extend_scan_pktNum=Extend Scan PktNum
|
||||
long_stream_lock_time=Long Stream Lock Time
|
||||
correlation_valid_time=Correlation Valid Time
|
||||
correlation_block_after=Block After Correlated
|
||||
|
||||
common_group=\u041E\u0431\u0449\u0430\u044F \u0413\u0440\u0443\u043F\u043F\u0430
|
||||
url_group_manage=URL Group Manage
|
||||
url_group_configuration=URL Group Config
|
||||
dns_keyword_group_manage=DNS Group Manage
|
||||
dns_keyword_group_configuration=DNS Group Config
|
||||
@@ -1494,25 +1494,10 @@ everyMonth=\u6bcf\u6708
|
||||
validate_error=\u9a8c\u8bc1\u65f6\u53d1\u751f\u610f\u5916\u9519\u8bef
|
||||
v4_num=IPv4 Number
|
||||
v6_num=IPv6 Number
|
||||
dnsGroup=DNS \u5173\u952E\u5B57\u5206\u7EC4
|
||||
dnsGroup=DNS \u7ec4
|
||||
urlGroup=Http URL \u7ec4
|
||||
#\u65b0\u589e\u516c\u5171\u5206\u7ec4
|
||||
url_group_manage=URL\u5206\u7ec4\u7ba1\u7406
|
||||
url_group_configuration=URL\u5206\u7ec4\u914d\u7f6e
|
||||
dns_keyword_group_manage=DNS\u5173\u952e\u5b57\u5206\u7ec4\u7ba1\u7406
|
||||
dns_keyword_group_configuration=DNS\u5173\u952e\u5b57\u5206\u7ec4\u914d\u7f6e
|
||||
current_hour_no_data=\u672C\u5C0F\u65F6\u65E0\u6570\u636E
|
||||
#app
|
||||
app_ip_correlation=APP\u5173\u8054\u7279\u5F81IP\u914D\u7F6E
|
||||
APP_IP_CORRELATION=\u5173\u8054\u7279\u5F81IP
|
||||
APP_FEATURE_PROPERTIES=\u7279\u5F81\u7EC4\u4EF6
|
||||
drop_option=\u4E22\u5F03\u6301\u7EED\u65F6\u95F4
|
||||
loop_option=\u56DE\u6D41\u6301\u7EED\u65F6\u95F4
|
||||
weak_feature=\u5F31\u7279\u5F81
|
||||
whitelist_feature=\u767D\u540D\u5355
|
||||
extend_scan_pktNum=\u626B\u63CF\u5305\u6570\u6269\u5C55
|
||||
long_stream_lock_time=\u957F\u6D41\u9501\u5B9A\u65F6\u95F4
|
||||
correlation_valid_time=\u5173\u8054\u540E\u63A7\u7BA1\u65F6\u95F4
|
||||
correlation_block_after=\u5173\u8054\u540E\u7BA1\u63A7
|
||||
|
||||
common_group=\u516C\u5171\u5206\u7EC4
|
||||
dns_keyword_group_configuration=DNS\u5173\u952e\u5b57\u5206\u7ec4\u914d\u7f6e
|
||||
@@ -623,6 +623,3 @@ deleteRegionToCommonGroup=v1/delCommonGroupRegion
|
||||
#\u6d41\u91cf\u7edf\u8ba1app\u8be6\u60c5\u8d8b\u52bf\u56feGbps.pps\u63a5\u53e3
|
||||
trafficAppPpsTrend=v1/trafficAppPpsTrend
|
||||
trafficAppBpsTrend=v1/trafficAppBpsTrend
|
||||
#vpn cgi error info
|
||||
cgiError=cannot connect to vpnserver,Connection to the server has failed,Specified object can not be found,Too many users,User already exists,Too many created users,The destination server is not a VPN server,The connection has been interrupted,
|
||||
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
--------------App 关联特征IP配置----start--------20190201-------------------------------------
|
||||
##菜单
|
||||
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 ('735', '0,1,86,717,735,', 'app_ip_correlation', 'APP关联特征IP配置', '60', '/app/feature/multiFeatureCfgList', '', '', '1', 'app_correlation_ip_monit:config', '1', '2019-01-29 17:07:57', '1', '2019-01-29 17:22:40', '', '1', NULL, '0', '0', '568');
|
||||
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 ('751', '0,1,150,750,751,', 'app_ip_correlation', 'APP关联特征IP配置', '60', '/app/feature/multiFeatureCfgList', '', '', '1', 'app_correlation_ip_monit:confirm', '1', '2019-01-31 17:14:47', '1', '2019-01-31 17:14:47', '', '1', NULL, '0', '0', '568');
|
||||
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 ('866', '0,1,151,865,866,', 'app_ip_correlation', 'APP关联特征IP配置', '60', '/app/feature/multiFeatureCfgList', '', '', '1', 'app_correlation_ip_monit:audit', '1', '2019-01-31 17:15:56', '1', '2019-01-31 17:15:56', '', '1', NULL, '0', '0', '568');
|
||||
|
||||
##添加IP域和特征属性,其中特征属性的region_type=9 config_expr_type控制组件: 1 无控管属性,2 无特征属性,
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('568', '', '1', 'APP_IP_CORRELATION', 'APP IP CORRELATION', '1', '1', '1', NULL, '2019-01-31 15:48:13', NULL, NULL, '', '', '', '4,6', '', '', '1,2,3', '1,2', '0', '0,6,17', '1,2,3,4', '1', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('568', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '0', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '2', '0');
|
||||
##添加service和action 暂定service=1031,action=1;
|
||||
INSERT INTO `function_service_dict` (`function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES ('568', '0', '1', 'monit', '1031', 'app_correlation_ip_monit', '', '1', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '1', '1', '1', NULL);
|
||||
|
||||
|
||||
##添加App特征组件配置表
|
||||
DROP TABLE IF EXISTS `app_feature_prop_cfg`;
|
||||
CREATE TABLE `app_feature_prop_cfg` (
|
||||
`cfg_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`drop_opt` int(11) COMMENT 'DROP 持续时间(秒):0-7200',
|
||||
`loop_opt` int(11) COMMENT 'LOOP 持续时间(秒):0-7200',
|
||||
`weak_feature` varchar(64) COMMENT '特征强弱属性',
|
||||
`whitelist_feature` varchar(64) COMMENT '白名单属性',
|
||||
`extend_scan_pkt_num` int(11) COMMENT '扫描包数',
|
||||
`correlation_valid_time` int(11) COMMENT '多流汇聚关联时间',
|
||||
`correlation_block_after` varchar(64) COMMENT '多流汇聚关联后控管',
|
||||
`long_stream_lock_time` int(11) COMMENT '长流锁定时间',
|
||||
`compile_id` int(11) NOT NULL,
|
||||
`function_id` int(11) NOT NULL,
|
||||
`service_id` int(11) NOT NULL COMMENT '业务id',
|
||||
`request_id` int(11) NOT NULL COMMENT '来自request_info.id',
|
||||
`is_valid` int(11) NOT NULL,
|
||||
`is_audit` int(11) NOT NULL,
|
||||
`creator_id` int(11) NOT NULL COMMENT 'sys_user.id',
|
||||
`create_time` datetime NOT NULL,
|
||||
`editor_id` int(11) DEFAULT NULL COMMENT '来自sys_user.id',
|
||||
`edit_time` datetime DEFAULT NULL,
|
||||
`auditor_id` int(11) DEFAULT NULL COMMENT '来自sys_user.id',
|
||||
`audit_time` datetime DEFAULT NULL,
|
||||
`user_region1` varchar(1024) DEFAULT NULL COMMENT '预留自定义域1',
|
||||
`user_region2` varchar(1024) DEFAULT NULL COMMENT '预留自定义域2',
|
||||
`user_region3` varchar(1024) DEFAULT NULL COMMENT '预留自定义域3',
|
||||
`user_region4` varchar(1024) DEFAULT NULL COMMENT '预留自定义域4',
|
||||
`user_region5` varchar(1024) DEFAULT NULL COMMENT '预留自定义域5',
|
||||
PRIMARY KEY (`cfg_id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
|
||||
--------------App 关联特征IP配置----end------------------------------------------------------
|
||||
@@ -1,5 +1,5 @@
|
||||
--添加dns和url公共组的function_region和function_service字典
|
||||
INSERT INTO `function_region_dict` ( `function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('409', 'QNAME', '2', 'NTC_DNS_REGION', 'DNS域名配置', '1', '1', '3', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', '0', '0,1,2,3', '', '0,1,2', '0', '', '', '', '', '', '1', '1');
|
||||
INSERT INTO `function_region_dict` ( `function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ( '111', '', '2', 'NTC_URL_REGION', 'URL公共组域配置', '1', '1', '2', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', '0,1', '0,1,2,3', '', '0', '1', NULL, NULL, NULL, NULL, NULL, '2', '1');
|
||||
INSERT INTO `function_service_dict` ( `function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES ( '409', '0', '0', '', '-2', 'NTC_DNS_REGION', NULL, '1', '1', '2019-02-15 16:48:56', NULL, NULL, '1', '1', '1', NULL);
|
||||
INSERT INTO `function_service_dict` ( `function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES ( '111', '0', '0', '', '-1', 'NTC_URL_REGION', NULL, '1', '1', '2019-02-15 16:49:49', NULL, NULL, '1', '1', '1', NULL);
|
||||
INSERT INTO `function_region_dict` (`dict_id`, `function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('622', '409', 'QNAME', '2', 'NTC_DNS_REGION', 'DNS域名配置', '1', '1', '3', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', '0', '0,1,2,3', '', '0,1,2', '0', '', '', '', '', '', '1', '1');
|
||||
INSERT INTO `function_region_dict` (`dict_id`, `function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('623', '111', '', '2', 'NTC_URL_REGION', 'URL公共组域配置', '1', '1', '2', NULL, '0000-00-00 00:00:00', NULL, '0000-00-00 00:00:00', '', '0,1', '0,1,2,3', '', '0', '1', NULL, NULL, NULL, NULL, NULL, '2', '1');
|
||||
INSERT INTO `function_service_dict` (`dict_id`, `function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES ('164', '409', '0', '0', '', '-2', 'NTC_DNS_REGION', NULL, '1', '1', '2019-02-15 16:48:56', NULL, NULL, '1', '1', '1', NULL);
|
||||
INSERT INTO `function_service_dict` (`dict_id`, `function_id`, `protocol_id`, `action`, `action_code`, `service_id`, `service_name`, `service_desc`, `is_valid`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `region_code`, `is_import`, `sort`, `config_do_log`) VALUES ('165', '111', '0', '0', '', '-1', 'NTC_URL_REGION', NULL, '1', '1', '2019-02-15 16:49:49', NULL, NULL, '1', '1', '1', NULL);
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
-- APP Payload、HTTP、SSL增加session组件
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('563', 'Attribute', '6', 'APP_SESSION', 'APP SESSION组件', '1', '1', '8', NULL, '2019-01-22 13:57:49', NULL, NULL, '', '1', '0', '', '0', '', NULL, NULL, NULL, NULL, NULL, '7', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('566', 'Attribute', '6', 'APP_SESSION', 'APP SESSION组件', '1', '1', '8', NULL, '2019-01-24 09:33:13', NULL, NULL, '', '1', '0', '', '0', '', NULL, NULL, NULL, NULL, NULL, '7', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('565', 'Attribute', '6', 'APP_SESSION', 'APP SESSION组件', '1', '1', '8', NULL, '2019-01-24 09:41:17', NULL, NULL, '', '1', '0', '', '0', '', NULL, NULL, NULL, NULL, NULL, '7', '0');
|
||||
|
||||
-- 修改字段注释
|
||||
ALTER TABLE `function_region_dict` MODIFY COLUMN `region_type` INT(1) NOT NULL COMMENT '1IP类,2字符串类,3增强字符串类,4数值类,5摘要类,6回调类,7 ASN,8 APP特征Session组件';
|
||||
|
||||
|
||||
-- APP Payload/http/ssl/domain/ip 增加控管参数组件、特征属性组件
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('563', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '0', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '8', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('565', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '0', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '8', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('566', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '0', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '8', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('403', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '0', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '2', '0');
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('405', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '1', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '2', '0');
|
||||
@@ -1,14 +0,0 @@
|
||||
-- APP特征 Session组件复用字段添加注释
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `header_type` VARCHAR(16) DEFAULT '' COMMENT 'Session组件复用:传输服务端端口';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `ver` VARCHAR(4) DEFAULT '' COMMENT 'Session组件复用:传输协议';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `tos` VARCHAR(16) DEFAULT '' COMMENT 'Session组件复用:L7层协议';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `total_length` VARCHAR(16) DEFAULT '' COMMENT 'Session组件复用:链接建立方式';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `flags` VARCHAR(32) DEFAULT '' COMMENT 'Session组件复用:TCP包发送特性';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `fragment_offset` VARCHAR(32) DEFAULT '' COMMENT 'Session组件复用:域名初筛标识';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `payload_packet_direction` VARCHAR(8) DEFAULT NULL COMMENT 'payload包方向 | Session组件复用:清洗标识';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `payload_offset` INT(11) DEFAULT NULL COMMENT 'payload特征偏移量 | Session组件复用:session size min';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `payload_size` INT(11) DEFAULT NULL COMMENT 'payload包大小 | Session组件复用:session size max';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `icmp_identifier` VARCHAR(32) DEFAULT '' COMMENT 'Session组件复用:C2S Payload Size Sequence';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `icmp_type` VARCHAR(32) DEFAULT '' COMMENT 'Session组件复用:S2C Payload Size Sequence';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `icmp_code` VARCHAR(32) DEFAULT '' COMMENT 'Session组件复用:C2S Frequent Payload Size';
|
||||
ALTER TABLE `app_complex_feature_cfg` MODIFY COLUMN `protocol` VARCHAR(32) DEFAULT '' COMMENT 'Session组件复用:S2C Frequent Payload Size';
|
||||
@@ -1,2 +0,0 @@
|
||||
-- APP关联特征配置 增加控管参数组件
|
||||
INSERT INTO `function_region_dict` (`function_id`, `config_district`, `config_region_code`, `config_region_value`, `config_desc`, `is_valid`, `is_maat`, `region_type`, `creator_id`, `create_time`, `editor_id`, `edit_time`, `config_service_type`, `config_expr_type`, `config_match_method`, `config_ip_type`, `config_hex`, `config_multi_keywords`, `config_ip_pattern`, `config_port_pattern`, `config_direction`, `config_protocol`, `config_ip_port_show`, `config_region_sort`, `is_import`) VALUES ('567', '', '7', 'APP_FEATURE_PROPERTIES', 'APP特征属性组件', '1', '1', '9', NULL, '2019-02-01 10:47:28', NULL, '2019-02-01 10:47:32', '', '1', '', '', '', '', NULL, NULL, NULL, NULL, NULL, '2', '0');
|
||||
@@ -72,7 +72,7 @@
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:if test="${regionImport eq 'true'}">
|
||||
<button type="button" class="btn btn-primary import" >
|
||||
<button type="button" class="btn btn-primary import hidden" >
|
||||
<i class="fa fa-plus"></i>
|
||||
<spring:message code="import"></spring:message></button>
|
||||
</c:if>
|
||||
@@ -145,7 +145,7 @@
|
||||
<sys:delRow url="${ctx}/basics/dns/keyword/delete?isValid=-1&functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
|
||||
</shiro:hasPermission>
|
||||
|
||||
<div class="btn-group">
|
||||
<div class="btn-group hidden">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-wrench"></i> <spring:message code="export"></spring:message>
|
||||
<i class="fa fa-angle-down"></i>
|
||||
@@ -156,7 +156,6 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<shiro:hasPermission name="dns:keyword:config">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
|
||||
@@ -1,372 +0,0 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title><spring:message code="${cfgName}"></spring:message></title>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$(".action").on("change", function() {
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
});
|
||||
|
||||
$(".boxSolid:visible").find(".district").each(function(){
|
||||
$(this).change();
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
|
||||
if($("#serviceId").val()==1025 && $("#cfgId").val()!=null){
|
||||
$("input:radio[name$='exprType']").each(function(){
|
||||
if($(this).attr("checked") && $(this).val()==3){
|
||||
changeKeywordFormate($(this).val(),$(this));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
if($(element).parents().hasClass("tagsinput")){
|
||||
$(element).parents(".col-md-6").next("div").append(error);
|
||||
}else{
|
||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||
}
|
||||
},
|
||||
submitHandler: function(form){
|
||||
//代表所有业务都隐藏了,提示必须增加一种业务数据
|
||||
if($(".boxSolid").length ==$(".boxSolid.hidden").length){
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}
|
||||
|
||||
//将disable属性的元素删除
|
||||
$(".disabled").each(function(){
|
||||
$(this).remove();
|
||||
});
|
||||
if($("input[name$='exprType']").attr("disabled")){
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
}
|
||||
$("#appCode").val($("#specServiceIdId").val());
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
|
||||
// 初始clone
|
||||
ipInfoDiv = $(".ipDiv").clone();
|
||||
if($(".ipDiv").hasClass("hidden")){
|
||||
$(".ipDiv").remove();
|
||||
}
|
||||
$(".addDiv").removeClass("hidden");
|
||||
|
||||
ipInfoDiv.removeClass("ipDiv");
|
||||
ipInfoDiv.removeClass("hidden");
|
||||
resetIndex();
|
||||
|
||||
});
|
||||
|
||||
var resetDiv = function(obj){
|
||||
// 添加 or 删除
|
||||
if($(obj).hasClass("addDiv")){
|
||||
$(".ipInfo").last().after(ipInfoDiv.clone());
|
||||
}else{
|
||||
if($(".ipInfo").length == 1){
|
||||
top.$.jBox.tip("<spring:message code='one_more'/>");
|
||||
return;
|
||||
}else{
|
||||
$(obj).parents(".ipInfo:first").remove();
|
||||
}
|
||||
}
|
||||
|
||||
$(".selectpicker").selectpicker("render");// 重新渲染
|
||||
$("select[name$='ipType']").on("change",function(){
|
||||
switchIpInfo(this);
|
||||
});
|
||||
$("select[name$='ipPattern']").on("change",function(){
|
||||
switchIpInfo(this);
|
||||
});
|
||||
resetIndex();
|
||||
}
|
||||
|
||||
var resetIndex = function(){
|
||||
// 设置索引
|
||||
$(".ipInfo").not(".hidden").each(function(index,element){
|
||||
var ind = index;
|
||||
$(this).find("input,select").each(function(){
|
||||
var oldName = $(this).attr("name");
|
||||
//var newName = oldName.replace(oldName.match(/\[(\S*)\]/)[1],ind);
|
||||
var newName = oldName;
|
||||
$(this).attr("name",newName);
|
||||
$(this).parents(".form-group").find("div[for='"+oldName+"']").attr("for",newName);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
//业务窗口打开
|
||||
var addContent = function(obj, contentClassName) {
|
||||
var showDiv = $(obj).parent().parent().next();
|
||||
$(showDiv).removeClass("hidden").removeClass(
|
||||
"disabled");
|
||||
$("select[name$='portPattern']").parents(".port").removeClass("hidden");
|
||||
$("input[name$='destIpAddress']").parents(".destPort").removeClass("hidden");
|
||||
$(".moreBtn").data("click-times",2);
|
||||
$(obj).addClass("hidden");
|
||||
}
|
||||
|
||||
//业务窗口关闭
|
||||
var delContent = function(contentClassName, addBtnClassName) {
|
||||
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
||||
$("." + addBtnClassName).removeClass("hidden");
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<span id="keywordError" style="display:none"><spring:message
|
||||
code="required"></spring:message></span>
|
||||
<span id="tagsinputTip" style="display:none"><spring:message
|
||||
code="multiple_keywords_tip"></spring:message></span>
|
||||
<span id="l3_header_error" style="display:none"><spring:message
|
||||
code="l3_header_error"></spring:message></span>
|
||||
<div class="page-content">
|
||||
<c:forEach items="${serviceList}" var="service">
|
||||
<c:if test="${cfg.functionId eq service.functionId}">
|
||||
<c:set var="serviceName" value="${service.serviceName}"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${_cfg.menuNameCode }"></spring:message>
|
||||
</h3>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="portlet box blue">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="fa fa-gift"></i>
|
||||
<c:if test="${empty _cfg.cfgId}">
|
||||
<spring:message code="add"></spring:message>
|
||||
</c:if>
|
||||
<c:if test="${not empty _cfg.cfgId}">
|
||||
<spring:message code="edit"></spring:message>
|
||||
</c:if>
|
||||
</div>
|
||||
</div>
|
||||
<div class="portlet-body form">
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/app/feature/saveAppMultiFeatureCfg"
|
||||
method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" id="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
<input type="hidden" id="appCode" name="appCode" value="${_cfg.appCode}">
|
||||
<input type="hidden" id="behavCode" name="behavCode" value="${_cfg.behavCode}">
|
||||
<input type="hidden" id="doLog" name="doLog" value="2">
|
||||
<c:set var="serviceId" value="${_cfg.serviceId}" />
|
||||
<!-- 配置域类型 -->
|
||||
<div class="form-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<c:set var="spec_service_id"><spring:message code="social_app"/></c:set>
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="social_app"/></label>
|
||||
<div class="col-md-6">
|
||||
<sys:treeselect id="specServiceId" name="specServiceId" value="${_cfg.specServiceId}" enableSearch="true"
|
||||
labelName="parent.specServiceName" notAllowSelectRoot="true" notAllowSelectParent="true" enableAddBtn="true"
|
||||
labelValue="${empty _cfg.specServiceId?spec_service_id:fns:getBySpecServiceId(_cfg.specServiceId).specServiceName}"
|
||||
title="${spec_service_id}" url="/specific/specificServiceCfg/treeData?isLeafShow=false&cfgType=1" extId=""
|
||||
cssClass="form-control required"/>
|
||||
</div>
|
||||
<div for="parent.specServiceName"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
code="config_describe" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="cfgDesc"
|
||||
value="${_cfg.cfgDesc}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 hidden">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
code="action" /></label>
|
||||
<div class="col-md-6">
|
||||
<c:forEach items="${serviceList}" var="service"
|
||||
varStatus="satus">
|
||||
<label class="radio-inline"> <c:if
|
||||
test="${_cfg.functionId eq service.functionId}">
|
||||
<input type="radio" name="action"
|
||||
serviceId="${service.serviceId }"
|
||||
protocolId="${service.protocolId }"
|
||||
regionCode="${service.regionCode }"
|
||||
value="${service.action }" class="required action"
|
||||
<c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }"
|
||||
var="dict">
|
||||
<c:if test="${dict.itemCode eq service.action }">
|
||||
<spring:message code="${dict.itemValue }" />
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<c:set var="serviceId" value="${service.serviceId}" />
|
||||
</c:if>
|
||||
</label>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<div for="action"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:if test="${fns:getUser().isAdmin() or fns:getUser().loginId eq 'appUser' }">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message
|
||||
code="user_region" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control" type="text" name="userRegion1" maxlength="1024"
|
||||
value="${_cfg.userRegion1}">
|
||||
</div>
|
||||
<div for="userRegion1"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<!-- 关联特征配置 start -->
|
||||
<h4 class="form-section">
|
||||
<spring:message code="Correlation Feature" />
|
||||
<small>
|
||||
<span class="glyphicon glyphicon-plus addDiv"
|
||||
onClick="resetDiv(this)" title="add"></span>
|
||||
</small>
|
||||
</h4>
|
||||
<div class="row ipInfo boxSolid ipDiv">
|
||||
<div class="row">
|
||||
<div class="pull-right">
|
||||
<span class="glyphicon glyphicon-remove pull-right" title="remove"
|
||||
onClick="resetDiv(this);" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- 特征种类 -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="Feature Type"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="" class="selectpicker show-tick form-control">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="ip"><spring:message code="IP"/></option>
|
||||
<option value="domain"><spring:message code="Domain"/></option>
|
||||
<option value="payload"><spring:message code="Payload"/></option>
|
||||
<option value="http"><spring:message code="HTTP"/></option>
|
||||
<option value="ssl"><spring:message code="SSL"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for=""></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 特征属性 -->
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="Feature Attributes"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="" class="selectpicker show-tick form-control" multiple="multiple">
|
||||
<option value=""><spring:message code="weak_feature"/></option>
|
||||
<option value=""><spring:message code="whitelist_feature"/></option>
|
||||
<option value=""><spring:message code="extend_scan_pktNum"/></option>
|
||||
<option value=""><spring:message code="long_stream_lock_time"/></option>
|
||||
<option value=""><spring:message code="correlation_block_after"/></option>
|
||||
<option value=""><spring:message code="correlation_valid_time"/></option>
|
||||
</select>
|
||||
</div>
|
||||
<div for=""></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="Feature Configs"/></label>
|
||||
<div class="col-md-6">
|
||||
<select name="" class="selectpicker show-tick form-control" data-live-search="true" data-live-search-placeholder="search">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="cfg1">APP_Feature_Cfg_1</option>
|
||||
<option value="cfg2">APP_Feature_Cfg_2</option>
|
||||
<option value="cfg3">APP_Feature_Cfg_3</option>
|
||||
</select>
|
||||
</div>
|
||||
<div for=""></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><spring:message code="Hit Counts" /></label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control number digits" placeholder="1" min="1" max="16" type="text" name="">
|
||||
</div>
|
||||
<div for=""></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 关联特征配置 end -->
|
||||
|
||||
<c:set var="strCfgIndex" value="0"></c:set>
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
<c:if test="${region.regionType eq 9 }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section"><spring:message code="${region.configRegionValue}" />
|
||||
<small>
|
||||
<span class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="appFeaturePropCfgList[0]"></c:set>
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${fn:length(_cfg.appFeaturePropCfgList)==0}"> hidden disabled</c:if>">
|
||||
<input type="hidden" name="cfgRegionValue" value="${region.configRegionValue }">
|
||||
<input type="hidden" name="cfgRegionType" value="${region.regionType }">
|
||||
<input type="hidden" name="cfgRegionCode1" value="${region.configRegionCode }">
|
||||
<%@include file="/WEB-INF/views/cfg/app/appFeatureProp.jsp"%>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
<input name="isAreaEffective" type="hidden" value="0">
|
||||
<input type="hidden" name="requestId" value="0" />
|
||||
<input type="hidden" name="classify" value="0" />
|
||||
<input type="hidden" name="attribute" value="0" />
|
||||
<input type="hidden" name="lable" value="0" />
|
||||
<div class="form-actions">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="row">
|
||||
<div class="col-md-offset-3 col-md-8">
|
||||
<button id="save" type="submit" class="btn green">
|
||||
<spring:message code="submit" />
|
||||
</button>
|
||||
<button id="cancel" type="button" class="btn default">
|
||||
<spring:message code="cancel" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- END FORM-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -40,22 +40,6 @@ $(function(){
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
});
|
||||
//业务窗口打开
|
||||
var addContent = function(obj, contentClassName) {
|
||||
var showDiv = $(obj).parent().parent().next();
|
||||
$(showDiv).removeClass("hidden").removeClass("disabled");
|
||||
$("select[name$='portPattern']").parents(".port").removeClass("hidden");
|
||||
$("input[name$='destIpAddress']").parents(".destPort").removeClass("hidden");
|
||||
$(".moreBtn").data("click-times",2);
|
||||
$(obj).addClass("hidden");
|
||||
}
|
||||
|
||||
//业务窗口关闭
|
||||
var delContent = function(contentClassName, addBtnClassName) {
|
||||
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
||||
$("." + addBtnClassName).removeClass("hidden");
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -184,7 +168,7 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
</div>
|
||||
</div>
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId && region.regionType ne 9}">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode" serviceType="${region.configServiceType }" value="${region.configRegionCode }">
|
||||
<input type="hidden" name="configMultiKeywords" value="${region.configMultiKeywords }">
|
||||
@@ -379,22 +363,7 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${region.regionType eq 9 }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section"><spring:message code="${region.configRegionValue}" />
|
||||
<small>
|
||||
<span class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="appFeaturePropCfgList[0]"></c:set>
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${fn:length(_cfg.appFeaturePropCfgList)==0}"> hidden disabled</c:if>">
|
||||
<input type="hidden" name="cfgRegionValue" value="${region.configRegionValue }">
|
||||
<input type="hidden" name="cfgRegionType" value="${region.regionType }">
|
||||
<input type="hidden" name="cfgRegionCode1" value="${region.configRegionCode }">
|
||||
<%@include file="/WEB-INF/views/cfg/app/appFeatureProp.jsp"%>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</div>
|
||||
<input name="isAreaEffective" type="hidden" value="0">
|
||||
<%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> --%>
|
||||
|
||||
@@ -1,203 +0,0 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
|
||||
</head>
|
||||
<div class="row">
|
||||
<div class="pull-right">
|
||||
<span class="glyphicon glyphicon-remove pull-right" title="remove"
|
||||
onClick="delContent('${tabName}${status.index}','${tabName}Add');" />
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<!-- 控管组件 -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4"> <spring:message
|
||||
code="drop_option" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6 input-group showDiv">
|
||||
<span class="input-group-addon"> <input type="checkbox"
|
||||
class="showFlag"
|
||||
<c:if test="${_cfg.appFeaturePropCfgList[0].dropOpt != null}">checked</c:if> />
|
||||
<span></span>
|
||||
</span> <input class="form-control number showInfo" type="text"
|
||||
range="[0,7200]" defaultVal="180" name="${cfgName}.dropOpt"
|
||||
name="" value="${_cfg.appFeaturePropCfgList[0].dropOpt}"
|
||||
disabled="disabled">
|
||||
</div>
|
||||
<div for="${cfgName}.dropOpt"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4"> <spring:message
|
||||
code="loop_option" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6 input-group showDiv">
|
||||
<span class="input-group-addon"> <input type="checkbox"
|
||||
class="showFlag"
|
||||
<c:if test="${_cfg.appFeaturePropCfgList[0].loopOpt != null}">checked</c:if> />
|
||||
<span></span>
|
||||
</span> <input class="form-control number showInfo" type="text"
|
||||
range="[0,7200]" defaultVal="180" name="${cfgName}.loopOpt"
|
||||
name="" value="${_cfg.appFeaturePropCfgList[0].loopOpt}"
|
||||
disabled="disabled">
|
||||
</div>
|
||||
<div for="${cfgName}.loopOpt"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 特征组件属性 -->
|
||||
<div class="row" <c:if test="${region.configExprType eq 1}">hidden</c:if>>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4"> <spring:message
|
||||
code="weak_feature" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox"> <input type="checkbox"
|
||||
name="${cfgName}.weakFeature" value="DKC=11;DKS=1;"
|
||||
<c:if test="${_cfg.appFeaturePropCfgList[0].weakFeature != null}">checked</c:if> />
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4"> <spring:message
|
||||
code="whitelist_feature" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox"> <!-- 循环查看user_region中是否包含属性 -->
|
||||
<input type="checkbox" name="${cfgName}.whitelistFeature"
|
||||
value="DKC=13;DKS=1;"
|
||||
<c:if test="${_cfg.appFeaturePropCfgList[0].whitelistFeature != null}">checked</c:if> />
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4"> <spring:message
|
||||
code="extend_scan_pktNum" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6 input-group showDiv">
|
||||
<span class="input-group-addon"> <input type="checkbox"
|
||||
class="showFlag"
|
||||
<c:if test="${_cfg.appFeaturePropCfgList[0].extendScanPktNum != null}">checked</c:if> />
|
||||
<span></span>
|
||||
</span> <input class="form-control number showInfo" type="text"
|
||||
disabled="disabled" name="${cfgName}.extendScanPktNum"
|
||||
range="[2,8]" defaultVal="4"
|
||||
value="${_cfg.appFeaturePropCfgList[0].extendScanPktNum}">
|
||||
</div>
|
||||
</div>
|
||||
<div for="${cfgName}.extendScanPktNum"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4"> <spring:message
|
||||
code="long_stream_lock_time" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6 input-group showDiv">
|
||||
<span class="input-group-addon"> <input type="checkbox"
|
||||
class="showFlag"
|
||||
<c:if test="${_cfg.appFeaturePropCfgList[0].longStreamLockTime != null}">checked</c:if> />
|
||||
<span></span>
|
||||
</span> <input class="form-control number showInfo" type="text"
|
||||
name="${cfgName}.longStreamLockTime" range="[30,300]"
|
||||
defaultVal="180"
|
||||
value="${_cfg.appFeaturePropCfgList[0].longStreamLockTime}"
|
||||
disabled="disabled">
|
||||
</div>
|
||||
</div>
|
||||
<div for="${cfgName}.longStreamLockTime"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4"> <spring:message
|
||||
code="correlation_block_after" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox"> <input type="checkbox"
|
||||
name="${cfgName}.correlationBlockAfter" value="DKC=12;DKS=1;"
|
||||
<c:if test="${_cfg.appFeaturePropCfgList[0].correlationBlockAfter != null}">checked</c:if> />
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-4"> <spring:message
|
||||
code="correlation_valid_time" />
|
||||
</label>
|
||||
<div class="col-md-6 showDiv">
|
||||
<div class="col-md-6 input-group showDiv">
|
||||
<span class="input-group-addon"> <input type="checkbox"
|
||||
class="showFlag"
|
||||
<c:if test="${_cfg.appFeaturePropCfgList[0].correlationValidTime != null}">checked</c:if> />
|
||||
<span></span>
|
||||
</span> <input class="form-control number showInfo" type="text"
|
||||
disabled="disabled" range="[0,360]" defaultVal="10"
|
||||
name="${cfgName}.correlationValidTime"
|
||||
value="${_cfg.appFeaturePropCfgList[0].correlationValidTime}">
|
||||
</div>
|
||||
</div>
|
||||
<div for="${cfgName}.correlationValidTime"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$(".showFlag").on("click", function() {
|
||||
var obj = $(this).parents(".showDiv").find(".showInfo");
|
||||
if ($(this).is(':checked')) {
|
||||
$(obj).val($(obj).attr("defaultVal"));
|
||||
$(obj).removeAttr("disabled");
|
||||
} else {
|
||||
$(obj).val("");
|
||||
$(obj).attr("disabled", "disabled");
|
||||
}
|
||||
});
|
||||
$(".showFlag").each(function() {
|
||||
var obj = $(this).parents(".showDiv").find(".showInfo");
|
||||
if ($(this).is(':checked')) {
|
||||
$(obj).removeAttr("disabled");
|
||||
} else {
|
||||
$(obj).attr("disabled", "disabled");
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@@ -1,614 +0,0 @@
|
||||
<%@ page contentType="text/html;charset=UTF-8"%>
|
||||
<%@ include file="/WEB-INF/include/taglib.jsp"%>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
|
||||
</head>
|
||||
<%-- <c:forEach items="${regionList}" var="regionDistrict">
|
||||
<c:if
|
||||
test="${cfg.functionId eq regionDistrict.functionId
|
||||
and regionDistrict.regionType eq 3
|
||||
and regionValue eq regionDistrict.configRegionValue}"> --%>
|
||||
<!-- regionDistrict.regionType==3表示增强字符串类配置 -->
|
||||
<input type="hidden" name="${cfgName}.cfgType" value="${region.configRegionValue }">
|
||||
<input type="hidden" name="${cfgName}.cfgRegionCode" serviceType="${region.configServiceType }" value="${region.configRegionCode }">
|
||||
<input type="hidden" name="${cfgName}.configMultiKeywords" value="${region.configMultiKeywords }">
|
||||
<input type="hidden" name="${cfgName}.configServiceType" value="${region.configServiceType }">
|
||||
<input type="hidden" name="${cfgName}.configHex" value="${region.configHex }">
|
||||
<%-- </c:if>
|
||||
</c:forEach> --%>
|
||||
|
||||
<div class="row">
|
||||
<div class="pull-right">
|
||||
<span class="glyphicon glyphicon-remove pull-right" title="remove"
|
||||
onClick="delContent('${tabName}${status.index}','${tabName}Add');" />
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<c:if test="${!empty region.configDistrict }">
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="district" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}.district"
|
||||
class="selectpicker show-tick form-control required district" onchange="changeDistrict($(this))">
|
||||
<c:forEach items="${fn:split(region.configDistrict,',')}"
|
||||
var="_district">
|
||||
<option value="${_district }"
|
||||
<c:if test="${cfg.district==_district}">selected</c:if>>${_district }</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
<input type="hidden" name="${cfgName}.districtShowName" maxlength="64" placeholder="<spring:message code='please_input'/> <spring:message code='custom_region'/>" class="otherValue form-control invisibleChar" value="${cfg.district}"/>
|
||||
</div>
|
||||
<div for="${cfgName}.districtShowName"></div>
|
||||
<div for="${cfgName}.district"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${region.functionId ne 566 }">
|
||||
<!-- session组件属性 -->
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="L4 Protocol" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}.ver" class="selectpicker show-tick form-control">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="6" <c:if test="${cfg.ver eq 6}">selected</c:if>><spring:message code="TCP"/></option>
|
||||
<option value="17" <c:if test="${cfg.ver eq 17}">selected</c:if>><spring:message code="UDP"/></option>
|
||||
<option value="50" <c:if test="${cfg.ver eq 50}">selected</c:if>><spring:message code="ESP"/></option>
|
||||
<option value="1" <c:if test="${cfg.ver eq 1}">selected</c:if>><spring:message code="ICMP"/></option>
|
||||
<%-- <c:forEach items="${fns:getDictList('PROTOCOL')}" var="dict">
|
||||
<option value="${dict.itemCode }"
|
||||
<c:if test="${cfg.ver == dict}">selected</c:if>>${dict.itemValue }</option>
|
||||
</c:forEach> --%>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="Server Port" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control number sessionDPortCheck" type="text" name="${cfgName}.headerType" value="${cfg.headerType}">
|
||||
</div>
|
||||
<div for="${cfgName}.headerType"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="L7 Protocol" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}.tos" class="selectpicker show-tick form-control" data-live-search="true" data-live-search-placeholder="search" >
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<option value="0" <c:if test="${cfg.tos == '0'}">selected</c:if>><spring:message code="Unknown L7 Protocol"/></option>
|
||||
<c:forEach items="${l7ProtoList}" var="proto">
|
||||
<option value="${proto.specServiceCode }"
|
||||
<c:if test="${cfg.tos == proto.specServiceCode}">selected</c:if>>${proto.specServiceName }
|
||||
</option>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%-- <div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="Private Protocol" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox">
|
||||
<input type="checkbox" name="${cfgName}.ihl" value="1" class="privateProto"
|
||||
<c:if test="${cfg.ihl != null}">checked</c:if>
|
||||
/>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="TCP Nodelay" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox">
|
||||
<input type="checkbox" name="${cfgName}.flags" value="1"
|
||||
<c:if test="${cfg.flags != null}">checked</c:if>
|
||||
/>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="TCP Without SYN" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox">
|
||||
<input type="checkbox" name="${cfgName}.totalLength" value="1"
|
||||
<c:if test="${cfg.totalLength != null}">checked</c:if>
|
||||
/>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="Find by Domain" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox">
|
||||
<input type="checkbox" name="${cfgName}.fragmentOffset" value="1"
|
||||
<c:if test="${cfg.fragmentOffset != null}">checked</c:if>
|
||||
/>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="Use Loop" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox">
|
||||
<input type="checkbox" name="${cfgName}.payloadPacketDirection" value="1"
|
||||
<c:if test="${cfg.payloadPacketDirection != null}">checked</c:if>
|
||||
/>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="Session Size Min" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control number sessionSizeMin" type="text" min="0" maxlength="9" name="${cfgName}.payloadOffset" value="${cfg.payloadOffset}">
|
||||
</div>
|
||||
<div for="${cfgName}.payloadOffset"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="Session Size Max" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control number sessionSizeMax" type="text" min="0" maxlength="9" name="${cfgName}.payloadSize" value="${cfg.payloadSize}">
|
||||
</div>
|
||||
<div for="${cfgName}.payloadSize"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="C2S" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio">
|
||||
<input type="radio" class="c2s_radio" name="${cfgName}.sessionC2sRadio" value="c2sPayload"
|
||||
<c:if test="${!empty cfg.icmpIdentifier }"> checked</c:if> />
|
||||
<spring:message code="Payload Size Seq" />
|
||||
<span></span>
|
||||
</label>
|
||||
<label class="mt-radio">
|
||||
<input type="radio" class="c2s_radio" name="${cfgName}.sessionC2sRadio" value="c2sFrequent"
|
||||
<c:if test="${!empty cfg.icmpCode }"> checked</c:if> />
|
||||
<spring:message code="Frequent Payload size" />
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 c2sPayload <c:if test='${empty cfg.icmpIdentifier }'>hidden</c:if>">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="C2S Payload Size Seq" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control number tags c2sAndS2cInput" type="text" name="${cfgName}.icmpIdentifier" value="${cfg.icmpIdentifier}">
|
||||
</div>
|
||||
<div for="${cfgName}.icmpIdentifier"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 c2sFrequent <c:if test='${empty cfg.icmpCode }'>hidden</c:if>">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="C2S Frequent Payload size" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control number tags c2sAndS2cInput" type="text" name="${cfgName}.icmpCode" value="${cfg.icmpCode}">
|
||||
</div>
|
||||
<div for="${cfgName}.icmpCode"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="S2C" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-radio-inline">
|
||||
<label class="mt-radio">
|
||||
<input type="radio" class="s2c_radio" name="${cfgName}.sessionS2cRadio" value="s2cPayload"
|
||||
<c:if test="${!empty cfg.icmpType }"> checked</c:if> />
|
||||
<spring:message code="Payload Size Seq" />
|
||||
<span></span>
|
||||
</label>
|
||||
<label class="mt-radio">
|
||||
<input type="radio" class="s2c_radio" name="${cfgName}.sessionS2cRadio" value="s2cFrequent"
|
||||
<c:if test="${!empty cfg.protocol }"> checked</c:if> />
|
||||
<spring:message code="Frequent Payload size" />
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 s2cPayload <c:if test='${empty cfg.icmpType }'>hidden</c:if>">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="S2C Payload Size Seq" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control tags c2sAndS2cInput" type="text" name="${cfgName}.icmpType" value="${cfg.icmpType}">
|
||||
</div>
|
||||
<div for="${cfgName}.icmpType"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 s2cFrequent <c:if test='${empty cfg.protocol }'>hidden</c:if>">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="S2C Frequent Payload size" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<input class="form-control tags c2sAndS2cInput" type="text" name="${cfgName}.protocol" value="${cfg.protocol}">
|
||||
</div>
|
||||
<div for="${cfgName}.protocol"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</c:if>
|
||||
<c:if test="${region.functionId eq 566 }">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="TLS Session Resumption" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox">
|
||||
<input type="checkbox" name="${cfgName}.userRegion3" value="1"
|
||||
<c:if test="${cfg.userRegion3 != null}">checked</c:if>
|
||||
/>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="TLS Single Certificate" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox">
|
||||
<input type="checkbox" name="${cfgName}.userRegion4" value="1"
|
||||
<c:if test="${cfg.userRegion4 != null}">checked</c:if>
|
||||
/>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3">
|
||||
<spring:message code="TLS Self-issued Certificate" />
|
||||
</label>
|
||||
<div class="col-md-6">
|
||||
<div class="mt-checkbox-inline">
|
||||
<label class="mt-checkbox">
|
||||
<input type="checkbox" name="${cfgName}.userRegion5" value="1"
|
||||
<c:if test="${cfg.userRegion5 != null}">checked</c:if>
|
||||
/>
|
||||
<span></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<%-- <div class="row keywords">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<c:choose>
|
||||
<c:when test="${fn:containsIgnoreCase(region.configServiceType,'domain') }">
|
||||
<spring:message code="domain" />
|
||||
</c:when>
|
||||
<c:when test="${fn:containsIgnoreCase(region.configServiceType,'url') }">
|
||||
<spring:message code="URL" />
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<spring:message code="keywords" />
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</label>
|
||||
|
||||
<!-- 此配置的关键词可以输入多个关键词 -->
|
||||
<c:if test="${region.configMultiKeywords eq 1}">
|
||||
<div class="col-md-6">
|
||||
<input class="form-control required tags" type="text" id="tags_${tabName}${status.index}"
|
||||
name="${cfgName}.cfgKeywords"
|
||||
value="${cfg.cfgKeywords}">
|
||||
</div>
|
||||
</c:if>
|
||||
<!-- 此配置的关键词不允许输入多个关键词 -->
|
||||
<c:if test="${(region.configMultiKeywords eq 0) or (empty region.configMultiKeywords)}">
|
||||
<div class="col-md-6">
|
||||
|
||||
<input class="form-control required invisibleChar
|
||||
<c:if test="${fn:containsIgnoreCase(region.configServiceType,'domain') }"> domainCheck </c:if>
|
||||
"
|
||||
type="text"
|
||||
name="${cfgName}.cfgKeywords"
|
||||
value="${cfg.cfgKeywords}">
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<div for="${cfgName}.cfgKeywords"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6 exprType">
|
||||
<div class="form-group">
|
||||
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="expression_type" /></label>
|
||||
<div class="col-md-6">
|
||||
<c:if test="${!empty region.configExprType}">
|
||||
<c:forEach var="exprType" items="${fn:split(region.configExprType,',')}" varStatus="stat" >
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC" >
|
||||
<c:if test="${exprTypeC.itemCode eq exprType}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="${cfgName}.exprType" value="${exprType }"
|
||||
class="required"
|
||||
<c:if test="${stat.index == 0 }"> checked </c:if>
|
||||
<c:if test="${cfg.exprType eq exprType || (empty cfg.exprType && exprType eq 0)}">
|
||||
checked
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configExprType}">
|
||||
<c:forEach items="${fns:getDictList('EXPRESSION_TYPE')}" var="exprTypeC">
|
||||
<c:if test="${exprTypeC.itemCode eq 0}">
|
||||
<label class="radio-inline">
|
||||
<input type="radio"
|
||||
name="${cfgName}.exprType" value="${exprTypeC.itemCode }"
|
||||
class="required" checked >
|
||||
<spring:message code="${exprTypeC.itemValue }" />
|
||||
</label>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</div>
|
||||
<div for="${cfgName}.exprType"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 matchMethod">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="match_method" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}.matchMethod"
|
||||
class="selectpicker select2 form-control required ">
|
||||
<c:if test="${!empty region.configMatchMethod}">
|
||||
<c:forEach var="matchMethod" items="${fn:split(region.configMatchMethod,',')}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq matchMethod}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
<c:if test="${cfg.matchMethod eq matchMethod || (empty cfg.matchMethod && matchMethod eq 0)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configMatchMethod}">
|
||||
<c:forEach items="${fns:getDictList('MATCH_METHOD')}" var="matchMethodC">
|
||||
<c:if test="${matchMethodC.itemCode eq 0}">
|
||||
<option value="${matchMethodC.itemCode}"
|
||||
selected
|
||||
>
|
||||
<spring:message code="${matchMethodC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="${cfgName}.matchMethod"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row <c:if test="${fn:length(fn:split(region.configHex,',')) ==1}">hidden</c:if>">
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<!-- isP2pHashCfg: P2PHash配置只能是十六进制字符 -->
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="${cfgName}.isHex" value="1" class="required"
|
||||
><spring:message code="hex"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="${cfgName}.isHex" value="0" class="required"
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="${cfgName}.isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="${cfgName}.isCaseSenstive" value="1" class="required"
|
||||
><spring:message code="case_senstive"/>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="${cfgName}.isCaseSenstive" value="0" class="required"
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="${cfgName}.isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_hex"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="${cfgName}.isHex" value="0" class="required" checked
|
||||
><spring:message code="not_hex"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="${cfgName}.isHex"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="is_case_insenstive"/></label>
|
||||
<div class="col-md-6">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="${cfgName}.isCaseSenstive" value="0" class="required"
|
||||
checked
|
||||
><spring:message code="case_insenstive"/>
|
||||
</label>
|
||||
</div>
|
||||
<div for="${cfgName}.isCaseInsenstive"></div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</div>
|
||||
<div class="row hidden">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-md-3"><font color="red">*</font>
|
||||
<spring:message code="whether_hexbinary" /></label>
|
||||
<div class="col-md-6">
|
||||
<select name="${cfgName}.isHexbin"
|
||||
class="selectpicker select2 form-control required">
|
||||
<c:if test="${!empty region.configHex}">
|
||||
<c:forEach var="isHexbin" items="${fn:split(region.configHex,',')}">
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq isHexbin}">
|
||||
<option value="${isHexbinC.itemCode}"
|
||||
<c:if test="${cfg.isHexbin eq isHexbin || (empty isHexbin && isHexbin eq 0)}">
|
||||
selected
|
||||
</c:if>
|
||||
>
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
</c:if>
|
||||
<c:if test="${empty region.configHex}">
|
||||
|
||||
<c:forEach items="${fns:getDictList('WHETHER_HEXBINARY')}" var="isHexbinC">
|
||||
<c:if test="${isHexbinC.itemCode eq 0}">
|
||||
<option value="${isHexbinC.itemCode}" selected >
|
||||
<spring:message code="${isHexbinC.itemValue}"/>
|
||||
</option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
</c:if>
|
||||
</select>
|
||||
</div>
|
||||
<div for="${cfgName}.isHexbin"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</html>
|
||||
@@ -23,22 +23,6 @@ $(function(){
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
});
|
||||
//业务窗口打开
|
||||
var addContent = function(obj, contentClassName) {
|
||||
var showDiv = $(obj).parent().parent().next();
|
||||
$(showDiv).removeClass("hidden").removeClass("disabled");
|
||||
$("select[name$='portPattern']").parents(".port").removeClass("hidden");
|
||||
$("input[name$='destIpAddress']").parents(".destPort").removeClass("hidden");
|
||||
$(".moreBtn").data("click-times",2);
|
||||
$(obj).addClass("hidden");
|
||||
}
|
||||
|
||||
//业务窗口关闭
|
||||
var delContent = function(contentClassName, addBtnClassName) {
|
||||
$("." + contentClassName).addClass("hidden").addClass("disabled");
|
||||
$("." + addBtnClassName).removeClass("hidden");
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -69,7 +53,7 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
<input type="hidden" id="direction" name="direction" value="0">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId && region.regionType ne 9}">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode"isMaat="${region.isMaat}"
|
||||
serviceType="${region.configServiceType}"
|
||||
@@ -274,24 +258,6 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${region.regionType eq 9 }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section"><spring:message code="${region.configRegionValue}" />
|
||||
<small>
|
||||
<span class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="appFeaturePropCfgList[0]"></c:set>
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${fn:length(_cfg.appFeaturePropCfgList)==0}"> hidden disabled</c:if>">
|
||||
<input type="hidden" name="cfgRegionValue" value="${region.configRegionValue }">
|
||||
<input type="hidden" name="cfgRegionType" value="${region.regionType }">
|
||||
<input type="hidden" name="cfgRegionCode1" value="${region.configRegionCode }">
|
||||
<%@include file="/WEB-INF/views/cfg/app/appFeatureProp.jsp"%>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
|
||||
<input name="isAreaEffective" type="hidden" value="0">
|
||||
<%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> --%>
|
||||
<input type="hidden" name="requestId" value="0"/>
|
||||
|
||||
@@ -168,80 +168,7 @@ $(function(){
|
||||
},
|
||||
errorContainer: "#messageBox",
|
||||
});
|
||||
// APP SESSION域 Session Size Min 和 Session Size Max属性限制
|
||||
$(".sessionSizeMin").on("change",function(){
|
||||
var minValue = parseInt($(".sessionSizeMin").val());
|
||||
$(".sessionSizeMax").prop("min",minValue+1);
|
||||
$(".sessionSizeMax").addClass("required");
|
||||
if($(".sessionSizeMin").val() == ""){
|
||||
$(".sessionSizeMax").removeClass("required");
|
||||
}
|
||||
|
||||
});
|
||||
$(".sessionSizeMax").on("change",function(){
|
||||
var maxValue = parseInt($(".sessionSizeMax").val());
|
||||
$(".sessionSizeMin").prop("max",maxValue-1);
|
||||
$(".sessionSizeMin").addClass("required");
|
||||
if($(".sessionSizeMax").val() == ""){
|
||||
$(".sessionSizeMin").removeClass("required");
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$(".c2s_radio").on("click",function(){
|
||||
if($(this).val() == "c2sPayload"){
|
||||
$(".c2sPayload").removeClass("hidden");
|
||||
$(".c2sFrequent").addClass("hidden");
|
||||
}else if($(this).val() == "c2sFrequent"){
|
||||
$(".c2sFrequent").removeClass("hidden");
|
||||
$(".c2sPayload").addClass("hidden");
|
||||
|
||||
}
|
||||
});
|
||||
$(".s2c_radio").on("click",function(){
|
||||
if($(this).val() == "s2cPayload"){
|
||||
$(".s2cPayload").removeClass("hidden");
|
||||
$(".s2cFrequent").addClass("hidden");
|
||||
}else if($(this).val()=="s2cFrequent"){
|
||||
$(".s2cFrequent").removeClass("hidden");
|
||||
$(".s2cPayload").addClass("hidden");
|
||||
}
|
||||
});
|
||||
|
||||
$(".c2sAndS2cInput").tagsInput({
|
||||
width:$(".c2sAndS2cInput").find(".form-control").width(),
|
||||
defaultText:'please input ignore query string in URL',
|
||||
'delimiter':';',//特殊字符串分隔与表达式的多关键词
|
||||
maxCount:4,
|
||||
onAddTag:function(tag,size){
|
||||
//var reg = new RegExp(/\t|\r|\n|,/);
|
||||
var reg = new RegExp(/^([0-9]*)$/);
|
||||
if (!tag.match(reg)) {
|
||||
$(this).parent(".col-md-6").next("div").html("<label class='error'>"+$.validator.messages.number+"</label>");
|
||||
}else{
|
||||
$(this).parent(".col-md-6").next("div").html("");
|
||||
}
|
||||
},
|
||||
onRemoveTag:function(tag,size){
|
||||
$(this).parent(".col-md-6").next("div").html("");
|
||||
}
|
||||
});
|
||||
|
||||
$(".tagsinput").popover({
|
||||
animation:true,
|
||||
container:'body',
|
||||
placement:'right',
|
||||
html:true,
|
||||
trigger:"hover",
|
||||
title:"",
|
||||
content:function(){
|
||||
var content = $("#tagsinputTip").text();
|
||||
return content;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
//业务窗口打开
|
||||
var addContent = function(obj, contentClassName) {
|
||||
var showDiv = $(obj).parent().parent().next();
|
||||
@@ -414,7 +341,6 @@ function changeKeywordFormate(exprType,obj){
|
||||
<c:set var="complexCfgIndex" value="0"></c:set>
|
||||
<c:set var="strCfgIndex" value="0"></c:set>
|
||||
<c:set var="numCfgIndex" value="0"></c:set>
|
||||
<c:set var="sessionCfgIndex" value="0"></c:set>
|
||||
<c:forEach items="${regionList}" var="region" varStatus="status">
|
||||
|
||||
<c:if test="${region.regionType eq 1 }">
|
||||
@@ -509,77 +435,12 @@ function changeKeywordFormate(exprType,obj){
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<c:if test="${region.regionType eq 8 }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section">
|
||||
<spring:message code="${region.configRegionValue}" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add <c:if test="${fn:length(regionList)==1 or status.index==0}"> hidden</c:if>"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="sessionList[${sessionCfgIndex}]"></c:set>
|
||||
<%-- <c:set var="regionValue" value="${region.configRegionValue}"></c:set> --%>
|
||||
<c:choose>
|
||||
<c:when test="${fn:length(_cfg.sessionList)>0}">
|
||||
<c:set var="isBreak" value="false"></c:set>
|
||||
<c:forEach items="${_cfg.sessionList}" var="cfg">
|
||||
<c:choose>
|
||||
<c:when test="${region.configRegionCode eq cfg.cfgRegionCode and !isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index}">
|
||||
<input type="hidden" name="cfgRegionValue" value="${region.configRegionValue }">
|
||||
<input type="hidden" name="cfgRegionType" value="${region.regionType }">
|
||||
<input type="hidden" name="cfgRegionCode1" value="${region.configRegionCode }">
|
||||
<%@include file="/WEB-INF/views/cfg/app/appFeatureSessionForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="isBreak" value="true"></c:set>
|
||||
<c:set var="sessionCfgIndex"
|
||||
value="${sessionCfgIndex+1 }"></c:set>
|
||||
</c:when>
|
||||
</c:choose>
|
||||
</c:forEach>
|
||||
<c:if test="${!isBreak}">
|
||||
<div class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<input type="hidden" name="cfgRegionValue" value="${region.configRegionValue }">
|
||||
<input type="hidden" name="cfgRegionType" value="${region.regionType }">
|
||||
<input type="hidden" name="cfgRegionCode1" value="${region.configRegionCode }">
|
||||
<%@include file="/WEB-INF/views/cfg/app/appFeatureSessionForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="sessionCfgIndex" value="${sessionCfgIndex+1 }"></c:set>
|
||||
</c:if>
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${fn:length(regionList)>1 and status.index>0}"> hidden disabled</c:if>">
|
||||
<input type="hidden" name="cfgRegionValue" value="${region.configRegionValue }">
|
||||
<input type="hidden" name="cfgRegionType" value="${region.regionType }">
|
||||
<input type="hidden" name="cfgRegionCode1" value="${region.configRegionCode }">
|
||||
<%@include file="/WEB-INF/views/cfg/app/appFeatureSessionForm.jsp"%>
|
||||
</div>
|
||||
<c:set var="sessionCfgIndex" value="${sessionCfgIndex+1 }"></c:set>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<c:if test="${region.regionType eq 9 }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section"><spring:message code="${region.configRegionValue}" />
|
||||
<small>
|
||||
<span class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName" value="appFeaturePropCfgList[0]"></c:set>
|
||||
<div class="row boxSolid ${tabName}${status.index} <c:if test="${fn:length(_cfg.appFeaturePropCfgList)==0}"> hidden disabled</c:if>">
|
||||
<input type="hidden" name="cfgRegionValue" value="${region.configRegionValue }">
|
||||
<input type="hidden" name="cfgRegionType" value="${region.regionType }">
|
||||
<input type="hidden" name="cfgRegionCode1" value="${region.configRegionCode }">
|
||||
<%@include file="/WEB-INF/views/cfg/app/appFeatureProp.jsp"%>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<c:if test="${region.regionType eq 2 }">
|
||||
<c:set var="tabName" value="${region.configRegionValue}Tab"></c:set>
|
||||
<h4 class="form-section">
|
||||
<spring:message code="${region.configRegionValue}" />
|
||||
<small> <span
|
||||
class="glyphicon glyphicon-plus ${tabName}Add"
|
||||
class="glyphicon glyphicon-plus ${tabName}Add <c:if test="${fn:length(regionList)==1 or status.index==0}"> hidden</c:if>"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -741,7 +741,6 @@
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.2 ,// 透明度
|
||||
data: (function () {
|
||||
var data = [];
|
||||
if(sipResult!=null&&sipResult.length>0){
|
||||
@@ -777,7 +776,6 @@
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.2, // 透明度
|
||||
data: (function () {
|
||||
var data = [];
|
||||
if(dipResult!=null&&dipResult.length>0){
|
||||
@@ -812,51 +810,48 @@
|
||||
s2cResult=intData.s2cResult;
|
||||
totalResult=intData.totalResult;
|
||||
|
||||
zxchart=[
|
||||
{
|
||||
name: 'total',
|
||||
lineColor:'#709c58',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.2, // 透明度
|
||||
data: (function () {
|
||||
var data = [];
|
||||
if(totalResult!=null&&totalResult.length>0){
|
||||
var count=10;
|
||||
if(totalResult.length<10){
|
||||
count=totalResult.length;
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
var d =totalResult[i];
|
||||
var x = d[0], // 当前时间
|
||||
y = d[1];
|
||||
data.push({
|
||||
x: x,
|
||||
y: y
|
||||
});
|
||||
}
|
||||
}else{
|
||||
var time = (new Date()).getTime()-(1000 * 60 * 10+1000 * 60 * 5);
|
||||
for (var i = 0; i <10; i++) {
|
||||
data.push({
|
||||
x: time + i * 1000*60,
|
||||
y: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}())
|
||||
},
|
||||
{
|
||||
name: 's2c',
|
||||
lineColor:'#c9a206',
|
||||
zxchart=[{
|
||||
name: 'c2s',
|
||||
lineColor:'#a9d4cf',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
data: (function () {
|
||||
var data = [];
|
||||
if(c2sResult!=null&&c2sResult.length>0){
|
||||
var count=10;
|
||||
if(c2sResult.length<10){
|
||||
count=c2sResult.length;
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
var d =c2sResult[i];
|
||||
var x = d[0], // 时间
|
||||
y = d[1];
|
||||
data.push({
|
||||
x: x,
|
||||
y: y
|
||||
});
|
||||
}
|
||||
} else{
|
||||
var time = (new Date()).getTime()-(1000 * 60 * 10+1000 * 60 * 5);
|
||||
for (var i = 0; i <10; i++) {
|
||||
data.push({
|
||||
x: time + i * 1000*60,
|
||||
y: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}())
|
||||
},
|
||||
{
|
||||
name: 's2c',
|
||||
lineColor:'#eecf8d',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.15, // 透明度
|
||||
data: (function () {
|
||||
var data = [];
|
||||
if(s2cResult!=null&&s2cResult.length>0){
|
||||
@@ -885,31 +880,30 @@
|
||||
return data;
|
||||
}())
|
||||
},
|
||||
{
|
||||
name: 'c2s',
|
||||
lineColor:'#64b5c5',
|
||||
{
|
||||
name: 'total',
|
||||
lineColor:'#ebb093',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.1, // 透明度
|
||||
data: (function () {
|
||||
var data = [];
|
||||
if(c2sResult!=null&&c2sResult.length>0){
|
||||
var count=10;
|
||||
if(c2sResult.length<10){
|
||||
count=c2sResult.length;
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
var d =c2sResult[i];
|
||||
var x = d[0], // 时间
|
||||
y = d[1];
|
||||
if(totalResult!=null&&totalResult.length>0){
|
||||
var count=10;
|
||||
if(totalResult.length<10){
|
||||
count=totalResult.length;
|
||||
}
|
||||
for (var i = 0; i < count; i++) {
|
||||
var d =totalResult[i];
|
||||
var x = d[0], // 当前时间
|
||||
y = d[1];
|
||||
data.push({
|
||||
x: x,
|
||||
y: y
|
||||
});
|
||||
}
|
||||
} else{
|
||||
}else{
|
||||
var time = (new Date()).getTime()-(1000 * 60 * 10+1000 * 60 * 5);
|
||||
for (var i = 0; i <10; i++) {
|
||||
data.push({
|
||||
@@ -917,11 +911,10 @@
|
||||
y: 0
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}())
|
||||
}
|
||||
]
|
||||
}]
|
||||
}
|
||||
|
||||
var nowDate=new Date();
|
||||
@@ -963,9 +956,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// colors:['#a9d4cf','#eecf8d','#ebb093'],
|
||||
colors:['#709c58','#c9a206','#64b5c5'],
|
||||
colors:['#a9d4cf','#eecf8d','#ebb093'],
|
||||
title : {
|
||||
text : (function () {
|
||||
var timebe=(new Date().getTime())-(1000 * 60 * 6);
|
||||
@@ -999,7 +990,7 @@
|
||||
},
|
||||
yAxis : {
|
||||
title : {
|
||||
text : unitType
|
||||
text : null
|
||||
},
|
||||
min:0,
|
||||
allowDecimals:false
|
||||
@@ -1028,8 +1019,7 @@
|
||||
radius : 7,
|
||||
radiusPlus : 5
|
||||
}
|
||||
},
|
||||
// fillOpacity: 0.2 // 透明度
|
||||
}
|
||||
}
|
||||
},
|
||||
series: zxchart
|
||||
@@ -1083,12 +1073,12 @@
|
||||
var s2cRes=realTimeData.s2cResult;
|
||||
var totalRes=realTimeData.totalResult;
|
||||
|
||||
var s =totalRes[0];
|
||||
series.addPoint([s[0], s[1]], true, true);
|
||||
var d =c2sRes[0];
|
||||
series.addPoint([d[0], d[1]], true, true);
|
||||
var t =s2cRes[0];
|
||||
series1.addPoint([t[0], t[1]], true, true);
|
||||
var d =c2sRes[0];
|
||||
series2.addPoint([d[0], d[1]], true, true);
|
||||
var s =totalRes[0];
|
||||
series2.addPoint([s[0], s[1]], true, true);
|
||||
}
|
||||
|
||||
}else{
|
||||
@@ -1138,8 +1128,7 @@
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.2 // 透明度
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '<spring:message code="server_ip"/>',
|
||||
@@ -1148,42 +1137,35 @@
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.2 // 透明度
|
||||
}
|
||||
}]
|
||||
}else{
|
||||
lsChart= [
|
||||
{
|
||||
name: 'total',
|
||||
data: totalResult,
|
||||
// lineColor:'#D9853A',
|
||||
lineColor:'#709c58',
|
||||
lsChart= [{
|
||||
name: 'c2s',
|
||||
data: c2sResult,
|
||||
lineColor:'#a9d4cf',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.2 // 透明度
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 's2c',
|
||||
data: s2cResult,
|
||||
// lineColor:'#EAB33B',
|
||||
lineColor:'#c9a206',
|
||||
lineColor:'#eecf8d',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.15 // 透明度
|
||||
},{
|
||||
name: 'c2s',
|
||||
data: c2sResult,
|
||||
// lineColor:'#E5E2CD',
|
||||
lineColor:'#64b5c5',
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'total',
|
||||
data: totalResult,
|
||||
lineColor:'#ebb093',
|
||||
lineWidth:1,
|
||||
marker: {
|
||||
enabled: false
|
||||
},
|
||||
fillOpacity: 0.1 // 透明度
|
||||
}
|
||||
}]
|
||||
}
|
||||
|
||||
@@ -1217,8 +1199,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
// colors:['#EF843C','#EFCA6B','#6ED0E0'],
|
||||
colors:['#709c58','#c9a206','#64b5c5'],
|
||||
colors:['#a9d4cf','#eecf8d','#ebb093'],
|
||||
title : {
|
||||
text : '<spring:message code="${appName}"></spring:message> '+$("#beginDateh").val()+'--'+$("#endDateh").val()+''
|
||||
},
|
||||
@@ -1243,7 +1224,7 @@
|
||||
},
|
||||
yAxis : {
|
||||
title : {
|
||||
text : unitType
|
||||
text : null
|
||||
},
|
||||
min:0,
|
||||
allowDecimals:false
|
||||
@@ -1272,8 +1253,7 @@
|
||||
radius : 7,
|
||||
radiusPlus : 5
|
||||
}
|
||||
},
|
||||
// fillOpacity: 0.2 // 透明度
|
||||
}
|
||||
}
|
||||
},
|
||||
series:lsChart
|
||||
|
||||
@@ -798,15 +798,6 @@ jQuery.validator.addMethod("portCheck",function(value, element) {
|
||||
}
|
||||
}
|
||||
});
|
||||
jQuery.validator.addMethod("sessionDPortCheck",function(value, element) {
|
||||
//port 1~65535
|
||||
if(this.optional(element)||(/^([1-9][0-9]{0,4})$/.test(value)&& RegExp.$1 <=65535)){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
jQuery.validator.addMethod("chooseAreaOrIsp",function(value, element) {
|
||||
var isp="";
|
||||
if($(element).is(":visible")){
|
||||
|
||||
@@ -90,7 +90,6 @@
|
||||
log_trend:"Log Trend",
|
||||
info:"Prompt",
|
||||
protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!",
|
||||
log_no_data:"This hour no data",
|
||||
sessionDPortCheck:"Port must between 1 and 65535"
|
||||
log_no_data:"This hour no data"
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
@@ -90,7 +90,6 @@
|
||||
log_trend:"Журнал Тенденция",
|
||||
info:"Инфо",
|
||||
protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!",
|
||||
log_no_data:"Нет данных за этот час",
|
||||
sessionDPortCheck:"Порт должен между 1 и 65535"
|
||||
log_no_data:"Нет данных за этот час"
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
@@ -90,7 +90,6 @@
|
||||
log_trend:"日志趋势",
|
||||
info:"提示",
|
||||
protect_warn:"该策略执行条件过于宽泛,会消耗较多的计算资源。慎用!",
|
||||
log_no_data:"本小时无数据",
|
||||
sessionDPortCheck:"端口应介于1到65535之间,数字不能以0开头"
|
||||
log_no_data:"本小时无数据"
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
@@ -1548,14 +1548,10 @@ var validCharLength=function(){
|
||||
$(this).find(".tag").each(function(){
|
||||
text+=$(this).children("span").text().trim();
|
||||
});
|
||||
if(text.length < 4 || text.length > 1024 && (!sessionTagsFlag)){
|
||||
// APP特征配置Session组件tagsInput不校验字符长度
|
||||
var sessionTagsFlag = $(this).prev().hasClass("c2sAndS2cInput");
|
||||
if((text.length < 4 || text.length > 1024) && (!sessionTagsFlag)){
|
||||
$(this).parents(".col-md-6").next("div").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.keywordLength+"</label>");
|
||||
if(flag){
|
||||
flag=false;
|
||||
}
|
||||
if(text.length < 4 || text.length > 1024){
|
||||
$(this).parents(".col-md-6").next("div").html("<label id=\"cfgKeywordsError\" class=\"error\">"+$.validator.messages.keywordLength+"</label>");
|
||||
if(flag){
|
||||
flag=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user