1.修改app payload特征,拆分L3_header为L3_header_IP,L3_header_ICMP,支持偏移量表达式;
2.域名统计界面的域名查询条件,去除id=0(Other)的域名查询; 3.通联关系日志的下拉列表查询条件,增select为空的条件,否则reset时,全部定位在了Other。
This commit is contained in:
@@ -55,6 +55,11 @@ public class AppComplexFeatureCfg extends BaseCfg<AppComplexFeatureCfg> {
|
||||
private String icmpCode;
|
||||
private String icmpIdentifier;
|
||||
private String headerType;
|
||||
//以下参数为APP payload payload的特殊属性(偏移量表达式时处理)
|
||||
private Integer payloadOffset;
|
||||
private Integer payloadSize;//下发综合服务接口时,为单独的域配置
|
||||
private String payloadPacketDirection;//下发综合服务接口时,为单独的域配置
|
||||
|
||||
|
||||
public String getCfgRegionCode1() {
|
||||
return cfgRegionCode1;
|
||||
@@ -299,5 +304,28 @@ public class AppComplexFeatureCfg extends BaseCfg<AppComplexFeatureCfg> {
|
||||
this.headerType = headerType;
|
||||
}
|
||||
|
||||
public Integer getPayloadOffset() {
|
||||
return payloadOffset;
|
||||
}
|
||||
|
||||
public void setPayloadOffset(Integer payloadOffset) {
|
||||
this.payloadOffset = payloadOffset;
|
||||
}
|
||||
|
||||
public Integer getPayloadSize() {
|
||||
return payloadSize;
|
||||
}
|
||||
|
||||
public void setPayloadSize(Integer payloadSize) {
|
||||
this.payloadSize = payloadSize;
|
||||
}
|
||||
|
||||
public String getPayloadPacketDirection() {
|
||||
return payloadPacketDirection;
|
||||
}
|
||||
|
||||
public void setPayloadPacketDirection(String payloadPacketDirection) {
|
||||
this.payloadPacketDirection = payloadPacketDirection;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -46,6 +46,12 @@ public class AppFeatureIndex extends BaseCfg<AppFeatureIndex> {
|
||||
private String cfgRegionType;
|
||||
private String cfgRegionValue;
|
||||
private String cfgRegionCode1;
|
||||
private Integer isDrop;//
|
||||
private Integer isLoop;
|
||||
private Integer dropTime;//drop持续时间,默认180s,0-1800s
|
||||
private Integer loopTime;//loop持续时间,默认180s,0-1800s
|
||||
private Integer isRelation;
|
||||
private Integer relationTime;//关联持续时间,默认10s,0-180s
|
||||
public static String getTablename() {
|
||||
return tableName;
|
||||
}
|
||||
@@ -133,5 +139,59 @@ public class AppFeatureIndex extends BaseCfg<AppFeatureIndex> {
|
||||
public void setNumCfgList(List<AppTcpCfg> numCfgList) {
|
||||
this.numCfgList = numCfgList;
|
||||
}
|
||||
public Integer getExprType() {
|
||||
return exprType;
|
||||
}
|
||||
public void setExprType(Integer exprType) {
|
||||
this.exprType = exprType;
|
||||
}
|
||||
public Integer getMatchMethod() {
|
||||
return matchMethod;
|
||||
}
|
||||
public void setMatchMethod(Integer matchMethod) {
|
||||
this.matchMethod = matchMethod;
|
||||
}
|
||||
public Integer getIsHexbin() {
|
||||
return isHexbin;
|
||||
}
|
||||
public void setIsHexbin(Integer isHexbin) {
|
||||
this.isHexbin = isHexbin;
|
||||
}
|
||||
public Integer getIsDrop() {
|
||||
return isDrop;
|
||||
}
|
||||
public void setIsDrop(Integer isDrop) {
|
||||
this.isDrop = isDrop;
|
||||
}
|
||||
public Integer getIsLoop() {
|
||||
return isLoop;
|
||||
}
|
||||
public void setIsLoop(Integer isLoop) {
|
||||
this.isLoop = isLoop;
|
||||
}
|
||||
public Integer getDropTime() {
|
||||
return dropTime;
|
||||
}
|
||||
public void setDropTime(Integer dropTime) {
|
||||
this.dropTime = dropTime;
|
||||
}
|
||||
public Integer getLoopTime() {
|
||||
return loopTime;
|
||||
}
|
||||
public void setLoopTime(Integer loopTime) {
|
||||
this.loopTime = loopTime;
|
||||
}
|
||||
public Integer getIsRelation() {
|
||||
return isRelation;
|
||||
}
|
||||
public void setIsRelation(Integer isRelation) {
|
||||
this.isRelation = isRelation;
|
||||
}
|
||||
public Integer getRelationTime() {
|
||||
return relationTime;
|
||||
}
|
||||
public void setRelationTime(Integer relationTime) {
|
||||
this.relationTime = relationTime;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -115,6 +115,9 @@
|
||||
<result column="icmp_code" property="icmpCode" jdbcType="VARCHAR" />
|
||||
<result column="icmp_identifier" property="icmpIdentifier" jdbcType="VARCHAR" />
|
||||
<result column="header_type" property="headerType" jdbcType="VARCHAR" />
|
||||
<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" />
|
||||
</resultMap>
|
||||
<!-- APP字符串类配置映射 -->
|
||||
<resultMap id="AppStringFeatureCfgMap" type="com.nis.domain.configuration.AppStringFeatureCfg" >
|
||||
@@ -204,7 +207,7 @@
|
||||
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.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.header_type,r.payload_offset,r.payload_size,r.payload_packet_direction
|
||||
</sql>
|
||||
|
||||
<sql id="AppStringFeatureCfg_Column" >
|
||||
@@ -540,7 +543,8 @@
|
||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE,
|
||||
DISTRICT,CFG_KEYWORDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG,user_region1,user_region2,user_region3,user_region4,user_region5,
|
||||
ver,ihl,tos,total_length,flags,fragment_offset,protocol,icmp_type,icmp_code,icmp_identifier,header_type
|
||||
ver,ihl,tos,total_length,flags,fragment_offset,protocol,icmp_type,icmp_code,icmp_identifier,header_type,
|
||||
payload_offset,payload_size,payload_packet_direction
|
||||
)values (
|
||||
<include refid="AppCommonCfg_Value_List" />,
|
||||
#{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},
|
||||
@@ -550,7 +554,8 @@
|
||||
#{userRegion3,jdbcType=VARCHAR},#{userRegion4,jdbcType=VARCHAR},#{userRegion5,jdbcType=VARCHAR},
|
||||
#{ver,jdbcType=VARCHAR},#{ihl,jdbcType=VARCHAR},#{tos,jdbcType=VARCHAR},#{totalLength,jdbcType=VARCHAR},
|
||||
#{flags,jdbcType=VARCHAR},#{fragmentOffset,jdbcType=VARCHAR},#{protocol,jdbcType=VARCHAR},#{icmpType,jdbcType=VARCHAR},
|
||||
#{icmpCode,jdbcType=VARCHAR},#{icmpIdentifier,jdbcType=VARCHAR},#{headerType,jdbcType=VARCHAR}
|
||||
#{icmpCode,jdbcType=VARCHAR},#{icmpIdentifier,jdbcType=VARCHAR},#{headerType,jdbcType=VARCHAR},
|
||||
#{payloadOffset,jdbcType=INTEGER},#{payloadSize,jdbcType=INTEGER},#{payloadPacketDirection,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@@ -562,7 +567,8 @@
|
||||
SERVICE_ID,REQUEST_ID,COMPILE_ID,IS_AREA_EFFECTIVE,CLASSIFY,
|
||||
ATTRIBUTE,LABLE,AREA_EFFECTIVE_IDS,FUNCTION_ID,CFG_TYPE,CFG_REGION_CODE,
|
||||
DISTRICT,CFG_KEYWORDS,EXPR_TYPE,MATCH_METHOD,IS_HEXBIN,DO_LOG,user_region1,user_region2,user_region3,user_region4,user_region5,
|
||||
ver,ihl,tos,total_length,flags,fragment_offset,protocol,icmp_type,icmp_code,icmp_identifier,header_type
|
||||
ver,ihl,tos,total_length,flags,fragment_offset,protocol,icmp_type,icmp_code,icmp_identifier,header_type,
|
||||
payload_offset,payload_size,payload_packet_direction
|
||||
)values (
|
||||
<include refid="AppCommonCfg_Value_List" />,
|
||||
#{cfgType,jdbcType=VARCHAR},#{cfgRegionCode,jdbcType=INTEGER},
|
||||
@@ -572,7 +578,8 @@
|
||||
#{userRegion3,jdbcType=VARCHAR},#{userRegion4,jdbcType=VARCHAR},#{userRegion5,jdbcType=VARCHAR},
|
||||
#{ver,jdbcType=VARCHAR},#{ihl,jdbcType=VARCHAR},#{tos,jdbcType=VARCHAR},#{totalLength,jdbcType=VARCHAR},
|
||||
#{flags,jdbcType=VARCHAR},#{fragmentOffset,jdbcType=VARCHAR},#{protocol,jdbcType=VARCHAR},#{icmpType,jdbcType=VARCHAR},
|
||||
#{icmpCode,jdbcType=VARCHAR},#{icmpIdentifier,jdbcType=VARCHAR},#{headerType,jdbcType=VARCHAR}
|
||||
#{icmpCode,jdbcType=VARCHAR},#{icmpIdentifier,jdbcType=VARCHAR},#{headerType,jdbcType=VARCHAR},
|
||||
#{payloadOffset,jdbcType=INTEGER},#{payloadSize,jdbcType=INTEGER},#{payloadPacketDirection,jdbcType=VARCHAR}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
@@ -100,7 +100,14 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
if(entity.getStrList()!=null){
|
||||
for(AppStringFeatureCfg cfg:entity.getStrList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin"});
|
||||
if(cfg.getExprType()==null){
|
||||
if(cfg.getCfgKeywords().contains(Constants.KEYWORD_EXPR)){
|
||||
cfg.setExprType(1);//与表达式
|
||||
}else{
|
||||
cfg.setExprType(0);//无表达式
|
||||
}
|
||||
}
|
||||
appMultiFeatureCfgDao.insertAppStringFeatureCfg(cfg);
|
||||
}
|
||||
|
||||
@@ -108,8 +115,8 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
}
|
||||
if(entity.getComplexList()!=null){
|
||||
for(AppComplexFeatureCfg cfg:entity.getComplexList()){
|
||||
if(StringUtils.isNotBlank(cfg.getDistrict()) && cfg.getDistrict().equals("L3_header")){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
if(StringUtils.isNotBlank(cfg.getDistrict()) && (cfg.getDistrict().equals("L3_header_IP")||cfg.getDistrict().equals("L3_header_ICMP"))){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin"});
|
||||
cfg.setIsHexbin(1);
|
||||
cfg.setIsCaseInsenstive(0);
|
||||
cfg.setExprType(3);
|
||||
@@ -117,9 +124,28 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
this.setL3HeaderKeyword(cfg);
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
|
||||
}else if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
}else if(StringUtils.isNotBlank(cfg.getDistrict()) && cfg.getDistrict().equals("Payload") && cfg.getExprType()==3){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin"});
|
||||
cfg.setIsHexbin(1);
|
||||
cfg.setIsCaseInsenstive(0);
|
||||
cfg.setExprType(3);
|
||||
cfg.setMatchMethod(0);
|
||||
cfg.setHeaderType(null);
|
||||
//设置payload特征的偏移量表达之关键字字符串
|
||||
cfg.setCfgKeywords(cfg.getPayloadOffset()+"-"+cfg.getCfgKeywords().length()/2+":"+cfg.getCfgKeywords());
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
|
||||
}else if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin"});
|
||||
cfg.setHeaderType(null);
|
||||
if(cfg.getExprType()==null){
|
||||
if(cfg.getCfgKeywords().contains(Constants.KEYWORD_EXPR)){
|
||||
cfg.setExprType(1);//与表达式
|
||||
}else{
|
||||
cfg.setExprType(0);//无表达式
|
||||
}
|
||||
}
|
||||
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
}
|
||||
|
||||
@@ -161,15 +187,22 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
if(entity.getStrList()!=null){
|
||||
for(AppStringFeatureCfg cfg:entity.getStrList()){
|
||||
if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin"});
|
||||
if(cfg.getExprType()==null){
|
||||
if(cfg.getCfgKeywords().contains(Constants.KEYWORD_EXPR)){
|
||||
cfg.setExprType(1);//与表达式
|
||||
}else{
|
||||
cfg.setExprType(0);//无表达式
|
||||
}
|
||||
}
|
||||
appMultiFeatureCfgDao.insertAppStringFeatureCfg(cfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(entity.getComplexList()!=null){
|
||||
for(AppComplexFeatureCfg cfg:entity.getComplexList()){
|
||||
if(StringUtils.isNotBlank(cfg.getDistrict()) && cfg.getDistrict().equals("L3_header")){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
if(StringUtils.isNotBlank(cfg.getDistrict()) && (cfg.getDistrict().equals("L3_header_IP")||cfg.getDistrict().equals("L3_header_ICMP"))){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin"});
|
||||
cfg.setIsHexbin(1);
|
||||
cfg.setIsCaseInsenstive(0);
|
||||
cfg.setExprType(3);
|
||||
@@ -177,9 +210,27 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
this.setL3HeaderKeyword(cfg);
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
|
||||
}else if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
|
||||
}else if(StringUtils.isNotBlank(cfg.getDistrict()) && cfg.getDistrict().equals("Payload") && cfg.getExprType()==3){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin"});
|
||||
cfg.setIsHexbin(1);
|
||||
cfg.setIsCaseInsenstive(0);
|
||||
cfg.setExprType(3);
|
||||
cfg.setMatchMethod(0);
|
||||
cfg.setHeaderType(null);
|
||||
//设置payload特征的偏移量表达之关键字字符串
|
||||
cfg.setCfgKeywords(cfg.getPayloadOffset()+"-"+cfg.getCfgKeywords().length()/2+":"+cfg.getCfgKeywords());
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
|
||||
}else if(StringUtils.isNotBlank(cfg.getCfgKeywords())){
|
||||
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType","exprType","matchMethod","isHexbin"});
|
||||
cfg.setHeaderType(null);
|
||||
if(cfg.getExprType()==null){
|
||||
if(cfg.getCfgKeywords().contains(Constants.KEYWORD_EXPR)){
|
||||
cfg.setExprType(1);//与表达式
|
||||
}else{
|
||||
cfg.setExprType(0);//无表达式
|
||||
}
|
||||
}
|
||||
appMultiFeatureCfgDao.insertAppComplexFeatureCfg(cfg);
|
||||
}
|
||||
}
|
||||
@@ -197,37 +248,38 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
|
||||
public void setL3HeaderKeyword(AppComplexFeatureCfg cfg) {
|
||||
String keyword = "";
|
||||
if(cfg.getHeaderType().equals("IP_header")){
|
||||
if(StringUtils.isNoneBlank(cfg.getVer())){
|
||||
if(cfg.getHeaderType().equals("L3_header_IP")){
|
||||
/*if(StringUtils.isNoneBlank(cfg.getVer())){
|
||||
keyword += "0-3:"+cfg.getVer()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getIhl())){
|
||||
keyword += "4-7:"+cfg.getIhl()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
}*/
|
||||
if(StringUtils.isNotBlank(cfg.getTos())){
|
||||
keyword += "8-15:"+cfg.getTos()+Constants.KEYWORD_EXPR;
|
||||
keyword += "1-2:"+cfg.getTos()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getTotalLength())){
|
||||
keyword += "16-31:"+cfg.getTotalLength()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getFlags())){
|
||||
keyword += "48-50:"+cfg.getFlags()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getFragmentOffset())){
|
||||
keyword += "56-63:"+cfg.getFragmentOffset()+Constants.KEYWORD_EXPR;
|
||||
keyword += "2-4:"+cfg.getTotalLength()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getProtocol())){
|
||||
keyword += "72-79:"+cfg.getProtocol()+Constants.KEYWORD_EXPR;
|
||||
keyword += "9-10:"+cfg.getProtocol()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getFragmentOffset())){//记录IP头的客户端IP
|
||||
keyword += "12-16:"+cfg.getFragmentOffset()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getFlags())){//记录IP头的服务端IP
|
||||
keyword += "16-20:"+cfg.getFlags()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
|
||||
}else{
|
||||
if(StringUtils.isNoneBlank(cfg.getIcmpType())){
|
||||
keyword += "0-7:"+cfg.getIcmpType()+Constants.KEYWORD_EXPR;
|
||||
keyword += "0-1:"+cfg.getIcmpType()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getIcmpCode())){
|
||||
keyword += "8-15:"+cfg.getIcmpCode()+Constants.KEYWORD_EXPR;
|
||||
keyword += "1-2:"+cfg.getIcmpCode()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
if(StringUtils.isNotBlank(cfg.getIcmpIdentifier())){
|
||||
keyword += "32-47:"+cfg.getIcmpIdentifier()+Constants.KEYWORD_EXPR;
|
||||
keyword += "4-6:"+cfg.getIcmpIdentifier()+Constants.KEYWORD_EXPR;
|
||||
}
|
||||
}
|
||||
keyword=keyword.substring(0,keyword.lastIndexOf(Constants.KEYWORD_EXPR));
|
||||
@@ -289,9 +341,44 @@ public class AppMultiFeatureCfgService extends BaseService {
|
||||
cfg.setTableName(AppComplexFeatureCfg.getTablename());
|
||||
appMultiFeatureCfgDao.auditCfg(cfg);
|
||||
if(isAudit==1){
|
||||
//如果是payload特征,需要判断匹配区域是否为Payload,并且判断包大小或者本包方向,如果不为空,需要创建域配置
|
||||
if(entity.getServiceId().equals(1025)){//app payload特征
|
||||
for(AppComplexFeatureCfg c:complexList){
|
||||
if(c.getDistrict().equals("Payload")){
|
||||
//payload特征的payloadSize,payloadPacketDirection两个参数各自为单独的域配置下发
|
||||
if(c.getPayloadSize()!=null){
|
||||
AppComplexFeatureCfg payloadSizeCfg = new AppComplexFeatureCfg();
|
||||
BeanUtils.copyProperties(c, payloadSizeCfg, new String[]{"cfgId"});
|
||||
payloadSizeCfg.setCfgKeywords(c.getPayloadSize().toString());
|
||||
payloadSizeCfg.setCfgType("APP_PAYLOAD_SIZE");//综合服务前端redis表名
|
||||
payloadSizeCfg.setDistrict(null);
|
||||
payloadSizeCfg.setExprType(0);;
|
||||
payloadSizeCfg.setMatchMethod(3);
|
||||
payloadSizeCfg.setIsHexbin(0);
|
||||
complexList.add(payloadSizeCfg);
|
||||
}
|
||||
if(c.getPayloadPacketDirection()!=null){
|
||||
AppComplexFeatureCfg packetDirectionCfg = new AppComplexFeatureCfg();
|
||||
BeanUtils.copyProperties(c, packetDirectionCfg, new String[]{"cfgId"});
|
||||
packetDirectionCfg.setCfgKeywords(c.getPayloadPacketDirection().toString());
|
||||
packetDirectionCfg.setCfgType("APP_PKT_SEQ");//综合服务前端redis表名
|
||||
packetDirectionCfg.setDistrict(null);
|
||||
packetDirectionCfg.setExprType(0);;
|
||||
packetDirectionCfg.setMatchMethod(3);
|
||||
packetDirectionCfg.setIsHexbin(0);
|
||||
complexList.add(packetDirectionCfg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Map<String,List> map = cfgConvert(strRegionList,complexList,2,entity,groupRelationList);
|
||||
groupRelationList=map.get("groupList");
|
||||
strRegionList=map.get("dstList");
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
List<AppTcpCfg> numCfgList = appMultiFeatureCfgDao.getAppTcpCfg(entity.getCompileId(),entity.getFunctionId(),null);
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
-- <20><EFBFBD>app payload<61><64><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD>
|
||||
UPDATE `function_region_dict` SET `dict_id`='212', `function_id`='563', `config_district`='Payload,L2_header,L3_header_IP,L3_header_ICMP', `config_region_code`='3', `config_region_value`='APP_PAYLOAD', `config_desc`='APP<EFBFBD>غ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', `is_valid`='1', `is_maat`='1', `region_type`='3', `creator_id`=NULL, `create_time`='2018-09-21 19:29:46', `editor_id`=NULL, `edit_time`='2018-09-21 19:29:48', `config_service_type`='', `config_expr_type`='0,1,3', `config_match_method`='0,1,2,3', `config_ip_type`='', `config_hex`='0,1,2', `config_multi_keywords`='1', `config_ip_pattern`='', `config_port_pattern`='', `config_direction`='', `config_protocol`='', `config_ip_port_show`='', `config_region_sort`='2', `is_import`='0' WHERE (`dict_id`='212');
|
||||
UPDATE `function_region_dict` SET `dict_id`='213', `function_id`='563', `config_district`='Payload,L2_header,L3_header_IP,L3_header_ICMP', `config_region_code`='4', `config_region_value`='APP_PAYLOAD', `config_desc`='APP<EFBFBD>غ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', `is_valid`='1', `is_maat`='1', `region_type`='3', `creator_id`=NULL, `create_time`='2018-09-21 19:30:16', `editor_id`=NULL, `edit_time`='2018-09-21 19:30:20', `config_service_type`='', `config_expr_type`='0,1,3', `config_match_method`='0,1,2,3', `config_ip_type`='', `config_hex`='0,1,2', `config_multi_keywords`='1', `config_ip_pattern`='', `config_port_pattern`='', `config_direction`='', `config_protocol`='', `config_ip_port_show`='', `config_region_sort`='3', `is_import`='0' WHERE (`dict_id`='213');
|
||||
UPDATE `function_region_dict` SET `dict_id`='215', `function_id`='563', `config_district`='Payload,L2_header,L3_header,C2S_session_size,S2C_session_size', `config_region_code`='5', `config_region_value`='APP_PAYLOAD', `config_desc`='APP<EFBFBD>غ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>', `is_valid`='0', `is_maat`='1', `region_type`='3', `creator_id`=NULL, `create_time`='2018-09-21 19:30:16', `editor_id`=NULL, `edit_time`='2018-09-21 19:30:20', `config_service_type`='', `config_expr_type`='0,1', `config_match_method`='0,1,2,3', `config_ip_type`='', `config_hex`='0,1,2', `config_multi_keywords`='1', `config_ip_pattern`='', `config_port_pattern`='', `config_direction`='', `config_protocol`='', `config_ip_port_show`='', `config_region_sort`='4', `is_import`='0' WHERE (`dict_id`='215');
|
||||
|
||||
-- <20><><EFBFBD>ӱ<EFBFBD><D3B1><EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD>ֵ<EFBFBD><D6B5><EFBFBD>Ŀ
|
||||
INSERT INTO `sys_data_dictionary_item` ( `item_code`, `item_value`, `item_desc`, `item_sort`, `status`, `type`, `dictionary_id`) VALUES ('3', 'offset_expression', 'ƫ<EFBFBD>Ʊ<EFBFBD><EFBFBD><EFBFBD>ʽ', '3', '1', '1', '84');
|
||||
|
||||
--<EFBFBD>ؽ<EFBFBD>app ͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
drop table app_complex_feature_cfg;
|
||||
CREATE TABLE `app_complex_feature_cfg` (
|
||||
`cfg_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
`district` varchar(128) NOT NULL,
|
||||
`cfg_keywords` varchar(2048) NOT NULL,
|
||||
`app_code` int(11) NOT NULL,
|
||||
`behav_code` int(11) DEFAULT NULL,
|
||||
`spec_service_id` varchar(255) NOT NULL COMMENT 'specific_service_cfg .spec_service_id',
|
||||
`cfg_desc` varchar(128) DEFAULT NULL,
|
||||
`action` int(11) NOT NULL,
|
||||
`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 '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>sys_user.id',
|
||||
`edit_time` datetime DEFAULT NULL,
|
||||
`auditor_id` int(11) DEFAULT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>sys_user.id',
|
||||
`audit_time` datetime DEFAULT NULL,
|
||||
`service_id` int(11) NOT NULL COMMENT 'ҵ<EFBFBD><EFBFBD>id',
|
||||
`request_id` int(11) NOT NULL COMMENT '<EFBFBD><EFBFBD><EFBFBD><EFBFBD>request_info.id',
|
||||
`compile_id` int(11) NOT NULL,
|
||||
`is_area_effective` int(11) NOT NULL DEFAULT 0,
|
||||
`classify` varchar(128) DEFAULT NULL,
|
||||
`attribute` varchar(128) DEFAULT NULL,
|
||||
`lable` varchar(128) DEFAULT NULL,
|
||||
`area_effective_ids` varchar(1024) DEFAULT NULL,
|
||||
`function_id` int(11) NOT NULL,
|
||||
`cfg_type` varchar(64) NOT NULL DEFAULT '',
|
||||
`cfg_region_code` int(11) NOT NULL,
|
||||
`expr_type` int(11) NOT NULL DEFAULT 0 COMMENT '0<EFBFBD><EFBFBD><EFBFBD>ޱ<EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD>1<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ',
|
||||
`match_method` int(11) NOT NULL DEFAULT 3 COMMENT 'expr_type:0ʱ<30><CAB1><EFBFBD><EFBFBD><EFBFBD>壬<EFBFBD><E5A3AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>0<EFBFBD><30>0<EFBFBD><30><EFBFBD>Ӵ<EFBFBD>ƥ<EFBFBD>䣻1<E4A3BB><31><EFBFBD><EFBFBD>ƥ<EFBFBD>䣻2<E4A3BB><32><EFBFBD><EFBFBD>ƥ<EFBFBD>䣻3<E4A3BB><33><EFBFBD><EFBFBD>ȫƥ<C8AB><C6A5>',
|
||||
`is_hexbin` int(11) NOT NULL DEFAULT 0 COMMENT 'Ĭ<EFBFBD><EFBFBD>Ϊ0:<3A><>Сд<D0A1><D0B4><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><D0A3>ҷ<EFBFBD>HEX;1:HEX<45><58>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;2:<3A><>Сд<D0A1><D0B4><EFBFBD>У<EFBFBD><D0A3>ҷ<EFBFBD>HEX',
|
||||
`do_log` int(11) DEFAULT NULL,
|
||||
`user_region1` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1',
|
||||
`user_region2` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>2',
|
||||
`user_region3` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>3',
|
||||
`user_region4` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>4',
|
||||
`user_region5` varchar(1024) DEFAULT NULL COMMENT 'Ԥ<EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>5',
|
||||
`header_type` varchar(16) DEFAULT '',
|
||||
`ver` varchar(4) DEFAULT '',
|
||||
`ihl` varchar(4) DEFAULT '',
|
||||
`tos` varchar(16) DEFAULT '',
|
||||
`total_length` varchar(16) DEFAULT '',
|
||||
`flags` varchar(32) DEFAULT '',
|
||||
`fragment_offset` varchar(32) DEFAULT '',
|
||||
`protocol` varchar(32) DEFAULT '',
|
||||
`icmp_type` varchar(32) DEFAULT '',
|
||||
`icmp_code` varchar(32) DEFAULT '',
|
||||
`icmp_identifier` varchar(32) DEFAULT '',
|
||||
`payload_offset` int(11) DEFAULT NULL COMMENT 'payload<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƫ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
`payload_size` int(11) DEFAULT NULL COMMENT 'payload<EFBFBD><EFBFBD><EFBFBD><EFBFBD>С',
|
||||
`payload_packet_direction` varchar(8) DEFAULT NULL COMMENT 'payload<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
PRIMARY KEY (`cfg_id`) USING BTREE
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
@@ -9,9 +9,9 @@ $(function(){
|
||||
$("#serviceId").val($(this).attr("serviceId"));
|
||||
});
|
||||
$(".district").on("change", function() {
|
||||
if($(this).val()=='L3_header'){
|
||||
if($(this).val()=='L3_header_IP'||$(this).val()=='L3_header_ICMP'){
|
||||
$(this).parents(".boxSolid").find(".keywords").addClass("hidden");
|
||||
$(this).parents(".boxSolid").find(".L3_header").removeClass("hidden");
|
||||
$(this).parents(".boxSolid").find(".L3_header").find("input[name$='headerType']").val($(this).val());
|
||||
$(this).parents(".boxSolid").find(".matchMethod").addClass("hidden");
|
||||
$(this).parents(".boxSolid").find(".exprType").addClass("hidden");
|
||||
$(this).parents(".boxSolid").find("input:radio[name$='isHex'][value=1]").prop("checked",true);
|
||||
@@ -21,7 +21,7 @@ $(function(){
|
||||
$(this).parents(".boxSolid").find(".headerType").change();
|
||||
}else{
|
||||
$(this).parents(".boxSolid").find(".keywords").removeClass("hidden");
|
||||
$(this).parents(".boxSolid").find(".L3_header").addClass("hidden");
|
||||
$(this).parents(".boxSolid").find(".L3_header").find("input[name$='headerType']").val("");
|
||||
$(this).parents(".boxSolid").find(".matchMethod").removeClass("hidden");
|
||||
$(this).parents(".boxSolid").find(".exprType").removeClass("hidden");
|
||||
$(this).parents(".boxSolid").find(".IP_header").addClass("hidden");
|
||||
@@ -32,7 +32,7 @@ $(function(){
|
||||
});
|
||||
|
||||
$(".headerType").on("change", function() {
|
||||
if($(this).val()=='IP_header'){
|
||||
if($(this).val()=='L3_header_IP'){
|
||||
$(this).parents(".boxSolid").find(".ICMP_header").addClass("hidden");
|
||||
$(this).parents(".boxSolid").find(".IP_header").removeClass("hidden");
|
||||
}else{
|
||||
@@ -40,10 +40,24 @@ $(function(){
|
||||
$(this).parents(".boxSolid").find(".ICMP_header").removeClass("hidden");
|
||||
}
|
||||
});
|
||||
$("input:radio[name$='exprType']").on("change",function(){
|
||||
var exprType = $(this).val();
|
||||
changeKeywordFormate(exprType,$(this));
|
||||
});
|
||||
|
||||
$(".boxSolid:visible").find(".district").each(function(){
|
||||
$(this).change();
|
||||
});
|
||||
$("#serviceId").val($(".action:checked").attr("serviceId"));
|
||||
|
||||
if($("#serviceId").val()==1025 && $("#cfgId").val()!=null){
|
||||
$("input:radio[name$='exprType']").each(function(){
|
||||
if($(this).attr("checked") && $(this).val()==3){
|
||||
changeKeywordFormate($(this).val(),$(this));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("#cfgFrom").validate({
|
||||
errorPlacement: function(error,element){
|
||||
if($(element).parents().hasClass("tagsinput")){
|
||||
@@ -60,10 +74,9 @@ $(function(){
|
||||
return;
|
||||
}
|
||||
$(".boxSolid:visible").find("input[name$='cfgKeywords']").each(function(){
|
||||
|
||||
if($(this).val()==''){
|
||||
var length = 0;
|
||||
$(this).parents(".boxSolid").find(".l3_header_prop").each(function(){
|
||||
$(this).parents(".boxSolid").find(".l3_header_prop:visible").each(function(){
|
||||
if($(this).val()!=''){
|
||||
length += 1;
|
||||
}
|
||||
@@ -82,7 +95,7 @@ $(function(){
|
||||
|
||||
}else{
|
||||
var length = 0;
|
||||
$(this).parents(".boxSolid").find(".l3_header_prop").each(function(){
|
||||
$(this).parents(".boxSolid").find(".l3_header_prop:visible").each(function(){
|
||||
if($(this).val()!=''){
|
||||
length += 1;
|
||||
}
|
||||
@@ -139,7 +152,13 @@ $(function(){
|
||||
$(".disabled").each(function(){
|
||||
$(this).remove();
|
||||
});
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
|
||||
if($("input[name$='exprType']").attr("disabled")){
|
||||
$("input[name$='exprType']").attr("disabled",false);
|
||||
}
|
||||
/* $(".boxSolid:visible").each(function(){
|
||||
alert($(this).find("select[name$='matchMethod'] option[selected]").val());
|
||||
}) */
|
||||
$("#appCode").val($("#specServiceIdId").val());
|
||||
loading('onloading...');
|
||||
form.submit();
|
||||
@@ -172,6 +191,36 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
}); */
|
||||
$("." + addBtnClassName).removeClass("hidden");
|
||||
}
|
||||
function changeKeywordFormate(exprType,obj){
|
||||
if(exprType==3){
|
||||
var keywordObj = $(obj).parents(".boxSolid").find(".keywords").find("input[name$='cfgKeywords']");
|
||||
if($(keywordObj).val().indexOf("***and***")>0){
|
||||
$(keywordObj).val($(keywordObj).val().split('***and***').join(''));
|
||||
}
|
||||
if($(keywordObj).val().indexOf(":")>0){
|
||||
$(keywordObj).val($(keywordObj).val().substr($(keywordObj).val().indexOf(":")+1));
|
||||
}
|
||||
|
||||
//$(this).parents(".boxSolid").find(".keywords").addClass("hidden");
|
||||
//$(this).parents(".boxSolid").find(".keywords").find("input[name$='cfgKeywords']").attr("id").replace("tags","multipKeywords");
|
||||
$(obj).parents(".boxSolid").find(".keywords").find("input[name$='cfgKeywords']").css("display","block");
|
||||
$(obj).parents(".boxSolid").find(".keywords").find("input[name$='cfgKeywords']").addClass("hexCheck");
|
||||
$(obj).parents(".boxSolid").find(".keywords").find("input[name$='cfgKeywords']").next("div").addClass("hidden");
|
||||
$(obj).parents(".boxSolid").find(".offsetFeature").removeClass("hidden");
|
||||
$(obj).parents(".boxSolid").find("input:radio[name$='isHex'][value=1]").prop("checked",true);
|
||||
$(obj).parents(".boxSolid").find("input:radio[name$='isCaseSenstive'][value=0]").prop("checked",true);
|
||||
$(obj).parents(".boxSolid").find("input:radio[name$='isHex']").attr("disabled",true);
|
||||
$(obj).parents(".boxSolid").find("input:radio[name$='isCaseSenstive']").attr("disabled",true);
|
||||
}else{
|
||||
//$(this).parents(".boxSolid").find(".keywords").removeClass("hidden");
|
||||
//$(this).parents(".boxSolid").find(".keywords").find("input[name$='cfgKeywords']").attr("id").replace("multipKeywords","tags");
|
||||
$(obj).parents(".boxSolid").find(".keywords").find("input[name$='cfgKeywords']").css("display","none");
|
||||
$(obj).parents(".boxSolid").find(".keywords").find("input[name$='cfgKeywords']").next("div").removeClass("hidden");
|
||||
$(obj).parents(".boxSolid").find(".offsetFeature").addClass("hidden");
|
||||
$(obj).parents(".boxSolid").find("input:radio[name$='isHex']").attr("disabled",false);
|
||||
$(obj).parents(".boxSolid").find("input:radio[name$='isCaseSenstive']").attr("disabled",false);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -208,7 +257,7 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
<!-- BEGIN FORM-->
|
||||
<form id="cfgFrom" action="${ctx}/app/feature/saveAppMultiFeatureCfg"
|
||||
method="post" class="form-horizontal">
|
||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="cfgId" id="cfgId" value="${_cfg.cfgId}">
|
||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
|
||||
@@ -355,7 +404,7 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
<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/complexCfgForm.jsp"%>
|
||||
<%@include file="/WEB-INF/views/cfg/app/appCommonFeature.jsp"%>
|
||||
</div>
|
||||
<c:set var="isBreak" value="true"></c:set>
|
||||
<c:set var="complexCfgIndex"
|
||||
@@ -368,7 +417,7 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
<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/complexCfgForm.jsp"%>
|
||||
<%@include file="/WEB-INF/views/cfg/app/appCommonFeature.jsp"%>
|
||||
</div>
|
||||
<c:set var="complexCfgIndex" value="${complexCfgIndex+1 }"></c:set>
|
||||
</c:if>
|
||||
@@ -380,7 +429,7 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
<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/complexCfgForm.jsp"%>
|
||||
<%@include file="/WEB-INF/views/cfg/app/appCommonFeature.jsp"%>
|
||||
</div>
|
||||
<c:set var="complexCfgIndex" value="${complexCfgIndex+1 }"></c:set>
|
||||
</c:otherwise>
|
||||
@@ -407,7 +456,7 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
|
||||
<div
|
||||
class="row boxSolid ${tabName}${status.index}">
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
<%@include file="/WEB-INF/views/cfg/app/appCommonFeature.jsp"%>
|
||||
<input type="hidden" name="cfgRegionValue" value="${region.configRegionValue }">
|
||||
<input type="hidden" name="cfgRegionType" value="${region.regionType }">
|
||||
<input type="hidden" name="cfgRegionCode1" value="${region.configRegionCode }">
|
||||
@@ -421,7 +470,7 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
<c:if test="${!isBreak}">
|
||||
<div
|
||||
class="row boxSolid ${tabName}${status.index} hidden disabled">
|
||||
<%@include file="/WEB-INF/views/cfg/complexCfgForm.jsp"%>
|
||||
<%@include file="/WEB-INF/views/cfg/app/appCommonFeature.jsp"%>
|
||||
</div>
|
||||
<c:set var="strCfgIndex"
|
||||
value="${strCfgIndex+1 }"></c:set>
|
||||
@@ -434,7 +483,7 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
<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/complexCfgForm.jsp"%>
|
||||
<%@include file="/WEB-INF/views/cfg/app/appCommonFeature.jsp"%>
|
||||
</div>
|
||||
<c:set var="strCfgIndex" value="${strCfgIndex+1 }"></c:set>
|
||||
</c:otherwise>
|
||||
|
||||
@@ -257,9 +257,9 @@
|
||||
</div>
|
||||
</div>
|
||||
<c:if test="${cfg.serviceId eq 1025 }">
|
||||
<c:if test="${cfg.headerType eq 'IP_header' }">
|
||||
<c:if test="${cfg.district eq 'L3_header_IP' }">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<%-- <div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='VER' />: ${cfg.ver}</label>
|
||||
</div>
|
||||
@@ -268,7 +268,7 @@
|
||||
<div class="form-group">
|
||||
<label><spring:message code='IHL' />: ${cfg.ihl}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div> --%>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='TOS' />: ${cfg.tos}</label>
|
||||
@@ -283,24 +283,24 @@
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='Flags' />: ${cfg.flags}</label>
|
||||
<label><spring:message code='Protocol' />: ${cfg.protocol}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='fragment offset' />: ${cfg.fragmentOffset}</label>
|
||||
<label><spring:message code='client_ip' />: ${cfg.fragmentOffset}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='Protocol' />: ${cfg.protocol}</label>
|
||||
<label><spring:message code='server_ip' />: ${cfg.flags}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${cfg.headerType eq 'ICMP_header' }">
|
||||
<c:if test="${cfg.district eq 'L3_header_ICMP' }">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
@@ -319,11 +319,20 @@
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<c:if test="${empty cfg.headerType}">
|
||||
<c:if test="${cfg.district ne 'L3_header_ICMP' and cfg.district ne 'L3_header_IP'}">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label class="keyword-disinline"><spring:message code='keywords' />: ${fn:replace(cfg.cfgKeywords, "***and***", " ")}</label>
|
||||
<label class="keyword-disinline"><spring:message code='keywords' />:
|
||||
<c:choose>
|
||||
<c:when test="${cfg.exprType eq 3 }">
|
||||
${fn:substringAfter(cfg.cfgKeywords,":") }
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
${fn:replace(cfg.cfgKeywords, "***and***", " ")}
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -333,26 +342,38 @@
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label class="keyword-disinline"><spring:message code='keywords' />: ${fn:replace(cfg.cfgKeywords, "***and***", " ")}</label>
|
||||
<label class="keyword-disinline"><spring:message code='keywords' />:
|
||||
${fn:replace(cfg.cfgKeywords, "***and***", " ")}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='expression_type' />:</label>
|
||||
<label>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.exprType eq 1}"><spring:message code='and_expression'/></c:when>
|
||||
<c:when test="${cfg.exprType eq 0}"><spring:message code='null_expression'/></c:when>
|
||||
<c:when test="${cfg.exprType eq 3}"><spring:message code='offset_expression'/></c:when>
|
||||
</c:choose>
|
||||
</label>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='expression_type' />:</label>
|
||||
<label>
|
||||
<c:choose>
|
||||
<c:when test="${cfg.exprType eq 1}"><spring:message code='and_expression'/></c:when>
|
||||
<c:when test="${cfg.exprType eq 0}"><spring:message code='null_expression'/></c:when>
|
||||
<c:when test="${cfg.exprType eq 3}"><spring:message code='offset_expression'/></c:when>
|
||||
</c:choose>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<c:if test="${cfg.exprType eq 3 and cfg.district eq 'Payload' }">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
<label><spring:message code='offset' />:</label>
|
||||
${cfg.payloadOffset }
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="form-group">
|
||||
|
||||
@@ -72,7 +72,9 @@
|
||||
<select id="domain" name="domain" class="selectpicker form-control" data-max-options="10" data-selected-text-format="count > 2" multiple max-width="100px" data-live-search="true" data-live-search-placeholder="search">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${domainList}" var="dict" >
|
||||
<option value="${dict.id}"><spring:message code="${dict.domain}"></spring:message></option>
|
||||
<c:if test="${dict.id ne 0 }">
|
||||
<option value="${dict.id}"><spring:message code="${dict.domain}"></spring:message></option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -266,6 +266,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='APP'/>:</label>
|
||||
<select id="appSelect" name="appId" title="<spring:message code="select"/>" class="selectpicker form-control " data-max-options="10" data-selected-text-format="count > 3" multiple data-live-search="true" data-live-search-placeholder="<spring:message code="search"/>">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${appList}" var="app" >
|
||||
<option value="${app.code}"><spring:message code="${app.item}"></spring:message></option>
|
||||
</c:forEach>
|
||||
@@ -277,6 +278,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code='application_layer_protocol'/>:</label>
|
||||
<select id="protoSelect" name="protoId" title="<spring:message code="select"/>" class="selectpicker form-control " data-max-options="10" data-selected-text-format="count > 3" multiple data-live-search="true" data-live-search-placeholder="<spring:message code="search"/>">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${protocolList}" var="proto" >
|
||||
<option value="${proto.code}"><spring:message code="${proto.item}"></spring:message></option>
|
||||
</c:forEach>
|
||||
@@ -288,6 +290,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label"><spring:message code="domain_name"/>:</label>
|
||||
<select id="webSelect" name="webId" title="<spring:message code="select"/>" class="selectpicker form-control" data-max-options="10" data-selected-text-format="count > 3" multiple data-live-search="true" data-live-search-placeholder="<spring:message code="search"/>">
|
||||
<option value=""><spring:message code="select"/></option>
|
||||
<c:forEach items="${webList}" var="web" >
|
||||
<option value="${web.code}"><spring:message code="${web.item}"></spring:message></option>
|
||||
</c:forEach>
|
||||
|
||||
@@ -193,13 +193,8 @@
|
||||
|
||||
// 如果在框架或在对话框中,则弹出提示并跳转到首页
|
||||
if(self.frameElement && self.frameElement.tagName == "IFRAME" || $('#left').length > 0 || $('.jbox').length > 0){
|
||||
top.$.jBox.confirm("<spring:message code='login_timeout'/>","<spring:message code='info'/>",function(v,h,f){
|
||||
|
||||
if(v=="ok"){
|
||||
top.location = "${pageContext.request.contextPath }";
|
||||
}else{
|
||||
top.location = "${pageContext.request.contextPath }";
|
||||
}
|
||||
top.$.jBox.alert("<spring:message code='login_timeout'/>","<spring:message code='info'/>",function(v,h,f){
|
||||
top.location = "${pageContext.request.contextPath }";
|
||||
},{buttonsFocus:1});
|
||||
top.$('.jbox-body .jbox-icon').css('top','55px');
|
||||
}
|
||||
|
||||
@@ -399,7 +399,9 @@ $(function(){
|
||||
options = $("select[name='"+objNamePrefix+"matchMethod']").find("option[value!=0]");
|
||||
}
|
||||
//表单中如果有关键字内容可能输入多个关键字的情况,根据输入关键字个数确定表达式选中情况,不允许手动选中
|
||||
$("input:radio[name='"+objNamePrefix+"exprType']").attr("disabled",true);
|
||||
if($("select[name='"+objNamePrefix+"district']").val()!="Payload"){//如果是app 的payload特征,可选择表达式
|
||||
$("input:radio[name='"+objNamePrefix+"exprType']").attr("disabled",true);
|
||||
}
|
||||
tagsInputSettings = tagsInputSettings+",#"+tagsId;
|
||||
}
|
||||
|
||||
@@ -412,9 +414,9 @@ $(function(){
|
||||
onAddTag:function(tag,size){
|
||||
var reg = new RegExp(/\t|\r|\n/);
|
||||
if (tag.match(reg)) {
|
||||
$(this).parents(".col-md-6").next("div").html("<label class='error'>"+$.validator.messages.hasInvisibleChar.replace("{0}","'"+tag+"'")+"</label>");
|
||||
$(this).parent(".col-md-6").next("div").html("<label class='error'>"+$.validator.messages.hasInvisibleChar.replace("{0}","'"+tag+"'")+"</label>");
|
||||
}else{
|
||||
$(this).parents(".col-md-6").next("div").html("");
|
||||
$(this).parent(".col-md-6").next("div").html("");
|
||||
}
|
||||
//var keywordValue = "";
|
||||
var objNamePrefix = $(this).attr("name").split("cfgKeywords")[0];
|
||||
@@ -425,7 +427,7 @@ $(function(){
|
||||
exprTypeChecked(objNamePrefix,size,options);
|
||||
},
|
||||
onRemoveTag:function(tag,size){
|
||||
$(this).parents(".col-md-6").next("div").html("");
|
||||
$(this).parent(".col-md-6").next("div").html("");
|
||||
//var keywordValue = "";
|
||||
var objNamePrefix = $(this).attr("name").split("cfgKeywords")[0];
|
||||
/*$("span[class='tag']").each(function(){
|
||||
|
||||
Reference in New Issue
Block a user