This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
k18-ntcs-web-ntc/src/main/webapp/WEB-INF/include/form/multiple/ipInfo.jsp

335 lines
18 KiB
Plaintext

<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<style>
</style>
<h3 class="form-section">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<spring:message code="${mainTableDesc}"/>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<spring:message code="${otherTable.tableDesc}"/>
</c:when>
<c:otherwise>IP<spring:message code="block_config"/></c:otherwise>
</c:choose>
<small><span style="margin-left:10px"><input type="checkbox" id="ipSelect"/> 可选</span><!-- <span class="glyphicon glyphicon-plus" data-toggle="collapse" data-target=".ipCfg" title="add"></span> --></small></h3>
<div class="row ipCfg collapse">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="config_describe"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input class="form-control" type="text" name="ipCfg[${mainTable}].cfgDesc" value="${_cfg.ipCfg[mainTable].cfgDesc}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input class="form-control" type="text" name="ipCfg[${otherTable.tableName}].cfgDesc" value="${_cfg.ipCfg[otherTable.tableName].cfgDesc}">
</c:when>
</c:choose>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_type"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<select name="ipCfg[${mainTable}].ipType" class="ipType selectpicker show-tick form-control">
<option value="" ><spring:message code="select"/></option>
<option value="4" <c:if test="${_cfg.ipCfg[mainTable].ipType==4}">selected</c:if> >V4</option>
<option value="6" <c:if test="${_cfg.ipCfg[mainTable].ipType==6}">selected</c:if>>V6</option>
</select>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<select name="ipCfg[${otherTable.tableName}].ipType" class="ipType selectpicker show-tick form-control" title=<spring:message code="select"/>>
<option value="" ><spring:message code="select"/></option>
<option value="4" <c:if test="${_cfg.ipCfg[otherTable.tableName].ipType==4}">selected</c:if> >V4</option>
<option value="6" <c:if test="${_cfg.ipCfg[otherTable.tableName].ipType==6}">selected</c:if>>V6</option>
</select>
</c:when>
</c:choose>
</div>
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<div for="ipCfg[${mainTable}].ipType"></div>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<div for="ipCfg[${otherTable.tableName}].ipType"></div>
</c:when>
</c:choose>
</div>
</div>
</div>
<div class="row ipCfg collapse">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_ip"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input class="form-control" type="text" name="ipCfg[${mainTable}].srcIp" value="${_cfg.ipCfg[mainTable].srcIp}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input class="form-control" type="text" name="ipCfg[${otherTable.tableName}].srcIp" value="${_cfg.ipCfg[otherTable.tableName].srcIp}">
</c:when>
</c:choose>
</div>
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<div for="ipCfg[${mainTable}].srcIp"></div>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<div for="ipCfg[${otherTable.tableName}].srcIp"></div>
</c:when>
</c:choose>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_address_mask"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input class="form-control" type="text" name="ipCfg[${mainTable}].srcIpMask" value="${_cfg.ipCfg[mainTable].srcIpMask}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input class="form-control" type="text" name="ipCfg[${otherTable.tableName}].srcIpMask" value="${_cfg.ipCfg[otherTable.tableName].srcIpMask}">
</c:when>
</c:choose>
</div>
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<div for="ipCfg[${mainTable}].srcIpMask"></div>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<div for="ipCfg[${otherTable.tableName}].srcIpMask"></div>
</c:when>
</c:choose>
<div for="srcIpMask"></div>
</div>
</div>
</div>
<div class="row ipCfg collapse">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input class="form-control" type="text" name="ipCfg[${mainTable}].srcPort" value="${_cfg.ipCfg[mainTable].srcPort}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input class="form-control" type="text" name="ipCfg[${otherTable.tableName}].srcPort" value="${_cfg.ipCfg[otherTable.tableName].srcPort}">
</c:when>
</c:choose>
</div>
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<div for="ipCfg[${mainTable}].srcPort"></div>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<div for="ipCfg[${otherTable.tableName}].srcPort"></div>
</c:when>
</c:choose>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="client_port_mask"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input class="form-control" type="text" name="ipCfg[${mainTable}].srcPortMask" value="${_cfg.ipCfg[mainTable].srcPortMask}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input class="form-control" type="text" name="ipCfg[${otherTable.tableName}].srcPortMask" value="${_cfg.ipCfg[otherTable.tableName].srcPortMask}">
</c:when>
</c:choose>
</div>
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<div for="ipCfg[${mainTable}].srcPortMask"></div>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<div for="ipCfg[${otherTable.tableName}].srcPortMask"></div>
</c:when>
</c:choose>
</div>
</div>
</div>
<div class="row ipCfg collapse">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_ip"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input class="form-control" type="text" name="ipCfg[${mainTable}].dstIp" value="${_cfg.ipCfg[mainTable].dstIp}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input class="form-control" type="text" name="ipCfg[${otherTable.tableName}].dstIp" value="${_cfg.ipCfg[otherTable.tableName].dstIp}">
</c:when>
</c:choose>
</div>
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<div for="ipCfg[${mainTable}].dstIp"></div>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<div for="ipCfg[${otherTable.tableName}].dstIp"></div>
</c:when>
</c:choose>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_address_mask"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input class="form-control" type="text" name="ipCfg[${mainTable}].dstIpMask" value="${_cfg.ipCfg[mainTable].dstIpMask}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input class="form-control" type="text" name="ipCfg[${otherTable.tableName}].dstIpMask" value="${_cfg.ipCfg[otherTable.tableName].dstIpMask}">
</c:when>
</c:choose>
</div>
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<div for="ipCfg[${mainTable}].dstIpMask"></div>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<div for="ipCfg[${otherTable.tableName}].dstIpMask"></div>
</c:when>
</c:choose>
</div>
</div>
</div>
<div class="row ipCfg collapse">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_port"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input class="form-control" type="text" name="ipCfg[${mainTable}].dstPort" value="${_cfg.ipCfg[mainTable].dstPort}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input class="form-control" type="text" name="ipCfg[${otherTable.tableName}].dstPort" value="${_cfg.ipCfg[otherTable.tableName].dstPort}">
</c:when>
</c:choose>
</div>
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<div for="ipCfg[${mainTable}].dstPort"></div>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<div for="ipCfg[${otherTable.tableName}].dstPort"></div>
</c:when>
</c:choose>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="server_port_mask"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input class="form-control" type="text" name="ipCfg[${mainTable}].dstPortMask" value="${_cfg.ipCfg[mainTable].dstPortMask}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input class="form-control" type="text" name="ipCfg[${otherTable.tableName}].dstPortMask" value="${_cfg.ipCfg[otherTable.tableName].dstPortMask}">
</c:when>
</c:choose>
</div>
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<div for="ipCfg[${mainTable}].dstPortMask"></div>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<div for="ipCfg[${otherTable.tableName}].dstPortMask"></div>
</c:when>
</c:choose>
</div>
</div>
</div>
<div class="row ipCfg collapse">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="direction"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<select name="ipCfg[${mainTable}].direction" class="selectpicker show-tick form-control" title=<spring:message code="select"/>>
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.ipCfg[mainTable].direction==0}">selected</c:if>>0</option>
<option value="1" <c:if test="${_cfg.ipCfg[mainTable].direction==1}">selected</c:if>>1</option>
</select>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<select name="ipCfg[${otherTable.tableName}].direction" class="selectpicker show-tick form-control" title=<spring:message code="select"/>>
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.ipCfg[otherTable.tableName].direction==0}">selected</c:if>>0</option>
<option value="1" <c:if test="${_cfg.ipCfg[otherTable.tableName].direction==1}">selected</c:if>>1</option>
</select>
</c:when>
</c:choose>
<%-- <input class="form-control" type="text" name="direction" value="${_cfg.ipCfg.direction}"> --%>
</div>
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<div for="ipCfg[${mainTable}].direction"></div>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<div for="ipCfg[${otherTable.tableName}].direction"></div>
</c:when>
</c:choose>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="protocol"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<select name="ipCfg[${mainTable}].protocol" class="selectpicker show-tick form-control" title=<spring:message code="select"/>>
<option value=""><spring:message code="select"/></option>
<option value="6" <c:if test="${_cfg.ipCfg[mainTable].protocol==6}">selected</c:if>>TCP</option>
<option value="17" <c:if test="${_cfg.ipCfg[mainTable].protocol==17}">selected</c:if>>UDP</option>
<option value="0" <c:if test="${_cfg.ipCfg[mainTable].protocol==0}">selected</c:if>><spring:message code="arbitrary"/></option>
</select>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<select name="ipCfg[${otherTable.tableName}].protocol" class="selectpicker show-tick form-control" title=<spring:message code="select"/>>
<option value="" ><spring:message code="select"/></option>
<option value="6" <c:if test="${_cfg.ipCfg[otherTable.tableName].protocol==6}">selected</c:if>>TCP</option>
<option value="17" <c:if test="${_cfg.ipCfg[otherTable.tableName].protocol==17}">selected</c:if>>UDP</option>
<option value="0" <c:if test="${_cfg.ipCfg[otherTable.tableName].protocol==0}">selected</c:if>><spring:message code="arbitrary"/></option>
</select>
</c:when>
</c:choose>
</div>
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<div for="ipCfg[${mainTable}].protocol"></div>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<div for="ipCfg[${otherTable.tableName}].protocol"></div>
</c:when>
</c:choose>
</div>
</div>
<c:choose>
<c:when test="${mainTableType eq '1' and otherTable==null}">
<input type="hidden" name="ipCfg[${mainTable}].protocolId" value="${_cfg.ipCfg[mainTable].protocolId}">
<input name="ipCfg[${mainTable}].cfgId" type="hidden" value="${_cfg.ipCfg[mainTable].cfgId}"/>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '1'}">
<input type="hidden" name="ipCfg[${otherTable.tableName}].protocolId" value="${_cfg.ipCfg[otherTable.tableName].protocolId}">
<input name="ipCfg[${otherTable.tableName}].cfgId" type="hidden" value="${_cfg.ipCfg[otherTable.tableName].cfgId}"/>
</c:when>
</c:choose>
</div>