增加地址池管理查看所有IP、策略管理用户类型检索.
This commit is contained in:
@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.IpReuseIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.IpAddrPoolCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
@@ -175,5 +176,12 @@ public class IpAddrPoolController extends BaseController{
|
||||
resultMap=ConfigServiceUtil.getCGIInfo(url, cmd, params);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value = {"/getAllIpInfo"})
|
||||
public List<IpReuseIpCfg> getAllIpInfo(Integer addrPoolId,HttpServletRequest request,HttpServletResponse response){
|
||||
List<IpReuseIpCfg> ipList = ipReuseIpCfgService.getPolicyIpInfo(addrPoolId);
|
||||
return ipList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,4 +14,5 @@ public interface IpReuseIpCfgDao extends CrudDao<IpReuseIpCfg> {
|
||||
List<IpReuseIpCfg> findPage(IpReuseIpCfg userIpCfg);
|
||||
IpReuseIpCfg getUserIpCfg(Long cfgId);
|
||||
IpReuseIpCfg getIpByIp(String destIpAddress);
|
||||
List<IpReuseIpCfg> getPolicyIpInfo(@Param("addrPoolId")Integer addrPoolId);
|
||||
}
|
||||
|
||||
@@ -182,6 +182,15 @@
|
||||
where r.is_valid !=-1 and r.cfg_id=#{cfgId}
|
||||
</select>
|
||||
|
||||
<select id="getPolicyIpInfo" resultMap="reuserIpCfgMap">
|
||||
SELECT
|
||||
<include refid="columns"></include>
|
||||
FROM
|
||||
ip_reuse_ip_cfg r
|
||||
WHERE
|
||||
r.is_valid !=-1 AND r.user_region1 = #{addrPoolId}
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.nis.domain.basics.IpReuseIpCfg" >
|
||||
insert into ip_reuse_ip_cfg (
|
||||
CFG_DESC,
|
||||
|
||||
@@ -81,6 +81,9 @@
|
||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||
AND r.src_ip_address=#{srcIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="userType != null and userType != ''">
|
||||
AND r.user_type=#{userType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="userName != null and userName != ''">
|
||||
AND r.user_name LIKE concat(concat('%',#{userName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
|
||||
@@ -102,4 +102,13 @@ public class IpReuseIpCfgService extends BaseService{
|
||||
ipReuseIpCfgDao.update(entity);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 策略管理:获取所有IP信息
|
||||
* @param addrPoolId
|
||||
* @return
|
||||
*/
|
||||
public List<IpReuseIpCfg> getPolicyIpInfo(Integer addrPoolId) {
|
||||
return ipReuseIpCfgDao.getPolicyIpInfo(addrPoolId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1347,4 +1347,5 @@ policy_sipv6_user=Three tier access to IP(IPv6)
|
||||
creat_time=Creat Time
|
||||
close_time=Close Time
|
||||
nat_ip=Multiplexed IP Address
|
||||
traffic=Traffic
|
||||
traffic=Traffic
|
||||
ip_info=IP Info
|
||||
@@ -1348,4 +1348,5 @@ user_type=User Type
|
||||
policy_vpn_user=VPN access user name
|
||||
policy_sipv4_user=Three tier access to IP(IPv4)
|
||||
policy_sipv6_user=Three tier access to IP(IPv6)
|
||||
traffic=Traffic
|
||||
traffic=Traffic
|
||||
ip_info=IP Info
|
||||
@@ -1345,4 +1345,5 @@ policy_sipv6_user=\u4E09\u5C42\u63A5\u5165\u6E90IP(IPv6)
|
||||
creat_time=\u94FE\u63A5\u5EFA\u7ACB\u65F6\u95F4
|
||||
close_time=\u94FE\u63A5\u7ED3\u675F\u65F6\u95F4
|
||||
nat_ip=\u590D\u7528\u7684IP\u5730\u5740
|
||||
traffic=Traffic
|
||||
traffic=Traffic
|
||||
ip_info=IP\u5730\u5740\u4FE1\u606F
|
||||
@@ -0,0 +1,5 @@
|
||||
UPDATE function_region_dict SET config_ip_pattern = '1,3' WHERE dict_id = 68 AND function_id = 300;
|
||||
|
||||
ALTER TABLE ip_reuse_policy_cfg ADD ip_type INT(11) DEFAULT NULL COMMENT 'IPV4=4,IPV6=6';
|
||||
ALTER TABLE ip_reuse_policy_cfg ADD ip_pattern INT(11) DEFAULT NULL;
|
||||
ALTER TABLE ip_reuse_policy_cfg ADD src_ip_address VARCHAR(128) DEFAULT NULL;
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user