增加地址池管理查看所有IP、策略管理用户类型检索.

This commit is contained in:
zhangwq
2018-12-06 18:15:27 +08:00
parent 68a28366a0
commit 7a99f6b758
11 changed files with 108 additions and 11 deletions

View File

@@ -84,7 +84,7 @@
success:function(data,status){
var dataArr = data.candidate_ip;
var html = ""
html = "<div style='width:98%; overflow: auto; height: 300px; margin-left: 1%; margin-right: 1%;'><br>"
html = "<div style='width:98%; overflow: auto; 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){
@@ -111,6 +111,35 @@
}
});
}
function getAllIpInfo(obj){
var addrPoolId = $(obj).attr("addrPoolId");
$.ajax({
data:{"addrPoolId":addrPoolId},
url:"${ctx}/maintenance/ipMultiplexPoolCfg/getAllIpInfo",
async:true,
success:function(data,status){
var html = ""
html = "<div style='width:98%; overflow: auto; height: 300px; margin-left: 1%; margin-right: 1%;'>"
html+="<table class='table table-bordered table-condensed text-nowrap' style='width: 100%;'>";
html+="<tbody>";
if(data.length == 0){
html+="<tr>";
html+="<td>"+"<spring:message code="no_data"/>"+"</td>";
html+="</tr>";
}
for(i=0;i<data.length;i++){
html+="<tr>";
html+="<td>"+data[i].srcIpAddress+"</td>";
html+="</tr>";
}
html+="</tbody>";
html+="</table>";
html+="</div>";
top.$.jBox(html,{width: $(document).width()*0.4,height: 380,title:"<spring:message code="ip_info"/>", buttons:{"<spring:message code="close"/>":true}});
}
});
}
</script>
</head>
<body>
@@ -365,11 +394,11 @@
<th class="sort-column r.is_valid"><spring:message code="valid_identifier"/></th>
<th><spring:message code="is_audit"/></th>
<%-- <th><spring:message code="whether_area_block"/></th> --%>
<th><spring:message code="operation"/></th>
<th><spring:message code="letter"/></th>
<th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th>
<%-- <th><spring:message code="operation"/></th> --%>
<th><spring:message code="creator"/></th>
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
<th><spring:message code="editor"/></th>
@@ -420,6 +449,11 @@
</a>
</c:if>
</td> --%>
<td>
<!-- <a href="#">新增IP</a>
<a href="#">删除IP</a> -->
<a href="javascript:;" onclick="getAllIpInfo(this)" addrPoolId="${cfg.cfgId }"><spring:message code="show_detail"/></a>
</td>
<td>${cfg.requestName }</td>
<td>
<c:set var="classify"></c:set>
@@ -478,11 +512,6 @@
${fns:abbr(lableInfo,20)}
</a>
</td>
<%-- <td>
<!-- <a href="#">新增IP</a>
<a href="#">删除IP</a> -->
<a href="javascript:;" onclick="getInfo(this)" addrPoolId="${cfg.cfgId }"><spring:message code="show_detail"/></a>
</td> --%>
<td>${cfg.creatorName }</td>
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${cfg.editorName }</td>

View File

@@ -20,10 +20,33 @@
}else{
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
}
// 处理用户类型检索条件
if($("#seltype").val() == "userType"){
$("#intype").hide();// 隐藏输入框
$("#isValid").selectpicker("hide");
}else{
$("#userType").selectpicker("hide");
}
$("#seltype").change(function(){
if($(this).val() == "userType"){
$("#intype").hide();// 隐藏输入框
$("#intype").val("");// 清空input条件
$("#userType").find("option").removeAttr("selected",false);
$("#userType").selectpicker("refresh");
$("#userType").selectpicker("show");
$("#isValid").selectpicker("hide");
}else if($(this).val() == "isValid"){
$("#userType").find("option:first").attr("selected",true);
$("#userType").selectpicker("hide");
}else{
$("#userType").find("option:first").attr("selected",true);
$("#userType").selectpicker("hide");// 隐藏下拉框
}
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
});
//筛选功能初始化
//筛选功能初始化
filterActionInit();
$("#isAudit").change(function(){
page();
@@ -102,6 +125,7 @@
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="srcIpAddress"><spring:message code="ip"></spring:message></form:option>
<form:option value="userName"><spring:message code="user"></spring:message></form:option>
<form:option value="userType"><spring:message code="user_type"></spring:message></form:option>
<form:option value="addrPoolName"><spring:message code="address_pool"></spring:message></form:option>
<form:option value="isValid"><spring:message code="valid_identifier"></spring:message></form:option>
</form:select>
@@ -115,6 +139,12 @@
<form:option value="1"><spring:message code="yes"/></form:option>
<form:option value="0"><spring:message code="no"/></form:option>
</form:select>
<form:select path="userType" class="selectpicker select2 input-small" >
<form:option value=""><spring:message code="select"/></form:option>
<form:option value="VPN"><spring:message code="policy_vpn_user"/></form:option>
<form:option value="SIPv4"><spring:message code="policy_sipv4_user"/></form:option>
<form:option value="SIPv6"><spring:message code="policy_sipv6_user"/></form:option>
</form:select>
</div>
</div>
</div>