1.地址池管理增加 删除限制 2.策略分组管理去掉SNAT/DNAT IP类型

This commit is contained in:
zhangwq
2018-11-29 15:49:47 +08:00
parent 606b8a7550
commit f06e596cda
13 changed files with 92 additions and 14 deletions

View File

@@ -51,6 +51,7 @@ function del(url){
top.$.jBox.tip("<spring:message code='has_prohibit_delete'/>", "<spring:message code='info'/>");
return;
}else{
var addrPoolIds = [];
var serviceGroupIds=[],ids=[],canDel=true;
$(checkboxes).filter(":checked").each(function(){
if($(this).attr("serviceGroupId")&&$(this).attr("isValid")){
@@ -59,6 +60,10 @@ function del(url){
}
ids.push($(this).attr("id"));
}
var addrPoolId = $(this).attr("addressPoolId");
if(typeof addrPoolId != "undefined"){
addrPoolIds.push(addrPoolId);
}
})
if(serviceGroupIds.length>0){
$.ajax({
@@ -74,6 +79,23 @@ function del(url){
}
});
}
// 地址池管理 (只有未被策略引用的地址池可删除)
if(addrPoolIds.length > 0){
$.ajax({
type:'post',
url:'${ctx}/maintenance/ipMultiplexPoolCfg/ajaxIsUsed',
data:{"addrPoolIds":addrPoolIds.join(',')},
async:false,
success:function(data){//处理返回结果
if(data == false){
top.$.jBox.tip('<spring:message code="address_pool_is_used"/>');
canDel=data;
}
}
});
}
if(canDel){
doAll(checkboxes,url);
}

View File

@@ -83,7 +83,9 @@ $(function(){
<div class="col-md-6">
<select id="groupType" name="groupType" class="selectpicker select2 form-control required" >
<c:forEach items="${fns:getDictList('GROUP_TYPE')}" var="groupTypeC">
<option value="${groupTypeC.itemCode}" <c:if test="${_cfg.groupType==groupTypeC.itemCode || (_cfg.groupType==null && groupTypeC.itemCode==1)}">selected</c:if>><spring:message code="${groupTypeC.itemValue}"/></option>
<c:if test="${groupTypeC.itemCode ne 2 && groupTypeC.itemCode ne 3}">
<option value="${groupTypeC.itemCode}" <c:if test="${_cfg.groupType==groupTypeC.itemCode || (_cfg.groupType==null && groupTypeC.itemCode==1)}">selected</c:if>><spring:message code="${groupTypeC.itemValue}"/></option>
</c:if>
</c:forEach>
</select>
</div>

View File

@@ -119,13 +119,15 @@
<select name="groupType" class="selectpicker select2 input-small">
<option value=""><spring:message code="all_types"/></option>
<c:forEach items="${fns:getDictList('GROUP_TYPE')}" var="groupTypeC">
<option value="${groupTypeC.itemCode}"
<c:if test="${cfg.groupType==groupTypeC.itemCode}">
selected
</c:if>
>
<spring:message code="${groupTypeC.itemValue}"/>
</option>
<c:if test="${groupTypeC.itemCode ne 2 && groupTypeC.itemCode ne 3}">
<option value="${groupTypeC.itemCode}"
<c:if test="${cfg.groupType==groupTypeC.itemCode}">
selected
</c:if>
>
<spring:message code="${groupTypeC.itemValue}"/>
</option>
</c:if>
</c:forEach>
</select>
</div>

View File

@@ -314,7 +314,7 @@
<tbody>
<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}"></td>
<td><input type="checkbox" class="i-checks" serviceId="${cfg.serviceId}" id="${cfg.cfgId}" value="${cfg.isAudit}" addressPoolId="${cfg.addrPoolId }" ></td>
<td>${cfg.addrPoolId }</td>
<td>
<a href="javascript:;" data-original-title="${cfg.addrPoolName}"