策略分组添加asn号属性.

This commit is contained in:
zhangwq
2018-10-25 19:43:54 +08:00
parent 6855454715
commit 5b89e6cff5
10 changed files with 116 additions and 11 deletions

View File

@@ -924,7 +924,7 @@ var fillIp=function (ip){
}
return ip;
}
// snat复用地址池ip唯一
jQuery.validator.addMethod("ipUnique",function(value, element) {
var ctx=$(element).attr("ctx");
var cfgId= $("[name='cfgId']").val();
@@ -941,4 +941,21 @@ jQuery.validator.addMethod("ipUnique",function(value, element) {
}
});
return result;
});
// 策略分组管理asn号唯一
jQuery.validator.addMethod("asnNoUnique",function(value, element) {
var ctx=$(element).attr("ctx");
var groupId= $("[name='groupId']").val();
var url = ctx+"/basics/policyGroup/checkAsnNo";
var result = true;
$.ajax({
type:'post',
async:false,
url: url,
data:{"groupId":groupId,"asnNo":value},
success:function(data){
result = data;
}
});
return result;
});

View File

@@ -76,6 +76,7 @@
protocolPort:"TCP protocol or UDP protocol must be chosen when port is greater than 0",
protocolPort1:"Only when TCP protocol or UDP protocol is chosen can port greater than 0,ALL protocol has no limit",
netAddress:"The class C type of IP addresses must has the same network number bit field",
ipUnique:"IP already exists."
ipUnique:"IP already exists.",
asnNoUnique:"ASN already exists."
});
}(jQuery));

View File

@@ -76,6 +76,7 @@
protocolPort:"端口大于0时必须选择TCP协议或者UDP协议",
protocolPort1:"只有tcp,udp协议端口号可以不为0,全部协议无限制",
netAddress:"C类IP地址网络位必须相同",
ipUnique:"IP已存在"
ipUnique:"IP已存在",
asnNoUnique:"ASN号已存在",
});
}(jQuery));