Merge branch 'develop' of http://192.168.10.125/k18_web/NFS.git into develop
This commit is contained in:
@@ -1246,4 +1246,9 @@ mail_address_monit=Mail Address Monit
|
|||||||
mail_address_reject=Mail Address Reject
|
mail_address_reject=Mail Address Reject
|
||||||
ipsec_protocol=IPSEC Protocol
|
ipsec_protocol=IPSEC Protocol
|
||||||
intercept_intensity=Intercept Related Domains
|
intercept_intensity=Intercept Related Domains
|
||||||
exceeds_duration_limit=File upload failure,The duration of uploaded files exceeds the limit.
|
exceeds_duration_limit=File upload failure,The duration of uploaded files exceeds the limit.
|
||||||
|
file_in_wrong_format=File Format Error
|
||||||
|
select_certificate=Please Select Certificate Type First
|
||||||
|
root_certificate=der cer crt pem
|
||||||
|
intermediate_entity_certificate=p12
|
||||||
|
private_certificate=pem key p12
|
||||||
@@ -1266,4 +1266,9 @@ mail_address_monit=Mail Address Monit
|
|||||||
mail_address_reject=Mail Address Reject
|
mail_address_reject=Mail Address Reject
|
||||||
ipsec_protocol=IPSEC Protocol
|
ipsec_protocol=IPSEC Protocol
|
||||||
intercept_intensity=Intercept Related Domains
|
intercept_intensity=Intercept Related Domains
|
||||||
exceeds_duration_limit=File upload failure,The duration of uploaded files exceeds the limit.
|
exceeds_duration_limit=File upload failure,The duration of uploaded files exceeds the limit.
|
||||||
|
file_in_wrong_format=File Format Error
|
||||||
|
select_certificate=Please Select Certificate Type First
|
||||||
|
root_certificate=der cer crt pem
|
||||||
|
intermediate_entity_certificate=p12
|
||||||
|
private_certificate=pem key p12
|
||||||
@@ -1240,4 +1240,9 @@ mail_address_monit=\u90AE\u4EF6\u5730\u5740\u76D1\u6D4B
|
|||||||
mail_address_reject=\u90AE\u4EF6\u5730\u5740\u7BA1\u63A7
|
mail_address_reject=\u90AE\u4EF6\u5730\u5740\u7BA1\u63A7
|
||||||
ipsec_protocol=IPSEC\u534F\u8BAE
|
ipsec_protocol=IPSEC\u534F\u8BAE
|
||||||
intercept_intensity=\u62E6\u622A\u5F3A\u5EA6
|
intercept_intensity=\u62E6\u622A\u5F3A\u5EA6
|
||||||
exceeds_duration_limit=\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25,\u6587\u4EF6\u65F6\u957F\u8D85\u51FA\u9650\u5236.
|
exceeds_duration_limit=\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25,\u6587\u4EF6\u65F6\u957F\u8D85\u51FA\u9650\u5236.
|
||||||
|
file_in_wrong_format=\u6587\u4EF6\u683C\u5F0F\u9519\u8BEF
|
||||||
|
select_certificate=\u8BF7\u5148\u9009\u62E9\u6587\u4EF6\u8BC1\u4E66\u7C7B\u578B
|
||||||
|
root_certificate=der cer crt pem
|
||||||
|
intermediate_entity_certificate=p12
|
||||||
|
private_certificate=pem key p12
|
||||||
@@ -13,9 +13,11 @@ $(function(){
|
|||||||
});
|
});
|
||||||
$("#publicKeyFileI").on('change', function() {
|
$("#publicKeyFileI").on('change', function() {
|
||||||
$("#publicKeyFileInfo").val($("#publicKeyFileI").val());
|
$("#publicKeyFileInfo").val($("#publicKeyFileI").val());
|
||||||
|
publicFileValidate();
|
||||||
});
|
});
|
||||||
$("#privateKeyFileI").on('change', function() {
|
$("#privateKeyFileI").on('change', function() {
|
||||||
$("#privateKeyFileInfo").val($("#privateKeyFileI").val());
|
$("#privateKeyFileInfo").val($("#privateKeyFileI").val());
|
||||||
|
privateFileValidate();
|
||||||
});
|
});
|
||||||
switchKeyringType();
|
switchKeyringType();
|
||||||
$("select[name=keyringType]").on('change', function() {
|
$("select[name=keyringType]").on('change', function() {
|
||||||
@@ -37,6 +39,19 @@ $(function(){
|
|||||||
var privateFile = $("#privateKeyFileI").val();
|
var privateFile = $("#privateKeyFileI").val();
|
||||||
var publicKeyFile = $("#publicKeyFile").val();
|
var publicKeyFile = $("#publicKeyFile").val();
|
||||||
var privateKeyFile = $("#privateKeyFile").val();
|
var privateKeyFile = $("#privateKeyFile").val();
|
||||||
|
|
||||||
|
if(publicFile!=''){
|
||||||
|
if(!publicFileValidate()){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if(privateFile!=''){
|
||||||
|
if(!privateFileValidate()){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if((publicFile==null||publicFile=="") && (publicKeyFile==null || publicKeyFile=="")){
|
if((publicFile==null||publicFile=="") && (publicKeyFile==null || publicKeyFile=="")){
|
||||||
$("div[for='publicKeyFileI']").append("<label id='level-error' class='error' for='publicKeyFileI'><spring:message code='required'></spring:message></label>");
|
$("div[for='publicKeyFileI']").append("<label id='level-error' class='error' for='publicKeyFileI'><spring:message code='required'></spring:message></label>");
|
||||||
return false;
|
return false;
|
||||||
@@ -50,6 +65,7 @@ $(function(){
|
|||||||
},
|
},
|
||||||
errorContainer: "#messageBox"
|
errorContainer: "#messageBox"
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
var switchCfgType=function(){
|
var switchCfgType=function(){
|
||||||
var cfgType=$("input[name='cfgType']:checked").val()
|
var cfgType=$("input[name='cfgType']:checked").val()
|
||||||
@@ -64,6 +80,20 @@ var switchCfgType=function(){
|
|||||||
var switchKeyringType=function(){
|
var switchKeyringType=function(){
|
||||||
var keyringType=$("select[name=keyringType]").val();
|
var keyringType=$("select[name=keyringType]").val();
|
||||||
var expireAfter=$("input[name=expireAfter]").val();
|
var expireAfter=$("input[name=expireAfter]").val();
|
||||||
|
if(keyringType!=''){
|
||||||
|
if(keyringType=='root'){
|
||||||
|
$("#publicInfo").empty();
|
||||||
|
$("#publicInfo").append(" <label ><i class='fa fa-info-circle'></i> <spring:message code='root_certificate'/></label>");
|
||||||
|
}else{
|
||||||
|
$("#publicInfo").empty();
|
||||||
|
$("#publicInfo").append(" <label ><i class='fa fa-info-circle'></i> <spring:message code='intermediate_entity_certificate'/></label>");
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$("#publicInfo").empty();
|
||||||
|
// $("#publicInfo").append(" <label style='color:#ea5200'><i class='fa fa-info-circle'></i> <spring:message code='select_certificate'/></label>");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(keyringType =='end-entity'){ //实体证书不允许输入,并且默认0
|
if(keyringType =='end-entity'){ //实体证书不允许输入,并且默认0
|
||||||
$("input[name=expireAfter]").val(0);
|
$("input[name=expireAfter]").val(0);
|
||||||
$(".expireAfter").addClass("hidden");
|
$(".expireAfter").addClass("hidden");
|
||||||
@@ -74,6 +104,64 @@ var switchKeyringType=function(){
|
|||||||
$(".expireAfter").removeClass("hidden");
|
$(".expireAfter").removeClass("hidden");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//增加对文件后缀名验证
|
||||||
|
function publicFileValidate(){
|
||||||
|
var keyringType=$("select[name=keyringType]").val();
|
||||||
|
var flag=false; //状态,检测文件后缀用
|
||||||
|
var arr=["der","cer","crt","pem","p12"];//使用是什么格式的后缀der、cer、crt、pem
|
||||||
|
if(keyringType=='root'){
|
||||||
|
arr=["der","cer","crt","pem"];
|
||||||
|
}else{
|
||||||
|
arr=["p12"];
|
||||||
|
}
|
||||||
|
var cFile=$("#publicKeyFileI").val();//文件的值
|
||||||
|
//取出上传文件的扩展名
|
||||||
|
var index=cFile.lastIndexOf(".");
|
||||||
|
var ext = cFile.substr(index+1).toLowerCase();
|
||||||
|
//循环比较
|
||||||
|
for(var i=0;i<arr.length;i++)
|
||||||
|
{
|
||||||
|
if(ext == arr[i])
|
||||||
|
{
|
||||||
|
flag = true; //一旦找到合适的,立即退出循环
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//条件判断
|
||||||
|
$("div[for='publicKeyFileInfo']").empty();
|
||||||
|
if(!flag){
|
||||||
|
// ("文件名不合法");
|
||||||
|
$("div[for='publicKeyFileInfo']").append("<label id='level-error' class='error'><spring:message code='file_in_wrong_format'/></label>");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
function privateFileValidate(){
|
||||||
|
var flag=false; //状态,检测文件后缀用
|
||||||
|
var arr=["key","p12","pem"];//使用是什么格式的后缀pem、key、p12
|
||||||
|
var cFile=$("#privateKeyFileI").val();//文件的值
|
||||||
|
//取出上传文件的扩展名
|
||||||
|
var index=cFile.lastIndexOf(".");
|
||||||
|
var ext = cFile.substr(index+1).toLowerCase();
|
||||||
|
//循环比较
|
||||||
|
for(var i=0;i<arr.length;i++)
|
||||||
|
{
|
||||||
|
if(ext == arr[i])
|
||||||
|
{
|
||||||
|
flag = true; //一旦找到合适的,立即退出循环
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//条件判断
|
||||||
|
$("div[for='privateKeyFileInfo']").empty();
|
||||||
|
if(!flag){
|
||||||
|
// ("文件名不合法");
|
||||||
|
$("div[for='privateKeyFileInfo']").append("<label id='level-error' class='error'><spring:message code='file_in_wrong_format'/></label>");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -189,6 +277,7 @@ var switchKeyringType=function(){
|
|||||||
<input id="publicKeyFile" name="publicKeyFile" type="hidden" value="${_cfg.publicKeyFile }"/>
|
<input id="publicKeyFile" name="publicKeyFile" type="hidden" value="${_cfg.publicKeyFile }"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="publicInfo"></div>
|
||||||
<div for="publicKeyFileInfo"></div>
|
<div for="publicKeyFileInfo"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -214,6 +303,7 @@ var switchKeyringType=function(){
|
|||||||
<input id="privateKeyFile" name="privateKeyFile" type="hidden" value="${_cfg.privateKeyFile }"/>
|
<input id="privateKeyFile" name="privateKeyFile" type="hidden" value="${_cfg.privateKeyFile }"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<label ><i class='fa fa-info-circle'></i> <spring:message code='private_certificate'/></label>
|
||||||
<div for="privateKeyFileInfo"></div>
|
<div for="privateKeyFileInfo"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user