修改app payload特征l3_header配置的表达式字段和匹配类型字段

This commit is contained in:
zhangwei
2018-12-22 21:50:02 +06:00
parent aadd9dd2bf
commit 17482e1c6b
6 changed files with 28 additions and 7 deletions

View File

@@ -107,9 +107,10 @@ public class AppMultiFeatureCfgService extends BaseService {
for(AppComplexFeatureCfg cfg:entity.getComplexList()){
if(StringUtils.isNotBlank(cfg.getDistrict()) && cfg.getDistrict().equals("L3_header")){
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
cfg.setIsHex(1);
cfg.setIsHexbin(1);
cfg.setIsCaseInsenstive(0);
cfg.setExprType(0);
cfg.setExprType(3);
cfg.setMatchMethod(0);
String keyword = "";
if(cfg.getHeaderType().equals("IP_header")){
if(StringUtils.isNoneBlank(cfg.getVer())){
@@ -200,9 +201,10 @@ public class AppMultiFeatureCfgService extends BaseService {
for(AppComplexFeatureCfg cfg:entity.getComplexList()){
if(StringUtils.isNotBlank(cfg.getDistrict()) && cfg.getDistrict().equals("L3_header")){
BeanUtils.copyProperties(entity, cfg,new String[]{"cfgRegionCode","cfgType"});
cfg.setIsHex(1);
cfg.setIsHexbin(1);
cfg.setIsCaseInsenstive(0);
cfg.setExprType(0);
cfg.setExprType(3);
cfg.setMatchMethod(0);
String keyword = "";
if(cfg.getHeaderType().equals("IP_header")){
if(StringUtils.isNoneBlank(cfg.getVer())){

View File

@@ -1413,4 +1413,5 @@ count=Count
do_blacklist=Blacklist Option
l3_header_error=Only four attribute values are allowed to be entered at most
IP_HEADER=IP Header
ICMP_HEADER=ICMP Header
ICMP_HEADER=ICMP Header
offset_expression=Offset Expression

View File

@@ -1417,4 +1417,5 @@ count=Count
do_blacklist=Blacklist Option
l3_header_error=Only four attribute values are allowed to be entered at most
IP_HEADER=IP Header
ICMP_HEADER=ICMP Header
ICMP_HEADER=ICMP Header
offset_expression=Offset Expression

View File

@@ -1413,4 +1413,5 @@ count=\u6570\u91CF
do_blacklist=Blacklist Option
l3_header_error=Only four attribute values are allowed to be entered at most
IP_HEADER=IP Header
ICMP_HEADER=ICMP Header
ICMP_HEADER=ICMP Header
offset_expression=Offset Expression

View File

@@ -80,6 +80,21 @@ $(function(){
flag = false;
}
}else{
var length = 0;
$(this).parents(".boxSolid").find(".l3_header_prop").each(function(){
if($(this).val()!=''){
length += 1;
}
})
if(length>0){
$(this).val("");
if(length>4){
$(this).parents(".boxSolid").find(
"div[class='l3_header_tips']").html("<label id=\"l3_header_error\" class=\"error\">"+$("#l3_header_error").text()+"</label>");
flag = false;
}
}
}
});
//keywords非空校验完成校验二进制字符串

View File

@@ -347,6 +347,7 @@
<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>