(1)修复特定服务新增时无法选择上级节点的bug

(2)特定服务加入验证,当前节点的配置类型应当与上级配置一致
This commit is contained in:
wangxin
2018-07-25 15:19:24 +08:00
parent 4e0be5b70b
commit 76b7122c21
13 changed files with 68 additions and 13 deletions

View File

@@ -594,6 +594,13 @@ jQuery.validator.addMethod("areaIp",function(value, element) {
}
}
});
jQuery.validator.addMethod("checkParent",function(value, element) {
var parentType=$(element).attr("parent-type");
if(parentType&&parentType!=0&&parentType!=value){
return false;
}
return true;
});
//ip v4转数字
var ipToNumber=function (ip){
var num =0;

View File

@@ -56,6 +56,7 @@
ip_range: "ip Range",
timeout:"timeout",
areaIpPrefix:"Forbiden value: ",
domainCheck:"Please enter a valid domain."
domainCheck:"Please enter a valid domain.",
checkParent:"Configuration Type must match it's parent."
});
}(jQuery));

View File

@@ -54,6 +54,7 @@
ip_range: "ip Range",
timeout:"timeout",
areaIpPrefix:"Forbiden value: ",
domainCheck:"Please enter a valid domain."
domainCheck:"Please enter a valid domain.",
checkParent:"Configuration Type must match it's parent."
});
}(jQuery));

View File

@@ -58,6 +58,7 @@
ip_range: "ip Range",
timeout:"超时",
areaIpPrefix:"禁止使用的值: ",
domainCheck:"请输入有效的域名"
domainCheck:"请输入有效的域名",
checkParent:"配置类型必须与上级配置一致!"
});
}(jQuery));