Control Policy配置增加源/目的IP、关键字检索条件.
This commit is contained in:
@@ -282,9 +282,9 @@
|
|||||||
<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='NTC_HTTP_REQ_BODY'
|
AND f.cfg_type = #{httpReqBody.cfgType}
|
||||||
<if test="httpReqBody.cfgKeywords != null and httpReqBody.cfgKeywords != ''">
|
<if test="httpReqBody.cfgKeywords != null and httpReqBody.cfgKeywords != ''">
|
||||||
and REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpReqBody.cfgKeywords,jdbcType=VARCHAR}),'%')
|
AND REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpReqBody.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
</where>
|
</where>
|
||||||
@@ -293,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='NTC_HTTP_RES_BODY'
|
AND f.cfg_type = #{httpResBody.cfgType}
|
||||||
<if test="httpResBody.cfgKeywords != null and httpResBody.cfgKeywords != ''">
|
<if test="httpResBody.cfgKeywords != null and httpResBody.cfgKeywords != ''">
|
||||||
and REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpResBody.cfgKeywords,jdbcType=VARCHAR}),'%')
|
AND REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpResBody.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
</where>
|
</where>
|
||||||
@@ -304,8 +304,9 @@
|
|||||||
<if test="httpReqHdr!=null">
|
<if test="httpReqHdr!=null">
|
||||||
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>
|
||||||
|
AND f.cfg_type = #{httpReqHdr.cfgType}
|
||||||
<if test="httpReqHdr.cfgKeywords != null and httpReqHdr.cfgKeywords != ''">
|
<if test="httpReqHdr.cfgKeywords != null and httpReqHdr.cfgKeywords != ''">
|
||||||
REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpReqHdr.cfgKeywords,jdbcType=VARCHAR}),'%')
|
AND REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpReqHdr.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
)
|
)
|
||||||
@@ -313,8 +314,9 @@
|
|||||||
<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>
|
||||||
|
AND f.cfg_type = #{httpResHdr.cfgType}
|
||||||
<if test="httpResHdr.cfgKeywords != null and httpResHdr.cfgKeywords != ''">
|
<if test="httpResHdr.cfgKeywords != null and httpResHdr.cfgKeywords != ''">
|
||||||
REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpResHdr.cfgKeywords,jdbcType=VARCHAR}),'%')
|
AND REPLACE(f.cfg_keywords,'***and***','|') like concat(concat('%',#{httpResHdr.cfgKeywords,jdbcType=VARCHAR}),'%')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -100,6 +100,19 @@ public class HttpRedirectCfgService extends CrudService<WebsiteCfgDao,CfgIndexIn
|
|||||||
// 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL)
|
// 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL)
|
||||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||||
entity.setPage(page);
|
entity.setPage(page);
|
||||||
|
// 设置cfg_type,用于列表检索时区分
|
||||||
|
if(entity.getHttpReqHdr() != null){
|
||||||
|
entity.getHttpReqHdr().setCfgType(Constants.HTTP_REDIRECT_REQ_HEAD_REGION);
|
||||||
|
}
|
||||||
|
if(entity.getHttpReqBody() != null){
|
||||||
|
entity.getHttpReqBody().setCfgType(Constants.HTTP_REDIRECT_REQ_BODY_REGION);
|
||||||
|
}
|
||||||
|
if(entity.getHttpResHdr() != null){
|
||||||
|
entity.getHttpResHdr().setCfgType(Constants.HTTP_REDIRECT_RES_HEAD_REGION);
|
||||||
|
}
|
||||||
|
if(entity.getHttpResBody() != null){
|
||||||
|
entity.getHttpResBody().setCfgType(Constants.HTTP_REDIRECT_RES_BODY_REGION);
|
||||||
|
}
|
||||||
List<CfgIndexInfo> list = websiteCfgDao.getWebsiteList(entity);
|
List<CfgIndexInfo> list = websiteCfgDao.getWebsiteList(entity);
|
||||||
page.setList(list);
|
page.setList(list);
|
||||||
return page;
|
return page;
|
||||||
|
|||||||
@@ -161,6 +161,19 @@ public class WebsiteCfgService extends CrudService<WebsiteCfgDao,CfgIndexInfo> {
|
|||||||
// 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL)
|
// 生成数据权限过滤条件(dsf为dataScopeFilter的简写,在xml中使用 ${sqlMap.dsf}调用权限SQL)
|
||||||
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
entity.getSqlMap().put("dsf", configScopeFilter(entity.getCurrentUser(),"a"));
|
||||||
entity.setPage(page);
|
entity.setPage(page);
|
||||||
|
// 设置cfg_type,用于列表检索时区分
|
||||||
|
if(entity.getHttpReqHdr() != null){
|
||||||
|
entity.getHttpReqHdr().setCfgType(Constants.HTTP_REQ_HEAD_REGION);
|
||||||
|
}
|
||||||
|
if(entity.getHttpReqBody() != null){
|
||||||
|
entity.getHttpReqBody().setCfgType(Constants.HTTP_REQ_BODY_REGION);
|
||||||
|
}
|
||||||
|
if(entity.getHttpResHdr() != null){
|
||||||
|
entity.getHttpResHdr().setCfgType(Constants.HTTP_RES_HEAD_REGION);
|
||||||
|
}
|
||||||
|
if(entity.getHttpResBody() != null){
|
||||||
|
entity.getHttpResBody().setCfgType(Constants.HTTP_RES_BODY_REGION);
|
||||||
|
}
|
||||||
List<CfgIndexInfo> list = websiteCfgDao.getWebsiteList(entity);
|
List<CfgIndexInfo> list = websiteCfgDao.getWebsiteList(entity);
|
||||||
page.setList(list);
|
page.setList(list);
|
||||||
return page;
|
return page;
|
||||||
|
|||||||
@@ -1324,4 +1324,6 @@ http_req_hdr_keywords=Request Header Keyword
|
|||||||
http_res_hdr_keywords=Response Header Keyword
|
http_res_hdr_keywords=Response Header Keyword
|
||||||
traffic_user_behavior=Traffic Account Behavior
|
traffic_user_behavior=Traffic Account Behavior
|
||||||
user_behavior_data=Account statistics
|
user_behavior_data=Account statistics
|
||||||
ip_behavior_data=IP statistics
|
ip_behavior_data=IP statistics
|
||||||
|
p2p_eMule_keywords=eMule Search Keywords
|
||||||
|
p2p_hash_keywords=File Marking Keywords
|
||||||
@@ -1313,4 +1313,6 @@ http_req_hdr_keywords=Request Header Keyword
|
|||||||
http_res_hdr_keywords=Response Header Keyword
|
http_res_hdr_keywords=Response Header Keyword
|
||||||
traffic_user_behavior=Traffic Account Behavior
|
traffic_user_behavior=Traffic Account Behavior
|
||||||
user_behavior_data=Account statistics
|
user_behavior_data=Account statistics
|
||||||
ip_behavior_data=IP statistics
|
ip_behavior_data=IP statistics
|
||||||
|
p2p_eMule_keywords=eMule Search Keywords
|
||||||
|
p2p_hash_keywords=File Marking Keywords
|
||||||
@@ -163,12 +163,11 @@
|
|||||||
<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.district"><spring:message code="strong_string"/></form:option> --%>
|
|
||||||
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
||||||
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
||||||
<form:option value="interceptPktBin.cfgKeywords"><spring:message code="key_word"/></form:option>
|
<c:if test="${cfg.functionId eq 212}">
|
||||||
|
<form:option value="interceptPktBin.cfgKeywords"><spring:message code="keywords"/></form:option>
|
||||||
|
</c:if>
|
||||||
<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>
|
||||||
|
|||||||
@@ -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());
|
||||||
}
|
}
|
||||||
@@ -319,10 +331,18 @@
|
|||||||
<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="httpReqHdr.cfgKeywords"><spring:message code="http_req_hdr_keywords"></spring:message></form:option>
|
||||||
<form:option value="voipAccount.district"><spring:message code="strong_string"/></form:option> --%>
|
<c:if test="${cfg.functionId ne 211}">
|
||||||
|
<c:if test="${cfg.functionId ne 209}">
|
||||||
|
<form:option value="httpReqBody.cfgKeywords"><spring:message code="http_req_body_keywords"></spring:message></form:option>
|
||||||
|
</c:if>
|
||||||
|
<form:option value="httpResHdr.cfgKeywords"><spring:message code="http_res_hdr_keywords"></spring:message></form:option>
|
||||||
|
<c:if test="${cfg.functionId ne 208 && cfg.functionId ne 209}">
|
||||||
|
<form:option value="httpResBody.cfgKeywords"><spring:message code="http_res_body_keywords"></spring:message></form:option>
|
||||||
|
</c:if>
|
||||||
|
</c:if>
|
||||||
<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>
|
||||||
|
|||||||
@@ -306,13 +306,15 @@
|
|||||||
<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>
|
||||||
<c:if test="${cfg.functionId eq '8'}">
|
<c:if test="${cfg.functionId eq 8}">
|
||||||
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
<form:option value="ipPort.srcIpAddress"><spring:message code="clientip"></spring:message></form:option>
|
||||||
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
<form:option value="ipPort.destIpAddress"><spring:message code="serverip"></spring:message></form:option>
|
||||||
<form:option value="httpReqHdr.cfgKeywords"><spring:message code="http_req_hdr_keywords"></spring:message></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>
|
</c:if>
|
||||||
<form:option value="httpReqBody.cfgKeywords"><spring:message code="http_req_body_keywords"></spring:message></form:option>
|
<form:option value="httpReqBody.cfgKeywords"><spring:message code="http_req_body_keywords"></spring:message></form:option>
|
||||||
|
<c:if test="${cfg.functionId eq 8}">
|
||||||
|
<form:option value="httpResHdr.cfgKeywords"><spring:message code="http_res_hdr_keywords"></spring:message></form:option>
|
||||||
|
</c:if>
|
||||||
<form:option value="httpResBody.cfgKeywords"><spring:message code="http_res_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>
|
||||||
|
|||||||
Reference in New Issue
Block a user