DNS协议策略组功能提交
This commit is contained in:
@@ -833,6 +833,8 @@ public class ConfigConvertUtil {
|
||||
return gsonToJson(userRegionMap);
|
||||
}else if(serviceId.equals(592)){
|
||||
return "{}";
|
||||
}else if(serviceId.equals(18)){
|
||||
return "DNS_STRATEGY=0";
|
||||
}else{
|
||||
return "0";
|
||||
}
|
||||
|
||||
@@ -113,6 +113,12 @@ public class ObjectGroupService extends BaseService {
|
||||
}else if(entity.getAction().equals(16)){
|
||||
entity.setServiceId(20);
|
||||
}
|
||||
}else if("DNS".equalsIgnoreCase(protocolType)){
|
||||
if(entity.getAction().equals(1)){
|
||||
entity.setServiceId(130);
|
||||
}else if(entity.getAction().equals(16)){
|
||||
entity.setServiceId(18);
|
||||
}
|
||||
}else if(StringUtils.isBlank(protocolType)){
|
||||
if(MapUtils.isNotEmpty(entity.getUserRegion())&&entity.getUserRegion().containsKey("ipGroup")){
|
||||
if(entity.getAction().equals(1)){
|
||||
|
||||
@@ -116,15 +116,15 @@
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
</service>
|
||||
<service id="18" functionId="7" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="DNS封堵">
|
||||
<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="3" tableName="dns_domain_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||
<userRegion regionKey="DNS_STRATEGY" regionColumn="dnsStrategyId" userRegionPosition="1"></userRegion>
|
||||
</service>
|
||||
<service id="130" functionId="7" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="DNS监测">
|
||||
<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="3" tableName="dns_domain_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" maatTable="NTC_SUBSCRIBE_ID"></serviceCfg>
|
||||
</service>
|
||||
<service id="131" functionId="34" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="SSL监测">
|
||||
<serviceCfg cfgType="1" tableName="ip_port_cfg" ></serviceCfg>
|
||||
@@ -435,6 +435,6 @@
|
||||
<serviceCfg cfgType="3" tableName="http_res_head_cfg" ></serviceCfg>
|
||||
<serviceCfg cfgType="2" tableName="ntc_subscribe_id_cfg" ></serviceCfg>
|
||||
</service>
|
||||
<service id="0" serviceIds="512,592,128,129,132" functionId="888" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="公共分组监测"></service>
|
||||
<service id="-1" serviceIds="576,16,17,20" functionId="888" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="公共分组阻断"></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="-1" serviceIds="576,16,17,18,20" functionId="888" serviceType="1" tableName="cfg_index_info" className="CfgIndexInfo" desc="公共分组阻断"></service>
|
||||
</serviceList>
|
||||
@@ -42,7 +42,7 @@ $(function(){
|
||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||
$(".subscribeIdGroup").addClass("hidden").addClass("disabled");
|
||||
$(".urlGroup").addClass("hidden").addClass("disabled");
|
||||
}else if($("[name=userRegion1]").val()=="mail"){
|
||||
}else if($("[name=userRegion1]").val()=="mail"||$("[name=userRegion1]").val()=="dns"){
|
||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
|
||||
$(".urlGroup").addClass("hidden").addClass("disabled");
|
||||
@@ -116,7 +116,7 @@ $(function(){
|
||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||
//处理do_log
|
||||
$(".doLog").removeClass("hidden");
|
||||
}else if("mail"==$(this).val()){
|
||||
}else if("mail"==$(this).val()||"dns"==$(this).val()){
|
||||
$(".urlGroup").addClass("hidden").addClass("disabled");
|
||||
$(".subscribeIdGroup").removeClass("hidden").removeClass("disabled");
|
||||
$(".domainGroup").addClass("hidden").addClass("disabled");
|
||||
@@ -167,7 +167,7 @@ $(function(){
|
||||
top.$.jBox.tip("<spring:message code='at_least_one_group'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
}else{
|
||||
if(($("[name='userRegion1']").val()=="http"||$("[name='userRegion1']").val()=="mail")&&ipGroupLen>0){
|
||||
if(($("[name='userRegion1']").val()=="http"||$("[name='userRegion1']").val()=="mail"||$("[name='userRegion1']").val()=="dns")&&ipGroupLen>0){
|
||||
if(grouplen>7){
|
||||
top.$.jBox.tip("<spring:message code='most_seven_group'/>", "<spring:message code='info'/>");
|
||||
return;
|
||||
@@ -182,6 +182,23 @@ $(function(){
|
||||
flag=flag1;
|
||||
}
|
||||
if(flag){
|
||||
if($("[name='userRegion1']").val()=="dns"&&$("[name='action']:checked").val()==16){
|
||||
var flag2 = true;
|
||||
var url = "${ctx}/cfg/dnsIp/dnsNoStrategyCheck";
|
||||
$.ajax({
|
||||
type:'post',
|
||||
async:false,
|
||||
url: url,
|
||||
data:{"dnsStrategyId":0},
|
||||
success:function(data){
|
||||
flag2 = data;
|
||||
}
|
||||
});
|
||||
if(!flag2){
|
||||
top.$.jBox.tip($.validator.messages.noStrategyCheck, "<spring:message code='info'/>");
|
||||
return
|
||||
}
|
||||
}
|
||||
//将disable属性的元素删除
|
||||
$(".disabled").each(function(){
|
||||
$(this).remove();
|
||||
@@ -352,7 +369,6 @@ var delContent = function(contentClassName, addBtnClassName) {
|
||||
<c:when test="${protocol.itemCode eq 'https'}"></c:when>
|
||||
<c:when test="${protocol.itemCode eq 'intercept'}"></c:when>
|
||||
<c:when test="${protocol.itemCode eq 'ftp'}"></c:when>
|
||||
<c:when test="${protocol.itemCode eq 'dns'}"></c:when>
|
||||
<c:otherwise>
|
||||
<option value="${protocol.itemCode}" <c:if test="${_cfg.userRegion1 eq protocol.itemCode}">selected</c:if>> <spring:message code="${protocol.itemValue}"/></option>
|
||||
</c:otherwise>
|
||||
|
||||
Reference in New Issue
Block a user