BGP、DNS、SSL、HTTP配置列表增加源/目的IP、关键字查询字段.

This commit is contained in:
zhangwq
2018-11-04 15:36:53 +08:00
parent 47bbea8652
commit 65ae455f38
11 changed files with 107 additions and 63 deletions

View File

@@ -72,6 +72,8 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
private List<P2pKeywordCfg> p2pKeywordList; private List<P2pKeywordCfg> p2pKeywordList;
private Integer sourceCompileId; private Integer sourceCompileId;
private String searchKeywords;// 列表关键字查询字段
public Integer getSourceCompileId() { public Integer getSourceCompileId() {
return sourceCompileId; return sourceCompileId;
} }
@@ -323,5 +325,11 @@ public class CfgIndexInfo extends BaseCfg<CfgIndexInfo> {
public void setIndexTable(String indexTable) { public void setIndexTable(String indexTable) {
this.indexTable = indexTable; this.indexTable = indexTable;
} }
public String getSearchKeywords() {
return searchKeywords;
}
public void setSearchKeywords(String searchKeywords) {
this.searchKeywords = searchKeywords;
}
} }

View File

@@ -254,15 +254,15 @@
<if test="ipPort!=null"> <if test="ipPort!=null">
AND a.compile_id in (select t.compile_id from ip_port_cfg t AND a.compile_id in (select t.compile_id from ip_port_cfg t
<where> <where>
and t.function_id=#{(functionId,jdbcType=Integer} and t.function_id=#{functionId,jdbcType=INTEGER}
<if test="ipPort.srcIpAddress != null and ipPort.srcIpAddress != ''"> <if test="ipPort.srcIpAddress != null and ipPort.srcIpAddress != ''">
and t.src_ip_address =#{(ipPort.srcIpAddress,jdbcType=VARCHAR} and t.src_ip_address =#{ipPort.srcIpAddress,jdbcType=VARCHAR}
</if> </if>
<if test="ipPort.srcPort != null and ipPort.srcPort != ''"> <if test="ipPort.srcPort != null and ipPort.srcPort != ''">
and t.src_port =#{ipPort.srcPort,jdbcType=VARCHAR} and t.src_port =#{ipPort.srcPort,jdbcType=VARCHAR}
</if> </if>
<if test="ipPort.destIpAddress != null and ipPort.destIpAddress != ''"> <if test="ipPort.destIpAddress != null and ipPort.destIpAddress != ''">
and t.dest_ip_address =#{(ipPort.destIpAddress,jdbcType=VARCHAR} and t.dest_ip_address =#{ipPort.destIpAddress,jdbcType=VARCHAR}
</if> </if>
<if test="ipPort.destPort != null and ipPort.destPort != ''"> <if test="ipPort.destPort != null and ipPort.destPort != ''">
and t.dest_port =#{ipPort.destPort,jdbcType=VARCHAR} and t.dest_port =#{ipPort.destPort,jdbcType=VARCHAR}
@@ -270,16 +270,15 @@
</where> </where>
) )
</if> </if>
<!-- <if test="httpUrl!=null"> <if test="ntcBgpAsCfg != null">
AND a.compile_id in (select f.compile_id from http_url_cfg f AND a.compile_id in (select b.compile_id from ntc_bgp_as_cfg b
<where> <where>
<if test="httpUrl.cfgKeywords != null and httpUrl.cfgKeywords != ''"> <if test="ntcBgpAsCfg.cfgKeywords != null and ntcBgpAsCfg.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{httpUrl.cfgKeywords,jdbcType=VARCHAR}),'%') REPLACE(b.cfg_keywords,'***and***','|') like concat(concat('%',#{ntcBgpAsCfg.cfgKeywords,jdbcType=VARCHAR}),'%')
</if> </if>
</where>
</where> )
) </if>
</if> -->
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${sqlMap.dsf} ${sqlMap.dsf}
</trim> </trim>

View File

@@ -248,30 +248,43 @@
) )
</if> </if>
<if test="interceptPktBin != null"> <if test="interceptPktBin != null">
AND a.compile_id in (select i.compile_id from intercept_pkt_bin i AND a.compile_id in (SELECT i.compile_id FROM intercept_pkt_bin i
<where> <where>
<if test="interceptPktBin.cfgKeywords != null and interceptPktBin.cfgKeywords != ''"> <if test="interceptPktBin.cfgKeywords != null and interceptPktBin.cfgKeywords != ''">
REPLACE(i.cfg_keywords,'***and***','|') like concat(concat('%',#{interceptPktBin.cfgKeywords,jdbcType=VARCHAR}),'%') REPLACE(i.cfg_keywords,'***and***','|') LIKE concat(concat('%',#{interceptPktBin.cfgKeywords,jdbcType=VARCHAR}),'%')
</if>
</where>
)
</if>
<if test="searchKeywords != null and searchKeywords !=''">
AND a.compile_id in (SELECT d.compile_id FROM dns_domain_cfg d WHERE
d.cfg_keywords LIKE concat(concat('%',#{searchKeywords,jdbcType=VARCHAR}),'%')
)
</if>
<if test="sslCfg != null">
AND a.compile_id in (SELECT s.compile_id FROM ssl_keyword_cfg s
<where>
<if test="sslCfg.cfgKeywords != null and sslCfg.cfgKeywords != ''">
REPLACE(s.cfg_keywords,'***and***','|') LIKE concat(concat('%',#{sslCfg.cfgKeywords,jdbcType=VARCHAR}),'%')
</if> </if>
</where> </where>
) )
</if> </if>
<if test="httpUrl!=null"> <if test="httpUrl!=null">
AND a.compile_id in (select f.compile_id from http_url_cfg f AND a.compile_id in (SELECT f.compile_id FROM http_url_cfg f
<where> <where>
<if test="httpUrl.cfgKeywords != null and httpUrl.cfgKeywords != ''"> <if test="httpUrl.cfgKeywords != null and httpUrl.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{httpUrl.cfgKeywords,jdbcType=VARCHAR}),'%') REPLACE(f.cfg_keywords,'***and***','|') LIKE concat(concat('%',#{httpUrl.cfgKeywords,jdbcType=VARCHAR}),'%')
</if> </if>
</where>
</where>
) )
</if> </if>
<if test="httpReqBody!=null"> <if test="httpReqBody!=null">
AND a.compile_id in (select f.compile_id from http_body_cfg f AND a.compile_id in (select f.compile_id from http_body_cfg f
<where> <where>
and cfg_type='http_req_body' and cfg_type='NTC_HTTP_REQ_BODY'
<if test="httpReqBody.cfgKeywords != null and httpReqBody.cfgKeywords != ''"> <if test="httpReqBody.cfgKeywords != null and httpReqBody.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{httpReqBody.cfgKeywords,jdbcType=VARCHAR}),'%') and REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpReqBody.cfgKeywords,jdbcType=VARCHAR}),'%')
</if> </if>
</where> </where>
@@ -280,9 +293,9 @@
<if test="httpResBody!=null"> <if test="httpResBody!=null">
AND a.compile_id in (select f.compile_id from http_body_cfg f AND a.compile_id in (select f.compile_id from http_body_cfg f
<where> <where>
and cfg_type='http_res_body' and cfg_type='NTC_HTTP_RES_BODY'
<if test="httpResBody.cfgKeywords != null and httpResBody.cfgKeywords != ''"> <if test="httpResBody.cfgKeywords != null and httpResBody.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{httpResBody.cfgKeywords,jdbcType=VARCHAR}),'%') and REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpResBody.cfgKeywords,jdbcType=VARCHAR}),'%')
</if> </if>
</where> </where>
@@ -292,35 +305,20 @@
AND a.compile_id in (select f.compile_id from http_req_head_cfg f AND a.compile_id in (select f.compile_id from http_req_head_cfg f
<where> <where>
<if test="httpReqHdr.cfgKeywords != null and httpReqHdr.cfgKeywords != ''"> <if test="httpReqHdr.cfgKeywords != null and httpReqHdr.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{httpReqHdr.cfgKeywords,jdbcType=VARCHAR}),'%') REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpReqHdr.cfgKeywords,jdbcType=VARCHAR}),'%')
</if> </if>
<if test="httpReqHdr.district != null and httpReqHdr.district != ''"> </where>
and f.district like concat(concat('%',#{httpReqHdr.district,jdbcType=VARCHAR}),'%')
</if>
</where>
) )
</if> </if>
<if test="httpResHdr!=null"> <if test="httpResHdr!=null">
AND a.compile_id in (select f.compile_id from http_res_head_cfg f AND a.compile_id in (select f.compile_id from http_res_head_cfg f
<where> <where>
<if test="httpResHdr.cfgKeywords != null and httpResHdr.cfgKeywords != ''"> <if test="httpResHdr.cfgKeywords != null and httpResHdr.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{httpResHdr.cfgKeywords,jdbcType=VARCHAR}),'%') REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpResHdr.cfgKeywords,jdbcType=VARCHAR}),'%')
</if> </if>
<if test="httpResHdr.district != null and httpResHdr.district != ''"> </where>
and f.district like concat(concat('%',#{httpResHdr.district,jdbcType=VARCHAR}),'%')
</if>
</where>
) )
</if> </if>
<!-- <if test="sslCfg!=null">
AND a.compile_id in (select f.compile_id from ssl_keyword_cfg f
<where>
<if test="sslCfg.cfgKeywords != null and sslCfg.cfgKeywords != ''">
and f.cfg_keywords like concat(concat('%',#{sslCfg.cfgKeywords,jdbcType=VARCHAR}),'%')
</if>
</where>
)
</if> -->
<!-- 数据范围过滤 --> <!-- 数据范围过滤 -->
${sqlMap.dsf} ${sqlMap.dsf}
</trim> </trim>

View File

@@ -1317,4 +1317,8 @@ encap_type=Encap Type
link_id=Link Id link_id=Link Id
inner_smac=Inner SMAC inner_smac=Inner SMAC
inner_dmac=Inner DMAC inner_dmac=Inner DMAC
ethernet=Ethernet ethernet=Ethernet
http_req_body_keywords=Request Body Keyword
http_res_body_keywords=Response Body Keyword
http_req_hdr_keywords=Request Header Keyword
http_res_hdr_keywords=Response Header Keyword

View File

@@ -1306,4 +1306,8 @@ default_request=Default Letter
default_value=Default Value default_value=Default Value
unkown_error=Unkown Error Infomation unkown_error=Unkown Error Infomation
exception_info=Exception Infomation exception_info=Exception Infomation
no_tc_udp_port_comment_tip=Port must between 0 no_tc_udp_port_comment_tip=Port must between 0
http_req_body_keywords=Request Body Keyword
http_res_body_keywords=Response Body Keyword
http_req_hdr_keywords=Request Header Keyword
http_res_hdr_keywords=Response Header Keyword

View File

@@ -1307,4 +1307,8 @@ encap_type=\u539F\u59CB\u4E8C\u5C42\u5C01\u88C5\u683C\u5F0F
link_id=\u4E32\u8054\u8BBE\u5907\u94FE\u8DEF\u53F7 link_id=\u4E32\u8054\u8BBE\u5907\u94FE\u8DEF\u53F7
inner_smac=\u5185\u5C42\u6E90MAC inner_smac=\u5185\u5C42\u6E90MAC
inner_dmac=\u5185\u5C42\u76EE\u6807MAC inner_dmac=\u5185\u5C42\u76EE\u6807MAC
ethernet=\u4EE5\u592A\u7F51 ethernet=\u4EE5\u592A\u7F51
http_req_body_keywords=\u8BF7\u6C42\u5185\u5BB9\u5173\u952E\u5B57
http_res_body_keywords=\u5E94\u7B54\u5185\u5BB9\u5173\u952E\u5B57
http_req_hdr_keywords=\u8BF7\u6C42\u5934\u57DF\u5173\u952E\u5B57
http_res_hdr_keywords=\u5E94\u7B54\u5934\u57DF\u5173\u952E\u5B57

View File

@@ -11,6 +11,12 @@
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileId}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileId}");
}else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){
$("#intype").val("${cfg.ipPort.destIpAddress}");
}else if("${cfg.ntcBgpAsCfg.cfgKeywords}"){
$("#intype").val("${cfg.ntcBgpAsCfg.cfgKeywords}");
}else{ }else{
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text()); $("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
} }
@@ -151,10 +157,9 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
<%-- <form:option value="voipIp.srcIpAddress"><spring:message code="client_ip"/></form:option> <form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
<form:option value="voipIp.srcPort"><spring:message code="client_port"/></form:option> <form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
<form:option value="voipAccount.cfgKeywords"><spring:message code="key_word"/></form:option> <form:option value="ntcBgpAsCfg.cfgKeywords"><spring:message code="keywords"/></form:option>
<form:option value="voipAccount.district"><spring:message code="strong_string"/></form:option> --%>
<form:option value="action"><spring:message code="block_type"></spring:message></form:option> <form:option value="action"><spring:message code="block_type"></spring:message></form:option>
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option> <form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
</form:select> </form:select>

View File

@@ -11,6 +11,12 @@
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileId}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileId}");
}else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){
$("#intype").val("${cfg.ipPort.destIpAddress}");
}else if("${cfg.searchKeywords}"){
$("#intype").val("${cfg.searchKeywords}");
}else{ }else{
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text()); $("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
} }
@@ -149,10 +155,9 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
<%-- <form:option value="voipIp.srcIpAddress"><spring:message code="client_ip"/></form:option> <form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
<form:option value="voipIp.srcPort"><spring:message code="client_port"/></form:option> <form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
<form:option value="voipAccount.cfgKeywords"><spring:message code="key_word"/></form:option> <form:option value="searchKeywords"><spring:message code="keywords"></spring:message></form:option>
<form:option value="voipAccount.district"><spring:message code="strong_string"/></form:option> --%>
<form:option value="action"><spring:message code="block_type"></spring:message></form:option> <form:option value="action"><spring:message code="block_type"></spring:message></form:option>
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option> <form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
</form:select> </form:select>

View File

@@ -11,6 +11,18 @@
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileId}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileId}");
}else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){
$("#intype").val("${cfg.ipPort.destIpAddress}");
}else if("${cfg.httpReqHdr.cfgKeywords}"){
$("#intype").val("${cfg.httpReqHdr.cfgKeywords}");
}else if("${cfg.httpResHdr.cfgKeywords}"){
$("#intype").val("${cfg.httpResHdr.cfgKeywords}");
}else if("${cfg.httpReqBody.cfgKeywords}"){
$("#intype").val("${cfg.httpReqBody.cfgKeywords}");
}else if("${cfg.httpResBody.cfgKeywords}"){
$("#intype").val("${cfg.httpResBody.cfgKeywords}");
}else{ }else{
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text()); $("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
} }
@@ -294,10 +306,14 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
<%-- <form:option value="voipIp.srcIpAddress"><spring:message code="client_ip"/></form:option> <c:if test="${cfg.functionId eq '8'}">
<form:option value="voipIp.srcPort"><spring:message code="client_port"/></form:option> <form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
<form:option value="voipAccount.cfgKeywords"><spring:message code="key_word"/></form:option> <form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
<form:option value="voipAccount.district"><spring:message code="strong_string"/></form:option> --%> <form:option value="httpReqHdr.cfgKeywords"><spring:message code="http_req_hdr_keywords"></spring:message></form:option>
<form:option value="httpResHdr.cfgKeywords"><spring:message code="http_res_hdr_keywords"></spring:message></form:option>
</c:if>
<form:option value="httpReqBody.cfgKeywords"><spring:message code="http_req_body_keywords"></spring:message></form:option>
<form:option value="httpResBody.cfgKeywords"><spring:message code="http_res_body_keywords"></spring:message></form:option>
<form:option value="action"><spring:message code="block_type"></spring:message></form:option> <form:option value="action"><spring:message code="block_type"></spring:message></form:option>
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option> <form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
</form:select> </form:select>

View File

@@ -11,6 +11,12 @@
$("#intype").val("${cfg.cfgDesc}"); $("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){ }else if("${cfg.compileId}"){
$("#intype").val("${cfg.compileId}"); $("#intype").val("${cfg.compileId}");
}else if("${cfg.ipPort.srcIpAddress}"){
$("#intype").val("${cfg.ipPort.srcIpAddress}");
}else if("${cfg.ipPort.destIpAddress}"){
$("#intype").val("${cfg.ipPort.destIpAddress}");
}else if("${cfg.sslCfg.cfgKeywords}"){
$("#intype").val("${cfg.sslCfg.cfgKeywords}");
}else{ }else{
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text()); $("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
} }
@@ -148,10 +154,9 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
<%-- <form:option value="voipIp.srcIpAddress"><spring:message code="client_ip"/></form:option> <form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
<form:option value="voipIp.srcPort"><spring:message code="client_port"/></form:option> <form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
<form:option value="voipAccount.cfgKeywords"><spring:message code="key_word"/></form:option> <form:option value="sslCfg.cfgKeywords"><spring:message code="keywords"></spring:message></form:option>
<form:option value="voipAccount.district"><spring:message code="strong_string"/></form:option> --%>
<form:option value="action"><spring:message code="block_type"></spring:message></form:option> <form:option value="action"><spring:message code="block_type"></spring:message></form:option>
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option> <form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
</form:select> </form:select>

View File

@@ -135,10 +135,6 @@
<form:select path="seltype" class="selectpicker select2 input-small" > <form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option> <form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option> <form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
<%-- <form:option value="voipIp.srcIpAddress"><spring:message code="client_ip"/></form:option>
<form:option value="voipIp.srcPort"><spring:message code="client_port"/></form:option>
<form:option value="voipAccount.cfgKeywords"><spring:message code="key_word"/></form:option>
<form:option value="voipAccount.district"><spring:message code="strong_string"/></form:option> --%>
<form:option value="action"><spring:message code="block_type"></spring:message></form:option> <form:option value="action"><spring:message code="block_type"></spring:message></form:option>
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option> <form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
</form:select> </form:select>