vpn 用户管理修改新增修改和删除逻辑
ip地址池增加存在可用ip地址池才在策略展示
This commit is contained in:
@@ -463,7 +463,8 @@ var resetIndex = function(){
|
||||
</c:forEach>
|
||||
|
||||
<br>
|
||||
<%@include file="/WEB-INF/include/form/areaInfo.jsp"%>
|
||||
<input name="isAreaEffective" type="hidden" value="0">
|
||||
<%-- <%@include file="/WEB-INF/include/form/areaInfo.jsp"%> --%>
|
||||
<br>
|
||||
<%@include file="/WEB-INF/include/form/basicInfo.jsp" %>
|
||||
</div>
|
||||
|
||||
@@ -50,15 +50,14 @@
|
||||
if(audit == 1){
|
||||
// $.getJSON(requestUrl,function(data,status){});
|
||||
$.ajax({
|
||||
type:'get',
|
||||
timeout:15000,// 超时时间
|
||||
url:requestUrl+addrPoolId,
|
||||
dataType:'jsonp',
|
||||
data:{"addrPoolId":addrPoolId,"cmd":"IpNumGet"},
|
||||
url:"${ctx}/maintenance/ipMultiplexPoolCfg/getCGIInfo",
|
||||
async:true,
|
||||
success:function(data,status){
|
||||
if(status == "success"){
|
||||
if(status == "success"){
|
||||
$(td).html(data.num);
|
||||
}
|
||||
}
|
||||
},
|
||||
complete:function(XMLHttpRequest,status){
|
||||
if(status=="timeout"){
|
||||
@@ -78,34 +77,40 @@
|
||||
});
|
||||
function getInfo(obj){
|
||||
var addrPoolId = $(obj).attr("addrPoolId");
|
||||
$.ajax({
|
||||
type:'get',
|
||||
url:'http://192.168.11.137:8090/command/?cmd=AllIpGet&addr_pool_id='+addrPoolId,
|
||||
dataType:'jsonp',
|
||||
async:true,
|
||||
success:function(data,status){
|
||||
//var dataArr = [];
|
||||
var dataArr = data.candidate_ip;
|
||||
var html = ""
|
||||
html = "<div style='width:98%;overflow: auto;margin-top: 10px;height: 300px;margin-left: 1%;margin-right: 1%;'>"
|
||||
html+="<table class='table table-bordered table-condensed text-nowrap' style='width: 100%;'>";
|
||||
html+="<tbody>";
|
||||
if(dataArr.length == 0){
|
||||
html+="<tr>";
|
||||
html+="<td>("+"<spring:message code="nothing"/>"+")</td>";
|
||||
html+="</tr>";
|
||||
}
|
||||
for(i=0;i<dataArr.length;i++){
|
||||
html+="<tr>";
|
||||
html+="<td>"+dataArr[i]+"</td>";
|
||||
html+="</tr>";
|
||||
}
|
||||
html+="</tbody>";
|
||||
html+="</table>";
|
||||
html+="</div>";
|
||||
top.$.jBox(html,{width: $(document).width()*0.4,height: 380,persistent: false,title:"<spring:message code="available_ip"/>", buttons:{"<spring:message code="close"/>":true}});
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
timeout:15000,// 超时时间
|
||||
data:{"addrPoolId":addrPoolId,"cmd":"AllIpGet"},
|
||||
url:"${ctx}/maintenance/ipMultiplexPoolCfg/getCGIInfo",
|
||||
async:true,
|
||||
success:function(data,status){
|
||||
var dataArr = data.candidate_ip;
|
||||
var html = ""
|
||||
html = "<div style='width:98%;overflow: auto;margin-top: 10px;height: 300px;margin-left: 1%;margin-right: 1%;'><br>"
|
||||
html+="<table class='table table-bordered table-condensed text-nowrap' style='width: 100%;'>";
|
||||
html+="<tbody>";
|
||||
if(dataArr.length == 0){
|
||||
html+="<tr>";
|
||||
html+="<td>("+"<spring:message code="no_data"/>"+")</td>";
|
||||
html+="</tr>";
|
||||
}
|
||||
for(i=0;i<dataArr.length;i++){
|
||||
html+="<tr>";
|
||||
html+="<td>"+dataArr[i]+"</td>";
|
||||
html+="</tr>";
|
||||
}
|
||||
html+="</tbody>";
|
||||
html+="</table>";
|
||||
html+="</div>";
|
||||
top.$.jBox(html,{width: $(document).width()*0.4,height: 380,persistent: false,title:"<spring:message code="available_ip"/>", buttons:{"<spring:message code="close"/>":true}});
|
||||
},
|
||||
complete:function(XMLHttpRequest,status){
|
||||
if(status=="timeout"){
|
||||
$(td).html(timeout);
|
||||
}else if(status !="success"){
|
||||
$(td).html(failed);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
|
||||
@@ -48,7 +48,7 @@ var saveIp=function(){
|
||||
value="${user.serverIp}" labelName="user.serverIp"
|
||||
notAllowSelectParent="true" enableSearch="true"
|
||||
notAllowSelectRoot="true" checkedPS="ps" unCheckedPS="ps"
|
||||
labelValue="${user.serverIp}" title="vpn_ip"
|
||||
labelValue="${fn:substring(user.serverIp,0,(fn:length(user.serverIp)-1)) }" title="vpn_ip"
|
||||
url="/maintenance/userManage/treeData?isLeafShow=false&cfgType=3&specific=true" extId="0"
|
||||
checked="true" cssClass="form-control required" />
|
||||
</div>
|
||||
|
||||
@@ -239,12 +239,13 @@
|
||||
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.id}" isValid="${cfg.isValid}" value="0" >
|
||||
</td>
|
||||
<td>${indexCfg.userName }</td>
|
||||
<td class="no_substr" title="${indexCfg.serverIp }"><a href="javascript:dictDetail('${indexCfg.serverIp}','${indexCfg.userName}')">
|
||||
<c:if test="${fn:length(indexCfg.serverIp)>28}">
|
||||
${fn:substring(indexCfg.serverIp,0,20)}..
|
||||
<c:set var="serverIp" value="${fn:substring(indexCfg.serverIp,0,(fn:length(indexCfg.serverIp)-1)) }"></c:set>
|
||||
<td class="no_substr" title="${serverIp }"><a href="javascript:dictDetail('${serverIp}','${indexCfg.userName}')">
|
||||
<c:if test="${fn:length(serverIp)>28}">
|
||||
${fn:substring(serverIp,0,20)}..
|
||||
</c:if>
|
||||
<c:if test="${fn:length(indexCfg.serverIp)<=28}">
|
||||
${indexCfg.serverIp }
|
||||
<c:if test="${fn:length(serverIp)<=28}">
|
||||
${serverIp }
|
||||
</c:if>
|
||||
</a></td>
|
||||
<td>${indexCfg.remarks }</td>
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
value="${user.serverIp}" labelName="user.serverIp"
|
||||
notAllowSelectParent="true" enableSearch="true"
|
||||
notAllowSelectRoot="true" checkedPS="ps" unCheckedPS="ps"
|
||||
labelValue="${user.serverIp}" title="vpn_ip"
|
||||
labelValue="${fn:substring(user.serverIp,0,(fn:length(user.serverIp)-1)) }" title="vpn_ip"
|
||||
url="/maintenance/userManage/treeData?isLeafShow=false&cfgType=3&specific=true" extId="0"
|
||||
checked="true" cssClass="form-control required" />
|
||||
</div>
|
||||
@@ -123,9 +123,15 @@
|
||||
<form:input path="userName" htmlEscape="false" maxlength="50"
|
||||
readonly="true" class="required form-control" />
|
||||
</c:if> --%>
|
||||
|
||||
<c:if test="${!(empty user.id)}">
|
||||
<form:input path="userName" readonly="true" htmlEscape="false" maxlength="50"
|
||||
class="required form-control" />
|
||||
</c:if>
|
||||
<c:if test="${empty user.id}">
|
||||
<form:input path="userName" htmlEscape="false" maxlength="50"
|
||||
class="required form-control" />
|
||||
</c:if>
|
||||
|
||||
</div>
|
||||
<div for="userName"></div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user