VPN服务器

新增添加IP重复验证
删除验证是否被IP复用-用户管理使用
IP复用-用户管理 删除验证是否被snat策略和dnat策略使用
This commit is contained in:
leijun
2019-01-18 17:40:23 +08:00
parent b9c9b5aab9
commit 436190fe8c
10 changed files with 146 additions and 13 deletions

View File

@@ -104,6 +104,23 @@ label.errorShow {
return flagLeafChange;
},"<spring:message code='leafChange'/>");
//校验ip是否重复
jQuery.validator.addMethod("ipRepeat",function(value,element){
var flagLeafChange=false;
$.ajax({
type:'post',
async:false,
url:'${ctx}/basics/serviceDictInfo/ajaxIpRepeat',
data:{oldIp:"${serviceDictInfo.itemValue}",ip:$("#itemValue").val(),type:5},
success:function(data){
flagLeafChange=data;
}
});
return flagLeafChange;
},"<spring:message code='ip_existed'/>");
jQuery.validator.addMethod("ipchecks",function(value,element){
var tel=/^(0|1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|[1-9])\.(0|1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(0|1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)\.(0|1\d{2}|2[0-4]\d|25[0-5]|[1-9]\d|\d)$/;
return this.optional(element) || (tel.test(value));
@@ -252,7 +269,7 @@ label.errorShow {
</label>
<div class="col-md-4">
<c:if test="${itType==5 }">
<input class="form-control required ipchecks " id="itemValue" type="text" name="itemValue" value="${serviceDictInfo.itemValue}">
<input class="form-control required ipchecks ipRepeat" id="itemValue" type="text" name="itemValue" value="${serviceDictInfo.itemValue}">
</c:if>
<c:if test="${itType!=5 }">
<form:input path="itemValue" htmlEscape="false" maxlength="64" class="form-control required "/>