appsession组件 特征组件,管控组件
This commit is contained in:
@@ -44,23 +44,43 @@ public class AppComplexFeatureCfg extends BaseCfg<AppComplexFeatureCfg> {
|
||||
private List<AppIpCfg> ipPortList = new ArrayList();
|
||||
private String cfgRegionCode1;
|
||||
//以下参数为APP PAYLOAD L3_HEADER的特殊属性(使用偏移表达式处理)
|
||||
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;
|
||||
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:传输服务端端口
|
||||
|
||||
//以下参数为APP payload payload的特殊属性(偏移量表达式时处理)
|
||||
private Integer payloadOffset;
|
||||
private Integer payloadSize;//下发综合服务接口时,为单独的域配置
|
||||
private String payloadPacketDirection;//下发综合服务接口时,为单独的域配置
|
||||
|
||||
private Integer payloadOffset; // s:session size min
|
||||
private Integer payloadSize;//下发综合服务接口时,为单独的域配置 // s:session size max
|
||||
private String payloadPacketDirection;//下发综合服务接口时,为单独的域配置 // s:清洗标识
|
||||
|
||||
private String sessionC2sRadio;
|
||||
private String sessionS2cRadio;
|
||||
|
||||
|
||||
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,6 +8,9 @@
|
||||
*/
|
||||
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;
|
||||
@@ -38,6 +41,10 @@ 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();
|
||||
|
||||
/**
|
||||
* 表达式类型
|
||||
*/
|
||||
@@ -71,6 +78,22 @@ 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,7 +11,6 @@ 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;
|
||||
|
||||
|
||||
@@ -37,8 +36,12 @@ 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 ;
|
||||
@@ -194,4 +197,23 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
|
||||
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,7 +1,8 @@
|
||||
|
||||
package com.nis.domain.configuration;
|
||||
|
||||
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.annotations.Expose;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
@@ -42,6 +43,9 @@ 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();
|
||||
|
||||
|
||||
/**
|
||||
* 方向
|
||||
@@ -71,6 +75,18 @@ 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
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.nis.web.controller.configuration;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@@ -12,52 +11,25 @@ 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.AppHeaderCfg;
|
||||
import com.nis.domain.configuration.AppHttpCfg;
|
||||
import com.nis.domain.configuration.AppFeatureProperties;
|
||||
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;
|
||||
@@ -110,15 +82,24 @@ public class AppFeatureCfgController extends BaseController {
|
||||
appMultiFeatureCfgService.getAppIpRangeCfg(entity.getCompileId(), entity.getFunctionId()));
|
||||
entity.setStrList(appMultiFeatureCfgService.getAppStringFeatureCfg(entity.getCompileId(),
|
||||
entity.getFunctionId(), null));
|
||||
entity.setComplexList(appMultiFeatureCfgService.getAppComplexFeatureCfg(entity.getCompileId(),
|
||||
entity.getFunctionId(), null));
|
||||
entity.setComplexList(appMultiFeatureCfgService.getAppComplexFeatureCfgNotRegionCode(entity.getCompileId(),
|
||||
entity.getFunctionId(), 6));
|
||||
entity.setSessionList(appMultiFeatureCfgService.getAppComplexFeatureCfg(entity.getCompileId(),
|
||||
entity.getFunctionId(), 6));
|
||||
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);
|
||||
return "/cfg/app/appMultiFeatureCfgForm";
|
||||
}
|
||||
|
||||
@@ -269,8 +250,26 @@ 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");
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
// 获取所有响应策略信息
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -272,7 +272,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">
|
||||
<if test="flag!=null and flag != ''">
|
||||
and ud_flag=#{flag}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
@@ -1,34 +1,16 @@
|
||||
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.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.AppFeatureProperties;
|
||||
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;
|
||||
|
||||
|
||||
@@ -59,6 +41,8 @@ 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);
|
||||
|
||||
@@ -71,4 +55,11 @@ 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,6 +118,12 @@
|
||||
<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" >
|
||||
@@ -181,6 +187,36 @@
|
||||
<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,
|
||||
@@ -206,6 +242,7 @@
|
||||
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>
|
||||
@@ -511,6 +548,16 @@
|
||||
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">
|
||||
@@ -653,5 +700,39 @@
|
||||
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>
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.nis.web.service.configuration;
|
||||
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
@@ -14,12 +13,11 @@ 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;
|
||||
@@ -28,9 +26,7 @@ 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;
|
||||
@@ -50,11 +46,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;
|
||||
@@ -86,6 +82,73 @@ 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"));
|
||||
|
||||
@@ -17,17 +17,10 @@ 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.AppHttpCfg;
|
||||
import com.nis.domain.configuration.AppFeatureProperties;
|
||||
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;
|
||||
@@ -39,7 +32,6 @@ 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;
|
||||
@@ -151,6 +143,31 @@ 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){
|
||||
@@ -160,6 +177,13 @@ 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();
|
||||
@@ -176,6 +200,7 @@ 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){
|
||||
@@ -235,6 +260,31 @@ 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){
|
||||
@@ -243,9 +293,82 @@ 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.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.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getUserRegion4())) {
|
||||
keyword += "SINGLE_CERT" + Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getUserRegion5())) {
|
||||
keyword += "SELF_ISSUED" + 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")){
|
||||
@@ -334,7 +457,8 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
strRegionList=map.get("dstList");
|
||||
}
|
||||
}
|
||||
List<AppComplexFeatureCfg> complexList = appMultiFeatureCfgDao.getAppComplexFeatureCfg(entity.getCompileId(),entity.getFunctionId(),null);
|
||||
//List<AppComplexFeatureCfg> complexList = appMultiFeatureCfgDao.getAppComplexFeatureCfg(entity.getCompileId(),entity.getFunctionId(),null);
|
||||
List<AppComplexFeatureCfg> complexList = appMultiFeatureCfgDao.getAppComplexFeatureCfgNotRegionCode(entity.getCompileId(),entity.getFunctionId(),6);
|
||||
if(complexList!=null && complexList.size()>0){
|
||||
AppComplexFeatureCfg cfg = new AppComplexFeatureCfg();
|
||||
BeanUtils.copyProperties(entity, cfg, new String[]{"cfgId"});
|
||||
@@ -381,6 +505,116 @@ 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() + 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() + 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();
|
||||
@@ -393,6 +627,39 @@ 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();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 构造提交综合服务参数格式,一条配置提交一次综合服务
|
||||
if (isAudit == 1) {
|
||||
maatCfg.initDefaultValue();
|
||||
@@ -415,7 +682,10 @@ 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());
|
||||
@@ -487,9 +757,21 @@ 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){
|
||||
@@ -507,7 +789,11 @@ 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());
|
||||
|
||||
@@ -1504,4 +1504,17 @@ urlGroup=Http URL Group
|
||||
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
|
||||
dns_keyword_group_configuration=DNS 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
|
||||
|
||||
@@ -1506,4 +1506,17 @@ urlGroup=Http URL Group
|
||||
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
|
||||
dns_keyword_group_configuration=DNS Group Config
|
||||
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=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
|
||||
|
||||
@@ -1500,4 +1500,18 @@ urlGroup=Http URL \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
|
||||
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
|
||||
|
||||
|
||||
45
src/main/resources/sql/20190215/add_app_correlation_ip.sql
Normal file
45
src/main/resources/sql/20190215/add_app_correlation_ip.sql
Normal file
@@ -0,0 +1,45 @@
|
||||
--------------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` (`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);
|
||||
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);
|
||||
|
||||
15
src/main/resources/sql/20190215/add_function_region_dict.sql
Normal file
15
src/main/resources/sql/20190215/add_function_region_dict.sql
Normal file
@@ -0,0 +1,15 @@
|
||||
-- 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');
|
||||
@@ -0,0 +1,14 @@
|
||||
-- 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';
|
||||
@@ -40,6 +40,22 @@ $(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>
|
||||
@@ -168,7 +184,7 @@ $(function(){
|
||||
</div>
|
||||
</div>
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<c:if test="${_cfg.functionId eq region.functionId && region.regionType ne 9}">
|
||||
<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 }">
|
||||
@@ -363,7 +379,22 @@ $(function(){
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<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>
|
||||
</div>
|
||||
<input name="isAreaEffective" type="hidden" value="0">
|
||||
<%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp" %> --%>
|
||||
|
||||
203
src/main/webapp/WEB-INF/views/cfg/app/appFeatureProp.jsp
Normal file
203
src/main/webapp/WEB-INF/views/cfg/app/appFeatureProp.jsp
Normal file
@@ -0,0 +1,203 @@
|
||||
<%@ 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>
|
||||
614
src/main/webapp/WEB-INF/views/cfg/app/appFeatureSessionForm.jsp
Normal file
614
src/main/webapp/WEB-INF/views/cfg/app/appFeatureSessionForm.jsp
Normal file
@@ -0,0 +1,614 @@
|
||||
<%@ 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,6 +23,22 @@ $(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>
|
||||
@@ -53,7 +69,7 @@ $(function(){
|
||||
<input type="hidden" id="direction" name="direction" value="0">
|
||||
<!-- 配置域类型 -->
|
||||
<c:forEach items="${regionList}" var="region">
|
||||
<c:if test="${_cfg.functionId eq region.functionId}">
|
||||
<c:if test="${_cfg.functionId eq region.functionId && region.regionType ne 9}">
|
||||
<input type="hidden" name="cfgType" value="${region.configRegionValue}">
|
||||
<input type="hidden" name="cfgRegionCode"isMaat="${region.isMaat}"
|
||||
serviceType="${region.configServiceType}"
|
||||
@@ -258,6 +274,24 @@ $(function(){
|
||||
</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,7 +168,80 @@ $(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();
|
||||
@@ -341,6 +414,7 @@ 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 }">
|
||||
@@ -435,7 +509,7 @@ function changeKeywordFormate(exprType,obj){
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</c:if>
|
||||
<c:if test="${region.regionType eq 2 }">
|
||||
<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}" />
|
||||
@@ -443,6 +517,71 @@ function changeKeywordFormate(exprType,obj){
|
||||
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"
|
||||
onClick="addContent(this,'${tabName}')" title="add"></span></small>
|
||||
</h4>
|
||||
<c:set var="cfgName"
|
||||
value="strList[${strCfgIndex}]"></c:set>
|
||||
<%-- <c:set var="regionValue" value="${region.configRegionValue}"></c:set> --%>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -798,6 +798,15 @@ 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,6 +90,7 @@
|
||||
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"
|
||||
log_no_data:"This hour no data",
|
||||
sessionDPortCheck:"Port must between 1 and 65535"
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
log_trend:"Журнал Тенденция",
|
||||
info:"Инфо",
|
||||
protect_warn:"Policy with relax precondition may consume too much resources.Use with cautions!",
|
||||
log_no_data:"Нет данных за этот час"
|
||||
log_no_data:"Нет данных за этот час",
|
||||
sessionDPortCheck:"Порт должен между 1 и 65535"
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
log_trend:"日志趋势",
|
||||
info:"提示",
|
||||
protect_warn:"该策略执行条件过于宽泛,会消耗较多的计算资源。慎用!",
|
||||
log_no_data:"本小时无数据"
|
||||
log_no_data:"本小时无数据",
|
||||
sessionDPortCheck:"端口应介于1到65535之间,数字不能以0开头"
|
||||
});
|
||||
}(jQuery));
|
||||
|
||||
@@ -1548,10 +1548,14 @@ var validCharLength=function(){
|
||||
$(this).find(".tag").each(function(){
|
||||
text+=$(this).children("span").text().trim();
|
||||
});
|
||||
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;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user