地址池可用IP查询.

This commit is contained in:
zhangwq
2018-11-29 20:46:47 +08:00
parent 812c613872
commit 740b73aa22

View File

@@ -37,7 +37,42 @@
$("#exportValue").val($("#intype").val());
}
}
$("td[addrPoolId]").each(function(){
var td = $(this);
var audit = $(this).attr("audit")
var addrPoolId = $(this).attr("addrPoolId");
var timeout=$.validator.messages.timeout;
var failed=$.validator.messages.failed;
// 判断是否为审核通过状态
if(audit == 1){
$.ajax({
type:'get',
timeout:10000,// 超时时间
url:'http://192.168.11.137:8090/command/?cmd=IpNumGet&addr_pool_id='+addrPoolId,
dataType:'json',
async:true,
success:function(data){
//alert(JSON.stringify(data));
$(td).html(data.num);
},
complete:function(XMLHttpRequest,status){
if(status=="timeout"){
$(td).html(timeout);
}else if(status !="success"){
$(td).html(failed);
}
}
});
}else {
$(td).html(0);
}
});
});
</script>
</head>
<body>
@@ -323,7 +358,7 @@
</a>
</td>
<td>${cfg.ipTotal }</td>
<td>${cfg.availableIpTotal }</td>
<td audit="${cfg.isAudit}" addrPoolId="${cfg.addrPoolId }"><div class="loading-total"></div></td>
<td>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">