验证代理对象的证书是否被拦截策略引用,如被引用,则证书配置不能取消。
This commit is contained in:
@@ -182,13 +182,19 @@ function cancelPassOpt(url){
|
||||
if(validateAllPass(checkboxes)){
|
||||
|
||||
var addrPoolIds = [],canCancel = true;
|
||||
var compileIds = [];
|
||||
$(checkboxes).filter(":checked").each(function(){
|
||||
var addrPoolId = $(this).attr("addressPoolId");
|
||||
var serviceId = $(this).attr("serviceId");
|
||||
var compileId = $(this).attr("compileId");
|
||||
if(typeof addrPoolId != "undefined"){
|
||||
addrPoolIds.push(addrPoolId);
|
||||
}
|
||||
//记录代理证书的配置
|
||||
if(typeof serviceId != "undefined" && serviceId==520 && typeof compileId != "undefined"){
|
||||
compileIds.push(compileId);
|
||||
}
|
||||
});
|
||||
|
||||
// 地址池管理 (被策略引用的地址池不可取消)
|
||||
if(addrPoolIds.length > 0){
|
||||
$.ajax({
|
||||
@@ -204,6 +210,23 @@ function cancelPassOpt(url){
|
||||
}
|
||||
});
|
||||
}
|
||||
if(canCancel){
|
||||
//查询证书是否被拦截策略引用
|
||||
if(compileIds.length > 0){
|
||||
$.ajax({
|
||||
type:'post',
|
||||
url:'${ctx}/proxy/intercept/strateagy/ajaxKeyinfIsUsed',
|
||||
data:{"compileIds":compileIds.join(',')},
|
||||
async:false,
|
||||
success:function(data){//处理返回结果
|
||||
if(data == false){
|
||||
top.$.jBox.tip('<spring:message code="keyring_is_used"/>');
|
||||
canCancel=data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if(canCancel){
|
||||
doAll(checkboxes,url);
|
||||
|
||||
@@ -321,7 +321,7 @@
|
||||
<c:forEach items="${page.list }" var="cfg" varStatus="status" step="1">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" class="i-checks" serviceId="${cfg.serviceId}" id="${cfg.cfgId}" value="${cfg.isAudit}">
|
||||
<input type="checkbox" class="i-checks" serviceId="${cfg.serviceId }" compileId="${cfg.compileId }" id="${cfg.cfgId}" value="${cfg.isAudit}">
|
||||
</td>
|
||||
<td>${cfg.compileId }</td>
|
||||
<td>${cfg.cfgDesc }</td>
|
||||
|
||||
Reference in New Issue
Block a user