策略对象FTP协议提交

This commit is contained in:
wangxin
2019-07-03 09:33:46 +08:00
parent 6034fa5bff
commit d2ddba9362
3 changed files with 19 additions and 18 deletions

View File

@@ -119,6 +119,12 @@ public class ObjectGroupService extends BaseService {
}else if(entity.getAction().equals(16)){ }else if(entity.getAction().equals(16)){
entity.setServiceId(18); entity.setServiceId(18);
} }
}else if("FTP".equalsIgnoreCase(protocolType)){
if(entity.getAction().equals(1)){
entity.setServiceId(133);
}else if(entity.getAction().equals(16)){
entity.setServiceId(21);
}
}else if(StringUtils.isBlank(protocolType)){ }else if(StringUtils.isBlank(protocolType)){
if(MapUtils.isNotEmpty(entity.getUserRegion())&&entity.getUserRegion().containsKey("ipGroup")){ if(MapUtils.isNotEmpty(entity.getUserRegion())&&entity.getUserRegion().containsKey("ipGroup")){
if(entity.getAction().equals(1)){ if(entity.getAction().equals(1)){

View File

@@ -191,14 +191,16 @@
</service> </service>
<service id="133" functionId="51" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="FTP监测"> <service id="133" functionId="51" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="FTP监测">
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg> <serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE"></serviceCfg>
<serviceCfg cfgType="2" tableName="ftp_keyword_cfg" ></serviceCfg> <!--策略对象分组只用到NTC_FTP_URLmaatTable只有策略对象下发用到 -->
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg> <serviceCfg cfgType="2" tableName="ftp_keyword_cfg" maatTable="NTC_FTP_URL"></serviceCfg>
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
</service> </service>
<service id="21" functionId="51" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="FTP封堵"> <service id="21" functionId="51" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="FTP封堵">
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg> <serviceCfg cfgType="1" tableName="ip_port_cfg" maatTable="NTC_UNIVERSAL_IP" protocolMaatTable="NTC_UNIVERSAL_PROTO_TYPE" ></serviceCfg>
<serviceCfg cfgType="2" tableName="ftp_keyword_cfg" ></serviceCfg> <!--策略对象分组只用到NTC_FTP_URLmaatTable只有策略对象下发用到 -->
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg> <serviceCfg cfgType="2" tableName="ftp_keyword_cfg" maatTable="NTC_FTP_URL"></serviceCfg>
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
</service> </service>
<service id="34" functionId="510" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="P2P封堵"> <service id="34" functionId="510" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="P2P封堵">
<serviceCfg cfgType="1" tableName="ip_port_cfg"></serviceCfg> <serviceCfg cfgType="1" tableName="ip_port_cfg"></serviceCfg>
@@ -435,6 +437,6 @@
<serviceCfg cfgType="3" tableName="http_res_head_cfg" ></serviceCfg> <serviceCfg cfgType="3" tableName="http_res_head_cfg" ></serviceCfg>
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg> <serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
</service> </service>
<service id="0" serviceIds="512,592,128,129,130,132" functionId="888" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="公共分组监测"></service> <service id="0" serviceIds="512,592,128,129,130,132,133" functionId="888" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="公共分组监测"></service>
<service id="-1" serviceIds="576,16,17,18,20" functionId="888" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="公共分组阻断"></service> <service id="-1" serviceIds="576,16,17,18,20,21" functionId="888" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="公共分组阻断"></service>
</serviceList> </serviceList>

View File

@@ -34,7 +34,7 @@ $(function(){
//处理do_log //处理do_log
$(".doLog").addClass("hidden"); $(".doLog").addClass("hidden");
$("[name='doLog']").find("[value=2]").prop("checked",true); $("[name='doLog']").find("[value=2]").prop("checked",true);
}else if('${_cfg.userRegion1}'=='https'||'${_cfg.userRegion1}'=='http'){ }else if('${_cfg.userRegion1}'=='https'||'${_cfg.userRegion1}'=='http'||'${_cfg.userRegion1}'=='ftp'){
$(".domainGroup").addClass("hidden").addClass("disabled"); $(".domainGroup").addClass("hidden").addClass("disabled");
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled"); $(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
$(".urlGroup").removeClass("hidden").removeClass("disabled"); $(".urlGroup").removeClass("hidden").removeClass("disabled");
@@ -98,18 +98,12 @@ $(function(){
$(this).removeAttr("checked"); $(this).removeAttr("checked");
} }
}) })
}else if("https"==$(this).val()){ }else if("https"==$(this).val()||"http"==$(this).val()||"ftp"==$(this).val()){
$(".urlGroup").removeClass("hidden").removeClass("disabled"); $(".urlGroup").removeClass("hidden").removeClass("disabled");
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled"); $(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
$(".domainGroup").addClass("hidden").addClass("disabled"); $(".domainGroup").addClass("hidden").addClass("disabled");
//处理do_log //处理do_log
$(".doLog").removeClass("hidden"); $(".doLog").removeClass("hidden");
}else if("http"==$(this).val()){
$(".domainGroup").addClass("hidden").addClass("disabled");
$(".urlGroup").removeClass("hidden").removeClass("disabled");
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
//处理do_log
$(".doLog").removeClass("hidden");
}else if(""==$(this).val()){ }else if(""==$(this).val()){
$(".urlGroup").addClass("hidden").addClass("disabled"); $(".urlGroup").addClass("hidden").addClass("disabled");
$(".subscribeIdGroup").addClass("hidden").addClass("disabled"); $(".subscribeIdGroup").addClass("hidden").addClass("disabled");
@@ -167,7 +161,7 @@ $(function(){
top.$.jBox.tip("<spring:message code='at_least_one_group'/>", "<spring:message code='info'/>"); top.$.jBox.tip("<spring:message code='at_least_one_group'/>", "<spring:message code='info'/>");
return; return;
}else{ }else{
if(($("[name='userRegion1']").val()=="http"||$("[name='userRegion1']").val()=="mail"||$("[name='userRegion1']").val()=="dns")&&ipGroupLen>0){ if(($("[name='userRegion1']").val()=="http"||$("[name='userRegion1']").val()=="mail"||$("[name='userRegion1']").val()=="dns"||$("[name='userRegion1']").val()=="ftp")&&ipGroupLen>0){
if(grouplen>7){ if(grouplen>7){
top.$.jBox.tip("<spring:message code='most_seven_group'/>", "<spring:message code='info'/>"); top.$.jBox.tip("<spring:message code='most_seven_group'/>", "<spring:message code='info'/>");
return; return;
@@ -368,7 +362,6 @@ var delContent = function(contentClassName, addBtnClassName) {
<c:choose> <c:choose>
<c:when test="${protocol.itemCode eq 'https'}"></c:when> <c:when test="${protocol.itemCode eq 'https'}"></c:when>
<c:when test="${protocol.itemCode eq 'intercept'}"></c:when> <c:when test="${protocol.itemCode eq 'intercept'}"></c:when>
<c:when test="${protocol.itemCode eq 'ftp'}"></c:when>
<c:otherwise> <c:otherwise>
<option value="${protocol.itemCode}" <c:if test="${_cfg.userRegion1 eq protocol.itemCode}">selected</c:if>> <spring:message code="${protocol.itemValue}"/></option> <option value="${protocol.itemCode}" <c:if test="${_cfg.userRegion1 eq protocol.itemCode}">selected</c:if>> <spring:message code="${protocol.itemValue}"/></option>
</c:otherwise> </c:otherwise>