1.增加区域管控校验,不可重复 2.IP复用配置表单从group_area_info表中获取分组

This commit is contained in:
zhangwq
2018-11-02 12:51:27 +08:00
parent 1a01f78a08
commit 6ab181c329
10 changed files with 69 additions and 41 deletions

View File

@@ -958,4 +958,20 @@ jQuery.validator.addMethod("asnNoUnique",function(value, element) {
}
});
return result;
});
jQuery.validator.addMethod("areaUnique",function(value,element) {
var flag = true;
var array = new Array();
var index = $(element).attr("index");
$("select[areaIsp='area']").each(function(){
var code = $(this).val();
if($(this).attr("index") < index){
array.push(code);
}
});
if($.inArray(value,array) != -1){
flag = false;
}
return flag;
});

View File

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

View File

@@ -77,6 +77,7 @@
protocolPort1:"Only when TCP protocol or UDP protocol is chosen can port greater than 0",
netAddress:"C类IP地址网络位必须相同",
ipUnique:"IP already exists.",
asnNoUnique:"ASN already exists."
asnNoUnique:"ASN already exists.",
areaUnique:"Area already exists."
});
}(jQuery));

View File

@@ -78,5 +78,6 @@
netAddress:"C类IP地址网络位必须相同",
ipUnique:"IP已存在",
asnNoUnique:"ASN号已存在",
areaUnique:"该区域已存在"
});
}(jQuery));