修改spoofing
group分解为snat组和dnat组,仿冒IP池引用snat组direction=2,引用dnat组direction=1
This commit is contained in:
@@ -173,7 +173,8 @@
|
|||||||
group_id,
|
group_id,
|
||||||
compile_Id,
|
compile_Id,
|
||||||
cfg_region_code,
|
cfg_region_code,
|
||||||
user_region
|
user_region,
|
||||||
|
port
|
||||||
)values (
|
)values (
|
||||||
#{cfgId,jdbcType=VARCHAR},
|
#{cfgId,jdbcType=VARCHAR},
|
||||||
#{cfgDesc,jdbcType=VARCHAR},
|
#{cfgDesc,jdbcType=VARCHAR},
|
||||||
@@ -202,8 +203,8 @@
|
|||||||
#{groupId, jdbcType=INTEGER},
|
#{groupId, jdbcType=INTEGER},
|
||||||
#{compileId,jdbcType=INTEGER},
|
#{compileId,jdbcType=INTEGER},
|
||||||
#{cfgRegionCode,jdbcType=INTEGER},
|
#{cfgRegionCode,jdbcType=INTEGER},
|
||||||
#{userRegion,jdbcType=VARCHAR}
|
#{userRegion,jdbcType=VARCHAR},
|
||||||
|
#{port,jdbcType=VARCHAR}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
<update id="update" parameterType="com.nis.domain.configuration.PxyObjSpoofingIpPool" >
|
<update id="update" parameterType="com.nis.domain.configuration.PxyObjSpoofingIpPool" >
|
||||||
@@ -261,6 +262,9 @@
|
|||||||
<if test="port != null and port!=''" >
|
<if test="port != null and port!=''" >
|
||||||
port=#{port, jdbcType=VARCHAR},
|
port=#{port, jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="direction != null and direction!=''" >
|
||||||
|
direction=#{direction, jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
<if test="ipType != null" >
|
<if test="ipType != null" >
|
||||||
ip_type=#{ipType, jdbcType=INTEGER},
|
ip_type=#{ipType, jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
|
|||||||
@@ -89,7 +89,6 @@ public class PxyObjSpoofingIpPoolService extends BaseService{
|
|||||||
setAreaEffectiveIds(entity);
|
setAreaEffectiveIds(entity);
|
||||||
//新增
|
//新增
|
||||||
if(StringUtil.isEmpty(entity.getCfgId())){
|
if(StringUtil.isEmpty(entity.getCfgId())){
|
||||||
entity.initDefaultValue();
|
|
||||||
entity.setCreatorId(UserUtils.getUser().getId());
|
entity.setCreatorId(UserUtils.getUser().getId());
|
||||||
entity.setCreateTime(createTime);
|
entity.setCreateTime(createTime);
|
||||||
//调用服务接口获取compileId
|
//调用服务接口获取compileId
|
||||||
|
|||||||
@@ -18,7 +18,10 @@ $(function(){
|
|||||||
}); */
|
}); */
|
||||||
|
|
||||||
if("${_cfg.groupType}" == 4){
|
if("${_cfg.groupType}" == 4){
|
||||||
$("#asnNo").parents(".form-group").removeClass("hidden");
|
$(".asnNo").removeClass("hidden");
|
||||||
|
}
|
||||||
|
if("${_cfg.groupType}" == 6){
|
||||||
|
$(".groupType").removeClass("hidden");
|
||||||
}
|
}
|
||||||
/* $("#groupType").on("change",function(){
|
/* $("#groupType").on("change",function(){
|
||||||
if($(this).val() != 4){
|
if($(this).val() != 4){
|
||||||
@@ -36,6 +39,12 @@ $(function(){
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
submitHandler: function(form){
|
submitHandler: function(form){
|
||||||
|
if("${_cfg.groupType}" == 4){
|
||||||
|
$(".asnNo").removeClass("hidden");
|
||||||
|
}
|
||||||
|
if("${_cfg.groupType}" == 6){
|
||||||
|
$("#asnNo").val($(".groupType").find("#asnNo").val());
|
||||||
|
}
|
||||||
loading('onloading...');
|
loading('onloading...');
|
||||||
form.submit();
|
form.submit();
|
||||||
},
|
},
|
||||||
@@ -115,13 +124,30 @@ $(function(){
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<div class="form-group hidden">
|
<div class="form-group asnNo hidden">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="asn_no"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="asn_no"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<input id="asnNo" class="form-control required asnNoUnique number" type="text" name="asnNo" value="${_cfg.asnNo}" autocomplete="off" maxlength="15" ctx="${ctx }">
|
<input id="asnNo" class="form-control required asnNoUnique number" type="text" name="asnNo" value="${_cfg.asnNo}" autocomplete="off" maxlength="15" ctx="${ctx }">
|
||||||
</div>
|
</div>
|
||||||
<div for="asnNo"></div>
|
<div for="asnNo"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group groupType hidden">
|
||||||
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="group_type"/></label>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<select name="asnNo" id="asnNo" class="selectpicker show-tick form-control required">
|
||||||
|
<c:forEach items="${fns:getDictList('IR_TYPE')}" var="ipTypeC">
|
||||||
|
<option value="${ipTypeC.itemCode}"
|
||||||
|
<c:if test="${_cfg.asnNo==ipTypeC.itemCode}">
|
||||||
|
selected
|
||||||
|
</c:if>
|
||||||
|
>
|
||||||
|
<spring:message code="${ipTypeC.itemValue}"/>
|
||||||
|
</option>
|
||||||
|
</c:forEach>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div for="asnNo"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -264,6 +264,9 @@
|
|||||||
<c:if test="${cfg.groupType==4}">
|
<c:if test="${cfg.groupType==4}">
|
||||||
<th><spring:message code="asn_no"/></th>
|
<th><spring:message code="asn_no"/></th>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
<%-- <c:if test="${cfg.groupType==6}">
|
||||||
|
<th><spring:message code="group_type"/></th>
|
||||||
|
</c:if> --%>
|
||||||
<th><spring:message code="desc"/></th>
|
<th><spring:message code="desc"/></th>
|
||||||
<th><spring:message code="creator"/></th>
|
<th><spring:message code="creator"/></th>
|
||||||
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
<th class="sort-column r.create_time"><spring:message code="config_time"/></th>
|
||||||
@@ -282,14 +285,31 @@
|
|||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
<c:choose>
|
||||||
<c:forEach items="${fns:getDictList('GROUP_TYPE')}" var="groupTypeC">
|
<c:when test="${cfg.groupType==6 }">
|
||||||
<c:if test="${cfg.groupType==groupTypeC.itemCode }"><spring:message code="${groupTypeC.itemValue}"/></c:if>
|
<c:forEach items="${fns:getDictList('IR_TYPE')}" var="groupTypeC">
|
||||||
</c:forEach>
|
<c:if test="${cfg.asnNo==groupTypeC.itemCode }"><spring:message code="${groupTypeC.itemValue}"/></c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</c:when>
|
||||||
|
<c:otherwise>
|
||||||
|
<c:forEach items="${fns:getDictList('GROUP_TYPE')}" var="groupTypeC">
|
||||||
|
<c:if test="${cfg.groupType==groupTypeC.itemCode }"><spring:message code="${groupTypeC.itemValue}"/></c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</c:otherwise>
|
||||||
|
</c:choose>
|
||||||
</td>
|
</td>
|
||||||
<c:if test="${cfg.groupType==4}">
|
<c:if test="${cfg.groupType==4}">
|
||||||
<td>${cfg.asnNo}</td>
|
<td>${cfg.asnNo}</td>
|
||||||
</c:if>
|
</c:if>
|
||||||
|
<%-- <c:if test="${cfg.groupType==6}">
|
||||||
|
<td>
|
||||||
|
<c:forEach items="${fns:getDictList('IR_TYPE')}" var="ipTypeC">
|
||||||
|
<c:if test="${cfg.asnNo==ipTypeC.itemCode}">
|
||||||
|
${ipTypeC.itemValue }
|
||||||
|
</c:if>
|
||||||
|
</c:forEach>
|
||||||
|
</td>
|
||||||
|
</c:if> --%>
|
||||||
<td title="${cfg.description }">${fns:abbr(cfg.description,20)}</td>
|
<td title="${cfg.description }">${fns:abbr(cfg.description,20)}</td>
|
||||||
<td>${cfg.creatorName }</td>
|
<td>${cfg.creatorName }</td>
|
||||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||||
|
|||||||
@@ -14,6 +14,12 @@ $(function(){
|
|||||||
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
|
||||||
},
|
},
|
||||||
submitHandler: function(form){
|
submitHandler: function(form){
|
||||||
|
var groupType = $("#group").find("option:selected").attr("groupType");
|
||||||
|
if(groupType==0){//snat
|
||||||
|
$("#direction").val(2);
|
||||||
|
}else{//dnat
|
||||||
|
$("#direction").val(1);
|
||||||
|
}
|
||||||
loading('onloading...');
|
loading('onloading...');
|
||||||
form.submit();
|
form.submit();
|
||||||
},
|
},
|
||||||
@@ -46,7 +52,7 @@ $(function(){
|
|||||||
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
|
||||||
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
<input type="hidden" name="compileId" value="${_cfg.compileId}">
|
||||||
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
<input type="hidden" name="functionId" value="${_cfg.functionId}">
|
||||||
<input type="hidden" name="direction" value="0">
|
<input type="hidden" name="direction" id="direction" value="0">
|
||||||
<input type="hidden" name="location" value="0">
|
<input type="hidden" name="location" value="0">
|
||||||
<input type="hidden" name="protocol" value="0">
|
<input type="hidden" name="protocol" value="0">
|
||||||
<input type="hidden" name="port" value="0">
|
<input type="hidden" name="port" value="0">
|
||||||
@@ -83,10 +89,9 @@ $(function(){
|
|||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="group"/></label>
|
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="group"/></label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<select name="groupId" class="selectpicker show-tick form-control required">
|
<select name="groupId" id="group" class="selectpicker show-tick form-control required">
|
||||||
<option value="" ><spring:message code="select"/></option>
|
|
||||||
<c:forEach items="${policyGroups }" var="policyGroup">
|
<c:forEach items="${policyGroups }" var="policyGroup">
|
||||||
<option value="${policyGroup.groupId}" <c:if test="${_cfg.groupId==policyGroup.groupId }">selected</c:if>><spring:message code="${policyGroup.groupName}"/></option>
|
<option value="${policyGroup.groupId}" groupType="${policyGroup.asnNo }" <c:if test="${_cfg.groupId==policyGroup.groupId }">selected</c:if>><spring:message code="${policyGroup.groupName}"/></option>
|
||||||
</c:forEach>
|
</c:forEach>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
@@ -130,8 +135,7 @@ $(function(){
|
|||||||
<select name="ipType" class="selectpicker show-tick form-control required">
|
<select name="ipType" class="selectpicker show-tick form-control required">
|
||||||
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipTypeC">
|
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipTypeC">
|
||||||
<option value="${ipTypeC.itemCode}"
|
<option value="${ipTypeC.itemCode}"
|
||||||
<c:if test="${_cfg.ipType==ipTypeC.itemCode
|
<c:if test="${_cfg.ipType==ipTypeC.itemCode }">
|
||||||
|| (_cfg.ipType==null && ipTypeC.itemCode==4)}">
|
|
||||||
selected
|
selected
|
||||||
</c:if>
|
</c:if>
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user