ip增加源目的不相同校验

action默认选中第一个动作
list列表type修改为classification
This commit is contained in:
duandongmei
2018-07-13 18:17:38 +08:00
parent 7248fff6a5
commit e4d280dc79
60 changed files with 252 additions and 148 deletions

View File

@@ -21,7 +21,7 @@
<!--/span--> <!--/span-->
<div class="col-md-6"> <div class="col-md-6">
<div class="form-group"> <div class="form-group">
<label class="control-label col-md-3"><spring:message code="type"/></label> <label class="control-label col-md-3"><spring:message code="classification"/></label>
<div class="col-md-6"> <div class="col-md-6">
<select name="classify" multiple class="selectpicker form-control" title=<spring:message code="select"/>> <select name="classify" multiple class="selectpicker form-control" title=<spring:message code="select"/>>
<c:forEach items="${fls}" var="fl"> <c:forEach items="${fls}" var="fl">

View File

@@ -275,7 +275,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -275,7 +275,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -276,7 +276,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -272,7 +272,7 @@
<th><input type="checkbox" class="i-checks" id="checkAll"></th> <th><input type="checkbox" class="i-checks" id="checkAll"></th>
<th class="cfgDesc"><spring:message code="config_describe"/></th> <th class="cfgDesc"><spring:message code="config_describe"/></th>
<th><spring:message code="social_app"/></th> <th><spring:message code="social_app"/></th>
<th>ip<spring:message code="type"/></th> <th>IP<spring:message code="type"/></th>
<%-- <th><spring:message code="client_ip"/></th> <%-- <th><spring:message code="client_ip"/></th>
<th><spring:message code="client_port"/></th> --%> <th><spring:message code="client_port"/></th> --%>
<th><spring:message code="server_ip"/></th> <th><spring:message code="server_ip"/></th>
@@ -281,7 +281,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -314,7 +314,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -322,7 +322,7 @@
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<!-- <th>编译id</th> --> <!-- <th>编译id</th> -->
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<!-- <th>区域生效id</th> --> <!-- <th>区域生效id</th> -->

View File

@@ -83,7 +83,7 @@ $(function(){
serviceId="${service.serviceId }" serviceId="${service.serviceId }"
protocolId="${service.protocolId }" protocolId="${service.protocolId }"
value="${service.action }" class="required action" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }"> <c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/> <spring:message code="${dict.itemValue }"/>

View File

@@ -288,7 +288,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -107,7 +107,7 @@ $(function(){
serviceId="${service.serviceId }" serviceId="${service.serviceId }"
protocolId="${service.protocolId }" protocolId="${service.protocolId }"
value="${service.action }" class="required action" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }"> <c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/> <spring:message code="${dict.itemValue }"/>

View File

@@ -281,7 +281,7 @@
<th><spring:message code="log_total"/></th> <th><spring:message code="log_total"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -191,19 +191,23 @@ $(function(){
<div class="form-group"> <div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="action"/></label> <label class="control-label col-md-3"><font color="red">*</font><spring:message code="action"/></label>
<div class="col-md-6"> <div class="col-md-6">
<c:forEach items="${serviceList}" var="service"> <c:forEach items="${serviceList}" var="service"
<label class="radio-inline"> varStatus="satus">
<c:if test="${_cfg.functionId eq service.functionId}"> <label class="radio-inline"> <c:if
<input type="radio" name="action" serviceId="${service.serviceId }" value="${service.action }" class="required action" test="${_cfg.functionId eq service.functionId}">
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <input type="radio" name="action"
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> serviceId="${service.serviceId }"
<c:if test="${dict.itemCode eq service.action }"> protocolId="${service.protocolId }"
<spring:message code="${dict.itemValue }"/> value="${service.action }" class="required action"
</c:if> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
</c:forEach> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
</c:if> <c:if test="${dict.itemCode eq service.action }">
</label> <spring:message code="${dict.itemValue }"/>
</c:forEach> </c:if>
</c:forEach>
</c:if>
</label>
</c:forEach>
</div> </div>
<div for="action"></div> <div for="action"></div>
</div> </div>

View File

@@ -276,7 +276,7 @@
<th><spring:message code="config_describe"/></th> <th><spring:message code="config_describe"/></th>
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -83,7 +83,7 @@ $(function(){
serviceId="${service.serviceId }" serviceId="${service.serviceId }"
protocolId="${service.protocolId }" protocolId="${service.protocolId }"
value="${service.action }" class="required action" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }"> <c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/> <spring:message code="${dict.itemValue }"/>

View File

@@ -288,7 +288,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -99,7 +99,7 @@ $(function(){
serviceId="${service.serviceId }" serviceId="${service.serviceId }"
protocolId="${service.protocolId }" protocolId="${service.protocolId }"
value="${service.action }" class="required action" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }"> <c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/> <spring:message code="${dict.itemValue }"/>

View File

@@ -282,7 +282,7 @@
<th><spring:message code="log_total"/></th> <th><spring:message code="log_total"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -128,19 +128,23 @@ $(function(){
<div class="form-group"> <div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="action"/></label> <label class="control-label col-md-3"><font color="red">*</font><spring:message code="action"/></label>
<div class="col-md-6"> <div class="col-md-6">
<c:forEach items="${serviceList}" var="service"> <c:forEach items="${serviceList}" var="service"
<label class="radio-inline"> varStatus="satus">
<c:if test="${_cfg.functionId eq service.functionId}"> <label class="radio-inline"> <c:if
<input type="radio" name="action" serviceId="${service.serviceId }" value="${service.action }" class="required action" test="${_cfg.functionId eq service.functionId}">
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <input type="radio" name="action"
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> serviceId="${service.serviceId }"
<c:if test="${dict.itemCode eq service.action }"> protocolId="${service.protocolId }"
<spring:message code="${dict.itemValue }"/> value="${service.action }" class="required action"
</c:if> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
</c:forEach> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
</c:if> <c:if test="${dict.itemCode eq service.action }">
</label> <spring:message code="${dict.itemValue }"/>
</c:forEach> </c:if>
</c:forEach>
</c:if>
</label>
</c:forEach>
</div> </div>
<div for="action"></div> <div for="action"></div>
</div> </div>

View File

@@ -279,7 +279,7 @@
<th><spring:message code="config_describe"/></th> <th><spring:message code="config_describe"/></th>
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -136,7 +136,7 @@ var delContent=function(contentClassName,addBtnClassName){
serviceId="${service.serviceId }" serviceId="${service.serviceId }"
protocolId="${service.protocolId }" protocolId="${service.protocolId }"
value="${service.action }" class="required action" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }"> <c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/> <spring:message code="${dict.itemValue }"/>

View File

@@ -615,7 +615,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -278,7 +278,7 @@
<th><input type="checkbox" class="i-checks" id="checkAll"></th> <th><input type="checkbox" class="i-checks" id="checkAll"></th>
<%-- <th><spring:message code="seq"/></th> --%> <%-- <th><spring:message code="seq"/></th> --%>
<th><spring:message code="config_describe"/></th> <th><spring:message code="config_describe"/></th>
<th>IP <spring:message code="type"/></th> <th>IP<spring:message code="type"/></th>
<c:if test="${specialFunctionId ne 'ipmulitiplex'}"> <c:if test="${specialFunctionId ne 'ipmulitiplex'}">
<th><spring:message code="client_ip"/></th> <th><spring:message code="client_ip"/></th>
<th><spring:message code="client_port"/></th> <th><spring:message code="client_port"/></th>

View File

@@ -289,7 +289,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -292,7 +292,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -96,7 +96,7 @@ $(function(){
serviceId="${service.serviceId }" serviceId="${service.serviceId }"
protocolId="${service.protocolId }" protocolId="${service.protocolId }"
value="${service.action }" class="required action" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }"> <c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/> <spring:message code="${dict.itemValue }"/>

View File

@@ -284,7 +284,7 @@
<th><spring:message code="port_pattern"/></th> <th><spring:message code="port_pattern"/></th>
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -93,7 +93,7 @@ $(function(){
serviceId="${service.serviceId }" serviceId="${service.serviceId }"
protocolId="${service.protocolId }" protocolId="${service.protocolId }"
value="${service.action }" class="required action" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }"> <c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/> <spring:message code="${dict.itemValue }"/>

View File

@@ -268,7 +268,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -154,7 +154,7 @@
serviceId="${service.serviceId }" serviceId="${service.serviceId }"
protocolId="${service.protocolId }" protocolId="${service.protocolId }"
value="${service.action }" class="required action" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }"> <c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/> <spring:message code="${dict.itemValue }"/>

View File

@@ -309,7 +309,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -279,7 +279,7 @@
<th><input type="checkbox" class="i-checks" id="checkAll"></th> <th><input type="checkbox" class="i-checks" id="checkAll"></th>
<%-- <th><spring:message code="seq"/></th> --%> <%-- <th><spring:message code="seq"/></th> --%>
<th><spring:message code="config_describe"/></th> <th><spring:message code="config_describe"/></th>
<th>ip<spring:message code="type"/></th> <th>IP<spring:message code="type"/></th>
<th><spring:message code="client_ip"/></th> <th><spring:message code="client_ip"/></th>
<th><spring:message code="client_address_mask"/></th> <th><spring:message code="client_address_mask"/></th>
<th><spring:message code="client_port"/></th> <th><spring:message code="client_port"/></th>
@@ -301,7 +301,7 @@
<th><spring:message code="protocol"/></th> <th><spring:message code="protocol"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
</c:otherwise> </c:otherwise>

View File

@@ -160,7 +160,7 @@
serviceId="${service.serviceId }" serviceId="${service.serviceId }"
protocolId="${service.protocolId }" protocolId="${service.protocolId }"
value="${service.action }" class="required action" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }"> <c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/> <spring:message code="${dict.itemValue }"/>

View File

@@ -309,7 +309,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -129,7 +129,7 @@ $(function(){
serviceId="${service.serviceId }" serviceId="${service.serviceId }"
protocolId="${service.protocolId }" protocolId="${service.protocolId }"
value="${service.action }" class="required action" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }"> <c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/> <spring:message code="${dict.itemValue }"/>

View File

@@ -270,7 +270,7 @@
<th><spring:message code="log_total"/></th> <th><spring:message code="log_total"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -97,7 +97,7 @@ $(function(){
serviceId="${service.serviceId }" serviceId="${service.serviceId }"
protocolId="${service.protocolId }" protocolId="${service.protocolId }"
value="${service.action }" class="required action" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }"> <c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/> <spring:message code="${dict.itemValue }"/>

View File

@@ -272,7 +272,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="is_audit"/></th> <th><spring:message code="is_audit"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -336,7 +336,7 @@
<%--IP --%> <%--IP --%>
<c:when test="${mainTableType eq '1'}"> <c:when test="${mainTableType eq '1'}">
<th><spring:message code="${mainTableDesc}"/><spring:message code="config_describe"/></th> <th><spring:message code="${mainTableDesc}"/><spring:message code="config_describe"/></th>
<th>ip<spring:message code="type"/></th> <th>IP<spring:message code="type"/></th>
<th><spring:message code="client_ip"/></th> <th><spring:message code="client_ip"/></th>
<th><spring:message code="client_address_mask"/></th> <th><spring:message code="client_address_mask"/></th>
<th><spring:message code="client_port"/></th> <th><spring:message code="client_port"/></th>
@@ -368,7 +368,7 @@
</c:if> </c:if>
<c:if test="${tableInfo.tableName ne mainTable and tableInfo.tableType eq '1'}"> <c:if test="${tableInfo.tableName ne mainTable and tableInfo.tableType eq '1'}">
<th><spring:message code="${tableInfo.tableDesc}"/><spring:message code="config_describe"/></th> <th><spring:message code="${tableInfo.tableDesc}"/><spring:message code="config_describe"/></th>
<th>ip<spring:message code="type"/></th> <th>IP<spring:message code="type"/></th>
<th><spring:message code="client_ip"/></th> <th><spring:message code="client_ip"/></th>
<th><spring:message code="client_address_mask"/></th> <th><spring:message code="client_address_mask"/></th>
<th><spring:message code="client_port"/></th> <th><spring:message code="client_port"/></th>
@@ -385,7 +385,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -153,7 +153,7 @@
serviceId="${service.serviceId }" serviceId="${service.serviceId }"
protocolId="${service.protocolId }" protocolId="${service.protocolId }"
value="${service.action }" class="required action" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }"> <c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/> <spring:message code="${dict.itemValue }"/>

View File

@@ -310,7 +310,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -150,7 +150,7 @@
serviceId="${service.serviceId }" serviceId="${service.serviceId }"
protocolId="${service.protocolId }" protocolId="${service.protocolId }"
value="${service.action }" class="required action" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<spring:message code="${service.actionCode }" /> <spring:message code="${service.actionCode }" />
</c:if> </c:if>
</label> </label>

View File

@@ -309,7 +309,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -230,7 +230,7 @@
serviceId="${service.serviceId }" serviceId="${service.serviceId }"
protocolId="${service.protocolId }" protocolId="${service.protocolId }"
value="${service.action }" class="required action" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }"> <c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/> <spring:message code="${dict.itemValue }"/>

View File

@@ -468,7 +468,7 @@
<th><spring:message code="redirect_content"/></th> <th><spring:message code="redirect_content"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -105,7 +105,7 @@ $(function(){
serviceId="${service.serviceId }" serviceId="${service.serviceId }"
protocolId="${service.protocolId }" protocolId="${service.protocolId }"
value="${service.action }" class="required action" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }"> <c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/> <spring:message code="${dict.itemValue }"/>

View File

@@ -268,7 +268,7 @@
<th><spring:message code="log_total"/></th> <th><spring:message code="log_total"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -105,7 +105,7 @@ $(function(){
serviceId="${service.serviceId }" serviceId="${service.serviceId }"
protocolId="${service.protocolId }" protocolId="${service.protocolId }"
value="${service.action }" class="required action" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }"> <c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/> <spring:message code="${dict.itemValue }"/>

View File

@@ -268,7 +268,7 @@
<th><spring:message code="log_total"/></th> <th><spring:message code="log_total"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -275,7 +275,7 @@
<c:otherwise> <c:otherwise>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
</c:otherwise> </c:otherwise>

View File

@@ -154,7 +154,7 @@
serviceId="${service.serviceId }" serviceId="${service.serviceId }"
protocolId="${service.protocolId }" protocolId="${service.protocolId }"
value="${service.action }" class="required action" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }"> <c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/> <spring:message code="${dict.itemValue }"/>

View File

@@ -309,7 +309,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -221,7 +221,7 @@
serviceId="${service.serviceId }" serviceId="${service.serviceId }"
protocolId="${service.protocolId }" protocolId="${service.protocolId }"
value="${service.action }" class="required action" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }"> <c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/> <spring:message code="${dict.itemValue }"/>

View File

@@ -466,7 +466,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -154,7 +154,7 @@
serviceId="${service.serviceId }" serviceId="${service.serviceId }"
protocolId="${service.protocolId }" protocolId="${service.protocolId }"
value="${service.action }" class="required action" value="${service.action }" class="required action"
<c:if test="${_cfg.action==service.action || _cfg.action==null}">checked</c:if>> <c:if test="${_cfg.action==service.action || (_cfg.action==null && satus.index==0)}">checked</c:if>>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict"> <c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq service.action }"> <c:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/> <spring:message code="${dict.itemValue }"/>

View File

@@ -308,7 +308,7 @@
<th><spring:message code="block_type"/></th> <th><spring:message code="block_type"/></th>
<th><spring:message code="whether_area_block"/></th> <th><spring:message code="whether_area_block"/></th>
<th><spring:message code="letter"/></th> <th><spring:message code="letter"/></th>
<th><spring:message code="type"/></th> <th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th> <th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th> <th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th> <th><spring:message code="valid_identifier"/></th>

View File

@@ -179,6 +179,30 @@ jQuery.validator.addMethod("ipCheck",function(value, element) {
if(value.length==0||value.trim().length==0){return true;} if(value.length==0||value.trim().length==0){return true;}
var typeInt=$(element).parents(".row").parent(".row").find("select[name$='ipType']").val(); var typeInt=$(element).parents(".row").parent(".row").find("select[name$='ipType']").val();
var ipPattern=$(element).parents(".row").parent(".row").find("select[name$='ipPattern']").val(); var ipPattern=$(element).parents(".row").parent(".row").find("select[name$='ipPattern']").val();
var srcIpAddress=$(element).parents(".row").parent(".row").find("input[name$='srcIpAddress']").val();
var destIpAddress=$(element).parents(".row").parent(".row").find("input[name$='destIpAddress']").val();
var destIpIsHidden=$(element).parents(".row").parent(".row").find("input[name$='destIpAddress']").is(":hidden");
if(ipPattern==1){//ip/掩码格式
srcIpAddress=srcIpAddress.indexOf("/") >-1 ?srcIpAddress.split("/")[0] : srcIpAddress;
destIpAddress=destIpAddress.indexOf("/") >-1 ?srcIpAddress.split("/")[0] : srcIpAddress;
}else if (ipPattern==2){
srcIpAddress=srcIpAddress.indexOf("-") >-1 ?srcIpAddress.split("-")[0] : srcIpAddress;
destIpAddress=destIpAddress.indexOf("-") >-1 ?srcIpAddress.split("-")[0] : srcIpAddress;
}
if(destIpIsHidden){
if((srcIpAddress == destIpAddress)){
$.validator.messages.ipCheck=$.validator.messages.srcIpIsNotValue+destIpAddress;
return false;
}
}else{
if((srcIpAddress == destIpAddress)){
$.validator.messages.ipCheck=$.validator.messages.srcIpNotEqDestIp+srcIpAddress
+$.validator.messages.destIpNotEqDestIp+destIpAddress
+$.validator.messages.IpNotEqDestIp;
return false;
}
}
if(typeInt==4){ if(typeInt==4){
if(ipPattern){ if(ipPattern){
if(ipPattern==1){//ip/掩码格式 if(ipPattern==1){//ip/掩码格式

View File

@@ -27,6 +27,10 @@
ipPart:"Invalid IP part", ipPart:"Invalid IP part",
ipv6MaskPart:"Mask must be exponent of 2,not greater than 128", ipv6MaskPart:"Mask must be exponent of 2,not greater than 128",
ipMaskRange:"IP mask must between 0 and 32", ipMaskRange:"IP mask must between 0 and 32",
srcIpNotEqDestIp:"Sourse IP ",
destIpNotEqDestIp:" and destination IP ",
IpNotEqDestIp:" can't the same",
srcIpIsNotValue:"Sourse IP can't be ",
ipRange:"Wrong IP format or start IP and end IP in two subnet", ipRange:"Wrong IP format or start IP and end IP in two subnet",
ipRange1:"start IP should smaller than end IP", ipRange1:"start IP should smaller than end IP",
portCheck:"Please enter a correct port", portCheck:"Please enter a correct port",

View File

@@ -26,10 +26,15 @@
ipPart:"Invalid IP part", ipPart:"Invalid IP part",
ipv6MaskPart:"Mask must be exponent of 2,not greater than 128", ipv6MaskPart:"Mask must be exponent of 2,not greater than 128",
ipMaskRange:"IP mask must between 0 and 32", ipMaskRange:"IP mask must between 0 and 32",
srcIpNotEqDestIp:"Sourse IP and destination IP can't the same",
ipRange:"Wrong IP format or start IP and end IP in two subnet", ipRange:"Wrong IP format or start IP and end IP in two subnet",
ipRange1:"start IP should smaller than end IP", ipRange1:"start IP should smaller than end IP",
portCheck: " Пожалуйста, введите  правильный  порт.", portCheck: " Пожалуйста, введите  правильный  порт.",
portRange:"Port must between 0 and 65535", portRange:"Port must between 0 and 65535",
srcIpNotEqDestIp:"Sourse IP ",
destIpNotEqDestIp:" and destination IP ",
srcIpIsNotValue:"Sourse IP can't be ",
IpNotEqDestIp:" can't the same",
portMaskRange:"Port and mask must between 0 and 65535.The correct pattern is \"port/mask\".", portMaskRange:"Port and mask must between 0 and 65535.The correct pattern is \"port/mask\".",
chooseAreaOrIsp:"The region and the oprater must choose one", chooseAreaOrIsp:"The region and the oprater must choose one",
areaControl:"Action drop and loop do not need area control", areaControl:"Action drop and loop do not need area control",

View File

@@ -20,7 +20,6 @@
rangelength: $.validator.format("请输入一个长度介于 {0} 和 {1} 之间的字符串"), rangelength: $.validator.format("请输入一个长度介于 {0} 和 {1} 之间的字符串"),
range: $.validator.format("请输入一个介于 {0} 和 {1} 之间的值"), range: $.validator.format("请输入一个介于 {0} 和 {1} 之间的值"),
max: $.validator.format("请输入一个最大为 {0} 的值"), max: $.validator.format("请输入一个最大为 {0} 的值"),
min: $.validator.format("请输入一个最小为 {0} 的值"), min: $.validator.format("请输入一个最小为 {0} 的值"),
noBlankSpace:"不能为空格", noBlankSpace:"不能为空格",
ipCheck:"请填写正确的IP地址", ipCheck:"请填写正确的IP地址",
@@ -30,9 +29,14 @@
portCheck:"请填写正确的端口", portCheck:"请填写正确的端口",
notStartZero:"请填写正确的数值", notStartZero:"请填写正确的数值",
ipMaskRange:"掩码范围0到32", ipMaskRange:"掩码范围0到32",
srcIpNotEqDestIp:"源IP和目的IP不能相同",
ipRange:"IP范围格式错误或者起始IP与结束IP不在同一网段", ipRange:"IP范围格式错误或者起始IP与结束IP不在同一网段",
ipRange1:"起始IP值应小于结束IP值", ipRange1:"起始IP值应小于结束IP值",
portRange:"端口应小于65536非0数字不能以0开头", portRange:"端口应小于65536非0数字不能以0开头",
srcIpIsNotValue:"源IP不能为 ",
srcIpNotEqDestIp:"源IP ",
destIpNotEqDestIp:" 与目的IP ",
IpNotEqDestIp:" 不能相同",
portMaskRange:"端口以及掩码范围0-65535非0数字不能以0开头。格式为\"端口/掩码\"", portMaskRange:"端口以及掩码范围0-65535非0数字不能以0开头。格式为\"端口/掩码\"",
chooseAreaOrIsp:"区域和运营商必选一个", chooseAreaOrIsp:"区域和运营商必选一个",
areaControl:"丢弃和回流动作不能区域管控", areaControl:"丢弃和回流动作不能区域管控",

View File

@@ -415,15 +415,26 @@ var switchIpInfo=function(obj){
var srcPort=row.find("input[name$='srcPort']"); var srcPort=row.find("input[name$='srcPort']");
var destPort=row.find("input[name$='destPort']"); var destPort=row.find("input[name$='destPort']");
var ipV4Default=new Array(); var srcIpV4Default=new Array();
ipV4Default[0]="0.0.0.0/32"; //subnet srcIpV4Default[0]="0.0.0.0/32"; //subnet
ipV4Default[1]="0.0.0.0-0.0.0.0";//ip_range srcIpV4Default[1]="0.0.0.0-0.0.0.0";//ip_range
ipV4Default[2]="0.0.0.0"; //ip srcIpV4Default[2]="0.0.0.0"; //ip
var ipV6Default=new Array(); var destIpV4Default=new Array();
ipV6Default[0]="::/64"; //subnet destIpV4Default[0]="0.0.0.0/32"; //subnet
ipV6Default[1]="::-::";//ip_range destIpV4Default[1]="0.0.0.0-0.0.0.0";//ip_range
ipV6Default[2]="::"; //ip destIpV4Default[2]="0.0.0.0"; //ip
var srcIpV6Default=new Array();
srcIpV6Default[0]="::/64"; //subnet
srcIpV6Default[1]="::-::";//ip_range
srcIpV6Default[2]="::"; //ip
var destIpV6Default=new Array();
destIpV6Default[0]="::/64"; //subnet
destIpV6Default[1]="::-::";//ip_range
destIpV6Default[2]="::"; //ip
var portDefault=new Array(); var portDefault=new Array();
portDefault[0]="0";//port portDefault[0]="0";//port
@@ -433,39 +444,53 @@ var switchIpInfo=function(obj){
if(4==ipType){ if(4==ipType){
if(!$(srcIp).val()){ if(!$(srcIp).val()){
if(ipPattern==1){ if(ipPattern==1){
$(srcIp).val(ipV4Default[0]); $(srcIp).val(srcIpV4Default[0]);
}else if(ipPattern==2){ }else if(ipPattern==2){
$(srcIp).val(ipV4Default[1]); $(srcIp).val(srcIpV4Default[1]);
}else if(ipPattern==3){ }else if(ipPattern==3){
$(srcIp).val(ipV4Default[2]); $(srcIp).val(srcIpV4Default[2]);
}else{
$(srcIp).val(srcIpV4Default[0]);
} }
}else{ }else{
if($.inArray($(srcIp).val(),ipV4Default) > -1 || $.inArray($(srcIp).val(),ipV6Default) > -1){ //是ipV4的默认值其中一个 if($.inArray($(srcIp).val(),srcIpV4Default) > -1
|| $.inArray($(srcIp).val(),destIpV4Default) > -1
|| $.inArray($(srcIp).val(),srcIpV6Default) > -1
|| $.inArray($(srcIp).val(),destIpV6Default) > -1){ //是ipV4的默认值其中一个
if(ipPattern==1){ if(ipPattern==1){
$(srcIp).val(ipV4Default[0]); $(srcIp).val(srcIpV4Default[0]);
}else if(ipPattern==2){ }else if(ipPattern==2){
$(srcIp).val(ipV4Default[1]); $(srcIp).val(srcIpV4Default[1]);
}else if(ipPattern==3){ }else if(ipPattern==3){
$(srcIp).val(ipV4Default[2]); $(srcIp).val(srcIpV4Default[2]);
}else{
$(srcIp).val(srcIpV4Default[0]);
} }
} }
} }
if(!$(destIp).val()){ if(!$(destIp).val()){
if(ipPattern==1){ if(ipPattern==1){
$(destIp).val(ipV4Default[0]); $(destIp).val(destIpV4Default[0]);
}else if(ipPattern==2){ }else if(ipPattern==2){
$(destIp).val(ipV4Default[1]); $(destIp).val(destIpV4Default[1]);
}else if(ipPattern==3){ }else if(ipPattern==3){
$(destIp).val(ipV4Default[2]); $(destIp).val(destIpV4Default[2]);
}else{
$(destIp).val(destIpV4Default[0]);
} }
}else{ }else{
if($.inArray($(destIp).val(),ipV4Default) > -1 || $.inArray($(destIp).val(),ipV6Default) > -1){ //是ipV4的默认值其中一个 if($.inArray($(destIp).val(),srcIpV4Default) > -1
|| $.inArray($(destIp).val(),destIpV4Default) > -1
|| $.inArray($(destIp).val(),srcIpV6Default) > -1
|| $.inArray($(destIp).val(),destIpV6Default) > -1){
if(ipPattern==1){ if(ipPattern==1){
$(destIp).val(ipV4Default[0]); $(destIp).val(destIpV4Default[0]);
}else if(ipPattern==2){ }else if(ipPattern==2){
$(destIp).val(ipV4Default[1]); $(destIp).val(destIpV4Default[1]);
}else if(ipPattern==3){ }else if(ipPattern==3){
$(destIp).val(ipV4Default[2]); $(destIp).val(destIpV4Default[2]);
}else{
$(destIp).val(destIpV4Default[0]);
} }
} }
} }
@@ -473,39 +498,53 @@ var switchIpInfo=function(obj){
if(6==ipType){ if(6==ipType){
if(!$(srcIp).val()){ if(!$(srcIp).val()){
if(ipPattern==1){ if(ipPattern==1){
$(srcIp).val(ipV6Default[0]); $(srcIp).val(srcIpV6Default[0]);
}else if(ipPattern==2){ }else if(ipPattern==2){
$(srcIp).val(ipV6Default[1]); $(srcIp).val(srcIpV6Default[1]);
}else if(ipPattern==3){ }else if(ipPattern==3){
$(srcIp).val(ipV6Default[2]); $(srcIp).val(srcIpV6Default[2]);
}else{
$(srcIp).val(srcIpV6Default[0]);
} }
}else{ }else{
if($.inArray($(srcIp).val(),ipV4Default) > -1 || $.inArray($(srcIp).val(),ipV6Default) > -1){ //是ipV6的默认值其中一个 if($.inArray($(srcIp).val(),srcIpV4Default) > -1
|| $.inArray($(srcIp).val(),destIpV4Default) > -1
|| $.inArray($(srcIp).val(),srcIpV6Default) > -1
|| $.inArray($(srcIp).val(),destIpV6Default) > -1){ //是ipV6的默认值其中一个
if(ipPattern==1){ if(ipPattern==1){
$(srcIp).val(ipV6Default[0]); $(srcIp).val(srcIpV6Default[0]);
}else if(ipPattern==2){ }else if(ipPattern==2){
$(srcIp).val(ipV6Default[1]); $(srcIp).val(srcIpV6Default[1]);
}else if(ipPattern==3){ }else if(ipPattern==3){
$(srcIp).val(ipV6Default[2]); $(srcIp).val(srcIpV6Default[2]);
}else{
$(srcIp).val(srcIpV6Default[0]);
} }
} }
} }
if(!$(destIp).val()){ if(!$(destIp).val()){
if(ipPattern==1){ if(ipPattern==1){
$(destIp).val(ipV6Default[0]); $(destIp).val(destIpV6Default[0]);
}else if(ipPattern==2){ }else if(ipPattern==2){
$(destIp).val(ipV6Default[1]); $(destIp).val(destIpV6Default[1]);
}else if(ipPattern==3){ }else if(ipPattern==3){
$(destIp).val(ipV6Default[2]); $(destIp).val(destIpV6Default[2]);
}else{
$(destIp).val(srcIpV6Default[0]);
} }
}else{ }else{
if($.inArray($(destIp).val(),ipV4Default) > -1 || $.inArray($(destIp).val(),ipV6Default) > -1){ //是ipV6的默认值其中一个 if($.inArray($(destIp).val(),srcIpV4Default) > -1
|| $.inArray($(destIp).val(),destIpV4Default) > -1
|| $.inArray($(destIp).val(),srcIpV6Default) > -1
|| $.inArray($(destIp).val(),destIpV6Default) > -1){ //是ipV6的默认值其中一个
if(ipPattern==1){ if(ipPattern==1){
$(destIp).val(ipV6Default[0]); $(destIp).val(destIpV6Default[0]);
}else if(ipPattern==2){ }else if(ipPattern==2){
$(destIp).val(ipV6Default[1]); $(destIp).val(destIpV6Default[1]);
}else if(ipPattern==3){ }else if(ipPattern==3){
$(destIp).val(ipV6Default[2]); $(destIp).val(destIpV6Default[2]);
}else{
$(destIp).val(srcIpV6Default[0]);
} }
} }
} }
@@ -513,39 +552,45 @@ var switchIpInfo=function(obj){
if(46==ipType){ if(46==ipType){
if(!$(srcIp).val()){ if(!$(srcIp).val()){
if(ipPattern==1){ if(ipPattern==1){
$(srcIp).val(ipV4Default[0]); $(srcIp).val(srcIpV4Default[0]);
}else if(ipPattern==2){ }else if(ipPattern==2){
$(srcIp).val(ipV4Default[1]); $(srcIp).val(srcIpV4Default[1]);
}else if(ipPattern==3){ }else if(ipPattern==3){
$(srcIp).val(ipV4Default[2]); $(srcIp).val(srcIpV4Default[2]);
} }
}else{ }else{
if($.inArray($(srcIp).val(),ipV4Default) > -1 || $.inArray($(srcIp).val(),ipV6Default) > -1){ //是ipV6的默认值其中一个 if($.inArray($(srcIp).val(),srcIpV4Default) > -1
|| $.inArray($(srcIp).val(),destIpV4Default) > -1
|| $.inArray($(srcIp).val(),srcIpV6Default) > -1
|| $.inArray($(srcIp).val(),destIpV6Default) > -1){
if(ipPattern==1){ if(ipPattern==1){
$(srcIp).val(ipV4Default[0]); $(srcIp).val(srcIpV4Default[0]);
}else if(ipPattern==2){ }else if(ipPattern==2){
$(srcIp).val(ipV4Default[1]); $(srcIp).val(srcIpV4Default[1]);
}else if(ipPattern==3){ }else if(ipPattern==3){
$(srcIp).val(ipV4Default[2]); $(srcIp).val(srcIpV4Default[2]);
} }
} }
} }
if(!$(destIp).val()){ if(!$(destIp).val()){
if(ipPattern==1){ if(ipPattern==1){
$(destIp).val(ipV6Default[0]); $(destIp).val(destIpV6Default[0]);
}else if(ipPattern==2){ }else if(ipPattern==2){
$(destIp).val(ipV6Default[1]); $(destIp).val(destIpV6Default[1]);
}else if(ipPattern==3){ }else if(ipPattern==3){
$(destIp).val(ipV6Default[2]); $(destIp).val(destIpV6Default[2]);
} }
}else{ }else{
if($.inArray($(destIp).val(),ipV4Default) > -1 || $.inArray($(destIp).val(),ipV6Default) > -1){ //是ipV6的默认值其中一个 if($.inArray($(destIp).val(),srcIpV4Default) > -1
|| $.inArray($(destIp).val(),destIpV4Default) > -1
|| $.inArray($(destIp).val(),srcIpV6Default) > -1
|| $.inArray($(destIp).val(),destIpV6Default) > -1){
if(ipPattern==1){ if(ipPattern==1){
$(destIp).val(ipV6Default[0]); $(destIp).val(destIpV6Default[0]);
}else if(ipPattern==2){ }else if(ipPattern==2){
$(destIp).val(ipV6Default[1]); $(destIp).val(destIpV6Default[1]);
}else if(ipPattern==3){ }else if(ipPattern==3){
$(destIp).val(ipV6Default[2]); $(destIp).val(destIpV6Default[2]);
} }
} }
} }
@@ -553,39 +598,45 @@ var switchIpInfo=function(obj){
if(64==ipType){ if(64==ipType){
if(!$(srcIp).val()){ if(!$(srcIp).val()){
if(ipPattern==1){ if(ipPattern==1){
$(srcIp).val(ipV6Default[0]); $(srcIp).val(srcIpV6Default[0]);
}else if(ipPattern==2){ }else if(ipPattern==2){
$(srcIp).val(ipV6Default[1]); $(srcIp).val(srcIpV6Default[1]);
}else if(ipPattern==3){ }else if(ipPattern==3){
$(srcIp).val(ipV6Default[2]); $(srcIp).val(srcIpV6Default[2]);
} }
}else{ }else{
if($.inArray($(srcIp).val(),ipV4Default) > -1 || $.inArray($(srcIp).val(),ipV6Default) > -1){ //是ipV6的默认值其中一个 if($.inArray($(srcIp).val(),srcIpV4Default) > -1
|| $.inArray($(srcIp).val(),destIpV4Default) > -1
|| $.inArray($(srcIp).val(),srcIpV6Default) > -1
|| $.inArray($(srcIp).val(),destIpV6Default) > -1){
if(ipPattern==1){ if(ipPattern==1){
$(srcIp).val(ipV6Default[0]); $(srcIp).val(srcIpV6Default[0]);
}else if(ipPattern==2){ }else if(ipPattern==2){
$(srcIp).val(ipV6Default[1]); $(srcIp).val(srcIpV6Default[1]);
}else if(ipPattern==3){ }else if(ipPattern==3){
$(srcIp).val(ipV6Default[2]); $(srcIp).val(srcIpV6Default[2]);
} }
} }
} }
if(!$(destIp).val()){ if(!$(destIp).val()){
if(ipPattern==1){ if(ipPattern==1){
$(destIp).val(ipV4Default[0]); $(destIp).val(srcIpV4Default[0]);
}else if(ipPattern==2){ }else if(ipPattern==2){
$(destIp).val(ipV4Default[1]); $(destIp).val(srcIpV4Default[1]);
}else if(ipPattern==3){ }else if(ipPattern==3){
$(destIp).val(ipV4Default[2]); $(destIp).val(srcIpV4Default[2]);
} }
}else{ }else{
if($.inArray($(destIp).val(),ipV4Default) > -1 || $.inArray($(destIp).val(),ipV6Default) > -1){ //是ipV6的默认值其中一个 if($.inArray($(destIp).val(),srcIpV4Default) > -1
|| $.inArray($(destIp).val(),destIpV4Default) > -1
|| $.inArray($(destIp).val(),srcIpV6Default) > -1
|| $.inArray($(destIp).val(),destIpV6Default) > -1){
if(ipPattern==1){ if(ipPattern==1){
$(destIp).val(ipV4Default[0]); $(destIp).val(destIpV4Default[0]);
}else if(ipPattern==2){ }else if(ipPattern==2){
$(destIp).val(ipV4Default[1]); $(destIp).val(destIpV4Default[1]);
}else if(ipPattern==3){ }else if(ipPattern==3){
$(destIp).val(ipV4Default[2]); $(destIp).val(destIpV4Default[2]);
} }
} }
} }
@@ -596,6 +647,8 @@ var switchIpInfo=function(obj){
$(srcPort).val(portDefault[0]); $(srcPort).val(portDefault[0]);
}else if(portPattern==2){ }else if(portPattern==2){
$(srcPort).val(portDefault[1]); $(srcPort).val(portDefault[1]);
}else{
$(srcPort).val(portDefault[0]);
} }
}else{ }else{
if($.inArray($(srcPort).val(),portDefault) > -1){ //是ipV4的默认值其中一个 if($.inArray($(srcPort).val(),portDefault) > -1){ //是ipV4的默认值其中一个
@@ -603,6 +656,8 @@ var switchIpInfo=function(obj){
$(srcPort).val(portDefault[0]); $(srcPort).val(portDefault[0]);
}else if(portPattern==2){ }else if(portPattern==2){
$(srcPort).val(portDefault[1]); $(srcPort).val(portDefault[1]);
}else{
$(srcPort).val(portDefault[0]);
} }
} }
} }
@@ -612,6 +667,8 @@ var switchIpInfo=function(obj){
$(destPort).val(portDefault[0]); $(destPort).val(portDefault[0]);
}else if(portPattern==2){ }else if(portPattern==2){
$(destPort).val(portDefault[1]); $(destPort).val(portDefault[1]);
}else{
$(destPort).val(portDefault[0]);
} }
}else{ }else{
if($.inArray($(destPort).val(),portDefault) > -1){ //是port的默认值其中一个 if($.inArray($(destPort).val(),portDefault) > -1){ //是port的默认值其中一个
@@ -619,6 +676,8 @@ var switchIpInfo=function(obj){
$(destPort).val(portDefault[0]); $(destPort).val(portDefault[0]);
}else if(portPattern==2){ }else if(portPattern==2){
$(destPort).val(portDefault[1]); $(destPort).val(portDefault[1]);
}else{
$(destPort).val(portDefault[0]);
} }
} }
} }