(1)ip,字符串,增强字符串mapper.xml里的get方法删除多余参数,只保留cfgId以及compileId。

(2)系统字典表更新方法查询多域增强字符串配置的匹配区域。mysql这里查询好像自动大小写忽略,待测试。
(3)多域界面提交。界面展示采用查一张主表再查其他表的方式展示,非所有表都有的字段只能查主表的,这里界面查询条件已做限制;另外表单提交未做验证;多个同类型(字符串,增强字符串)的表现在界面无法区分,后面会将界面展示意义不明的字段调整展示名称。
This commit is contained in:
wangxin
2018-03-29 14:56:27 +08:00
parent c0e0dd3b7a
commit 3d5f9d6878
21 changed files with 1894 additions and 448 deletions

View File

@@ -0,0 +1,150 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<h3 class="form-section"><spring:message code="basic_config"/></h3>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_area_block"/></label>
<div class="col-md-6">
<label class="radio-inline">
<input type="radio" name="isAreaEffective" value="1"
<c:if test="${_cfg.isAreaEffective==1}">checked</c:if>
><spring:message code="yes"/>
</label>
<label class="radio-inline">
<input type="radio" name="isAreaEffective" value="0"
<c:if test="${_cfg.isAreaEffective==0}">checked</c:if>
><spring:message code="no"/>
</label>
</div>
<div for="isAreaEffective"></div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><spring:message code="area_effect_id"/></label>
<div class="col-md-6">
<input class="form-control" type="text" name="areaEffectiveIds" value="${_cfg.ipCfg.areaEffectiveIds}">
</div>
<div for="areaEffectiveIds"></div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="letter"/></label>
<div class="col-md-6">
<select name="requestId" title=<spring:message code="select"/> data-live-search="true" data-live-search-placeholder="search" class="selectpicker form-control">
<c:forEach items="${requestInfos}" var="requestInfo">
<option value="${requestInfo.id}"
<c:if test="${requestInfo.isValid==0 or requestInfo.isAudit==3}">disabled="disabled"</c:if>
<c:if test="${requestInfo.id==_cfg.requestId}">selected</c:if>>${requestInfo.requestTitle}</option>
</c:forEach>
</select>
</div>
<div for="requestId"></div>
</div>
</div>
<!--/span-->
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="type"/></label>
<div class="col-md-6">
<select name="classify" multiple class="selectpicker form-control" title=<spring:message code="select"/>>
<c:forEach items="${fls}" var="fl">
<c:choose>
<c:when test="${_cfg.classify==null or _cfg.classify==''}">
<option value="${fl.serviceDictId}">${fl.itemValue}</option>
</c:when>
<c:when test="${fn:contains(_cfg.classify,',')}">
<option value="${fl.serviceDictId}"
<c:forEach items="${fn:split(_cfg.classify,',')}" var="_classify">
<c:if test="${fl.isValid==0}">disabled="disabled"</c:if>
<c:if test="${fn:trim(fl.serviceDictId) eq _classify}">selected</c:if>
</c:forEach>
>${fl.itemValue}</option>
</c:when>
<c:otherwise>
<option value="${fl.serviceDictId}"
<c:if test="${fl.isValid==0}">disabled="disabled"</c:if>
<c:if test="${fn:trim(fl.serviceDictId) eq _classify}">selected</c:if>
>${fl.itemValue}</option>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</div>
</div>
</div>
<!--/span-->
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="attribute"/></label>
<div class="col-md-6">
<select name="attribute" multiple class="selectpicker form-control" title=<spring:message code="select"/>>
<c:forEach items="${xzs}" var="xz">
<c:choose>
<c:when test="${_cfg.attribute==null or _cfg.attribute==''}">
<option value="${xz.serviceDictId}">${xz.itemValue}</option>
</c:when>
<c:otherwise>
<c:forEach items="${fn:split(_cfg.attribute,',')}" var="_attribute">
<option value="${xz.serviceDictId}"
<c:if test="${xz.isValid==0}">disabled="disabled"</c:if>
<c:if test="${fn:trim(xz.serviceDictId) eq _attribute}">selected</c:if>
>${xz.itemValue}</option>
</c:forEach>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="label"/></label>
<div class="col-md-6">
<select name="lable" multiple class="selectpicker form-control" title=<spring:message code="select"/>>
<c:forEach items="${lables}" var="lable">
<c:choose>
<c:when test="${_cfg.lable==null or _cfg.lable==''}">
<option value="${lable.serviceDictId}">${lable.itemValue}</option>
</c:when>
<c:otherwise>
<c:forEach items="${fn:split(_cfg.lable,',')}" var="_lable">
<option value="${lable.serviceDictId}"
<c:if test="${lable.isValid==0}">disabled="disabled"</c:if>
<c:if test="${fn:trim(lable.serviceDictId) eq _lable}">selected</c:if>
>${lable.itemValue}</option>
</c:forEach>
</c:otherwise>
</c:choose>
</c:forEach>
</select>
</div>
</div>
</div>
</div>
<!-- <div class="row">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3">生效范围</label>
<div class="col-md-6">
<select class="form-control">
<option>Country 1</option>
<option>Country 2</option>
</select>
</div>
</div>
</div>
</div> -->

View File

@@ -0,0 +1,164 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<h3 class="form-section">增强字符串<spring:message code="block_config"/><small><span class="glyphicon glyphicon-chevron-down" data-toggle="collapse" data-target=".complexCfg" title="add"></span></small></h3>
<div class="row complexCfg 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 '4' and otherTable==null}">
<input name="complexCfg[${mainTable}].cfgDesc" type="text" class="form-control" value="${_cfg.complexCfg[mainTable].cfgDesc}"/>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
<input name="complexCfg[${otherTable.tableName}].cfgDesc" type="text" class="form-control" value="${_cfg.complexCfg[otherTable.tableName].cfgDesc}"/>
</c:when>
</c:choose>
</div>
<div for="cfgDesc"></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="match_area"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '4' and otherTable==null}">
<select name="complexCfg[${mainTable}].district" class="district selectpicker select2 form-control">
<option value=""><spring:message code='select'/></option>
<c:forEach items="${districts}" var="district">
<option value="${district.itemValue}">${district.itemValue}</option>
</c:forEach>
</select>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
<select name="complexCfg[${otherTable.tableName}].district" class="district selectpicker select2 form-control">
<option value=""><spring:message code='select'/></option>
<c:forEach items="${districts}" var="district">
<option value="${district.itemValue}">${district.itemValue}</option>
</c:forEach>
</select>
</c:when>
</c:choose>
<input type="hidden" name="" placeholder="请输入自定义域" class="otherValue form-control" value="${_cfg.complexCfg[mainTable].district}"/>
</div>
<div for="district"></div>
</div>
</div>
</div>
<div class="row complexCfg collapse">
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="key_word"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '4' and otherTable==null}">
<input name="complexCfg[${mainTable}].keywords" type="text" class="form-control" value="${_cfg.complexCfg[mainTable].keywords}"/>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
<input name="complexCfg[${otherTable.tableName}].keywords" type="text" class="form-control" value="${_cfg.complexCfg[otherTable.tableName].keywords}"/>
</c:when>
</c:choose>
</div>
<div for="keywords"></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="expression_type"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '4' and otherTable==null}">
<label class="radio-inline">
<input type="radio" name="complexCfg[${mainTable}].exprType" value="1"
<c:if test="${_cfg.complexCfg[mainTable].exprType==1}">checked</c:if>
><spring:message code="and"/>
</label>
<label class="radio-inline">
<input type="radio" name="complexCfg[${mainTable}].exprType" value="0"
<c:if test="${_cfg.complexCfg[mainTable].exprType==0}">checked</c:if>
><spring:message code="null"/>
</label>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
<label class="radio-inline">
<input type="radio" name="complexCfg[${otherTable.tableName}].exprType" value="1"
<c:if test="${_cfg.complexCfg[otherTable.tableName].exprType==1}">checked</c:if>
><spring:message code="and"/>
</label>
<label class="radio-inline">
<input type="radio" name="complexCfg[${otherTable.tableName}].exprType" value="0"
<c:if test="${_cfg.complexCfg[otherTable.tableName].exprType==0}">checked</c:if>
><spring:message code="null"/>
</label>
</c:when>
</c:choose>
</div>
<div for="isAreaEffective"></div>
</div>
</div>
</div>
<div class="row complexCfg collapse">
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="match_method"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '4' and otherTable==null}">
<select name="complexCfg[${mainTable}].matchMethod" class="selectpicker select2 form-control" >
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.complexCfg[mainTable].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
<option value="1" <c:if test="${_cfg.complexCfg[mainTable].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
<option value="2" <c:if test="${_cfg.complexCfg[mainTable].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
<option value="3" <c:if test="${_cfg.complexCfg[mainTable].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
</select>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
<select name="complexCfg[${otherTable.tableName}].matchMethod" class="selectpicker select2 form-control" >
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.complexCfg[otherTable.tableName].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
<option value="1" <c:if test="${_cfg.complexCfg[otherTable.tableName].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
<option value="2" <c:if test="${_cfg.complexCfg[otherTable.tableName].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
<option value="3" <c:if test="${_cfg.complexCfg[otherTable.tableName].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
</select>
</c:when>
</c:choose>
</div>
<div for="matchMethod"></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="whether_hexbinary"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '4' and otherTable==null}">
<select name="complexCfg[${mainTable}].isHexbin" class="selectpicker select2 form-control" >
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.complexCfg[mainTable].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
<option value="1" <c:if test="${_cfg.complexCfg[mainTable].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
<option value="2" <c:if test="${_cfg.complexCfg[mainTable].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
</select>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
<select name="complexCfg[${otherTable.tableName}].isHexbin" class="selectpicker select2 form-control" >
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.complexCfg[otherTable.tableName].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
<option value="1" <c:if test="${_cfg.complexCfg[otherTable.tableName].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
<option value="2" <c:if test="${_cfg.complexCfg[otherTable.tableName].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
</select>
</c:when>
</c:choose>
</div>
</div>
</div>
<c:choose>
<c:when test="${mainTableType eq '4' and otherTable==null}">
<input name="complexCfg[${mainTable}].cfgId" type="hidden" value="${_cfg.complexCfg[mainTable].cfgId}"/>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '4'}">
<input name="complexCfg[${otherTable.tableName}].cfgId" type="hidden" value="${_cfg.complexCfg[otherTable.tableName].cfgId}"/>
</c:when>
</c:choose>
</div>
<!--/row-->

View File

@@ -0,0 +1,249 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<style>
.ipCfg-hide{
display:none;
}
</style>
<h3 class="form-section">IP<spring:message code="block_config"/><small><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 for="cfgDesc"></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>
<div for="ipType"></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_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>
<div for="srcIp"></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="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>
<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>
<div for="srcPort"></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="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>
<div for="srcPortMask"></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="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>
<div for="dstIp"></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="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>
<div for="dstIpMask"></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="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>
<div for="dstPort"></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="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>
<div for="dstPortMask"></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="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>
<div for="direction"></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="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>
<div for="protocol"></div>
</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>

View File

@@ -0,0 +1,139 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<h3 class="form-section">字符串<spring:message code="block_config"/><small><span class="glyphicon glyphicon-chevron-down" data-toggle="collapse" data-target=".stringCfg" title="add"></span></small></h3>
<div class="row stringCfg 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 '2' and otherTable==null}">
<input class="form-control" type="text" name="stringCfg[${mainTable}].cfgDesc" value="${_cfg.stringCfg[mainTable].cfgDesc}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
<input class="form-control" type="text" name="stringCfg[${otherTable.tableName}].cfgDesc" value="${_cfg.stringCfg[otherTable.tableName].cfgDesc}">
</c:when>
</c:choose>
</div>
<div for="cfgDesc"></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="key_word"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '2' and otherTable==null}">
<input class="form-control" type="text" name="stringCfg[${mainTable}].cfgKeywords" value="${_cfg.stringCfg[mainTable].cfgKeywords}">
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
<input class="form-control" type="text" name="stringCfg[${otherTable.tableName}].cfgKeywords" value="${_cfg.stringCfg[otherTable.tableName].cfgKeywords}">
</c:when>
</c:choose>
</div>
<div for="cfgKeywords"></div>
</div>
</div>
</div>
<div class="row stringCfg collapse">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="expression_type"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '2' and otherTable==null}">
<label class="radio-inline">
<input type="radio" name="stringCfg[${mainTable}].exprType" value="1"
<c:if test="${_cfg.stringCfg[mainTable].exprType==1}">checked</c:if>
><spring:message code="and"/>
</label>
<label class="radio-inline">
<input type="radio" name="stringCfg[${mainTable}].exprType" value="0"
<c:if test="${_cfg.stringCfg[mainTable].exprType==0}">checked</c:if>
><spring:message code="null"/>
</label>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
<label class="radio-inline">
<input type="radio" name="stringCfg[${otherTable.tableName}].exprType" value="1"
<c:if test="${_cfg.stringCfg[otherTable.tableName].exprType==1}">checked</c:if>
><spring:message code="and"/>
</label>
<label class="radio-inline">
<input type="radio" name="stringCfg[${otherTable.tableName}].exprType" value="0"
<c:if test="${_cfg.stringCfg[otherTable.tableName].exprType==0}">checked</c:if>
><spring:message code="null"/>
</label>
</c:when>
</c:choose>
</div>
<div for="exprType"></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="match_method"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '2' and otherTable==null}">
<select name="stringCfg[${mainTable}].matchMethod" class="selectpicker select2 form-control">
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.stringCfg[mainTable].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
<option value="1" <c:if test="${_cfg.stringCfg[mainTable].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
<option value="2" <c:if test="${_cfg.stringCfg[mainTable].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
<option value="3" <c:if test="${_cfg.stringCfg[mainTable].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
</select>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
<select name="stringCfg[${otherTable.tableName}].matchMethod" class="selectpicker select2 form-control">
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.stringCfg[otherTable.tableName].matchMethod==0 }">selected</c:if>><spring:message code="substring_match"></spring:message></option>
<option value="1" <c:if test="${_cfg.stringCfg[otherTable.tableName].matchMethod==1 }">selected</c:if>><spring:message code="right_match"></spring:message></option>
<option value="2" <c:if test="${_cfg.stringCfg[otherTable.tableName].matchMethod==2 }">selected</c:if>><spring:message code="left_match"></spring:message></option>
<option value="3" <c:if test="${_cfg.stringCfg[otherTable.tableName].matchMethod==3 }">selected</c:if>><spring:message code="exactly_match"></spring:message></option>
</select>
</c:when>
</c:choose>
</div>
<div for="matchMethod"></div>
</div>
</div>
</div>
<div class="row stringCfg collapse">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="whether_hexbinary"/></label>
<div class="col-md-6">
<c:choose>
<c:when test="${mainTableType eq '2' and otherTable==null}">
<select name="stringCfg[${mainTable}].isHexbin" class="selectpicker select2 form-control" >
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.stringCfg[mainTable].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
<option value="1" <c:if test="${_cfg.stringCfg[mainTable].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
<option value="2" <c:if test="${_cfg.stringCfg[mainTable].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
</select>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
<select name="stringCfg[${otherTable.tableName}].isHexbin" class="selectpicker select2 form-control" >
<option value="" ><spring:message code="select"/></option>
<option value="0" <c:if test="${_cfg.stringCfg[otherTable.tableName].isHexbin==0 }">selected</c:if>><spring:message code="case_insensitive_nohex"></spring:message></option>
<option value="1" <c:if test="${_cfg.stringCfg[otherTable.tableName].isHexbin==1 }">selected</c:if>><spring:message code="hex_binary"></spring:message></option>
<option value="2" <c:if test="${_cfg.stringCfg[otherTable.tableName].isHexbin==2 }">selected</c:if>><spring:message code="case_sensitive_nohex"></spring:message></option>
</select>
</c:when>
</c:choose>
</div>
<div for="isHexbin"></div>
</div>
</div>
<c:choose>
<c:when test="${mainTableType eq '2' and otherTable==null}">
<input name="stringCfg[${mainTable}].cfgId" type="hidden" value="${_cfg.stringCfg[mainTable].cfgId}"/>
</c:when>
<c:when test="${otherTable!=null and otherTable.tableType eq '2'}">
<input name="stringCfg[${otherTable.tableName}].cfgId" type="hidden" value="${_cfg.stringCfg[otherTable.tableName].cfgId}"/>
</c:when>
</c:choose>
</div>
<!--/row-->

View File

@@ -302,10 +302,7 @@
</div>
</div>
</div>
</div>
<!-- /筛选搜索内容栏 结束-->
</form:form>
</div>

View File

@@ -0,0 +1,218 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title><spring:message code="${cfgName}"></spring:message></title>
<script type="text/javascript">
$(function(){
$("[name^='ipCfg']").attr("disabled",true);
//$("[name^='stringCfg']").attr("disabled",true);
//$("[name^='complexCfg']").attr("disabled",true);
//$("[name^='numCfg']").attr("disabled",true);
$(".glyphicon").on("click",function(){
var className=$(this).attr("data-target");
if($(this).hasClass("glyphicon-chevron-down")){
$(this).removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up");
}else if($(this).hasClass("glyphicon-chevron-up")){
$(this).removeClass("glyphicon-chevron-up").addClass("glyphicon-chevron-down");
}else if($(this).hasClass("glyphicon-plus")){
var targetName=className.substring(1,className.length);
$(this).attr("title","remove");
$(this).removeClass("glyphicon-plus").addClass("glyphicon-remove");
$("[name^='"+targetName+"']").removeAttr("disabled");
//解决select插件disbale后无法恢复
$(".bootstrap-select").removeClass("disabled");
$(".bootstrap-select button").removeClass("disabled");
}else if($(this).hasClass("glyphicon-remove")){
var targetName=className.substring(1,className.length);
$(this).attr("title","add");
$(this).removeClass("glyphicon-remove").addClass("glyphicon-plus");
$("[name^='"+targetName+"']").attr("disabled",true);
}
});
$(".district").on("change",function(){
var val=$(this).val().toLowerCase();
if("others"==val){
$(this).parent("div").siblings(".otherValue").prop("type","text");
}else{
$(this).parent("div").siblings(".otherValue").prop("type","hidden").attr("value","");
}
});
$(".otherValue").on("change",function(){
var val=$(this).val();
if($(this).is(":visible")){
$(this).prev("div").find("option").each(function(){
if("others"==$(this).text().toLowerCase()){
$(this).prop("value",val);
if($(this).prop("selected")){
$(this).parent("select.selectpicker").selectpicker('val',val);
}
}
});
}
});
$(".ipType").on("change",function(){
var mainTableType="${mainTableType}";
var otherTables='${_cfg.otherTables}';
var tableName=$(this).attr("name").replace(".ipType","");
var type=$(this).val();
if(4==type){
if(!$("input[name='"+tableName+".srcIpMask']").val()){
$("input[name='"+tableName+".srcIpMask']").val("255.255.255.255");
}else if($("input[name='"+tableName+"srcIpMask']").val()=="FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF"){
$("input[name='"+tableName+".srcIpMask']").val("255.255.255.255");
}
if(!$("input[name='"+tableName+".dstIpMask']").val()){
$("input[name='"+tableName+".dstIpMask']").val("255.255.255.255");
}else if($("input[name='"+tableName+".dstIpMask']").val()=="FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF"){
$("input[name='"+tableName+".dstIpMask']").val("255.255.255.255");
}
if(!$("input[name='"+tableName+".srcIp']").val()){
$("input[name='"+tableName+".srcIp']").val("0.0.0.0");
}else if($("input[name='"+tableName+".srcIp']").val()=="::"){
$("input[name='"+tableName+".srcIp']").val("0.0.0.0");
}
if(!$("input[name='"+tableName+".dstIp']").val()){
$("input[name='"+tableName+".dstIp']").val("0.0.0.0");
}else if($("input[name='"+tableName+".dstIp']").val()=="::"){
$("input[name='"+tableName+".dstIp']").val("0.0.0.0");
}
}
if(6==type){
if(!$("input[name='"+tableName+".srcIpMask']").val()){
$("input[name='"+tableName+".srcIpMask']").val("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
}else if($("input[name='"+tableName+".srcIpMask']").val()=="255.255.255.255"){
$("input[name='"+tableName+".srcIpMask']").val("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
}
if(!$("input[name='"+tableName+".dstIpMask']").val()){
$("input[name='"+tableName+".dstIpMask']").val("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
}else if($("input[name='"+tableName+".dstIpMask']").val()=="255.255.255.255"){
$("input[name='"+tableName+".dstIpMask']").val("FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF");
}
if(!$("input[name='"+tableName+".srcIp']").val()){
$("input[name='"+tableName+".srcIp']").val("::");
}else if($("input[name='"+tableName+".srcIp']").val()=="0.0.0.0"){
$("input[name='"+tableName+".srcIp']").val("::");
}
if(!$("input[name='"+tableName+".dstIp']").val()){
$("input[name='"+tableName+".dstIp']").val("::");
}else if($("input[name='"+tableName+".dstIp']").val()=="0.0.0.0"){
$("input[name='"+tableName+".dstIp']").val("::");
}
}
});
$("#cancel").on("click",function(){
window.history.back();
});
$("#cfgFrom").validate({
rules: {
'isAreaEffective':{
required:true
},
'requestId': {
required: true
}
},
messages: {
'isAreaEffective':{
required:'<spring:message code="required"/>'
},
'requestId': {
required: '<spring:message code="required"/>'
}
},
errorPlacement: function(error,element){
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
},
submitHandler: function(form){
form.submit();
},
errorContainer: "#messageBox"
});
});
</script>
</head>
<body>
<div class="page-content">
<h3 class="page-title">
<spring:message code="${cfgName}"></spring:message>
</h3>
<div class="row">
<div class="col-md-12">
<div class="portlet box blue">
<div class="portlet-title">
<div class="caption">
<i class="fa fa-gift"></i>
<c:if test="${empty _cfg.compileId}"><spring:message code="add"></spring:message></c:if>
<c:if test="${not empty _cfg.compileId}"><spring:message code="edit"></spring:message></c:if>
</div>
</div>
<div class="portlet-body form">
<!-- BEGIN FORM-->
<form id="cfgFrom" action="${ctx}/cfg/multiple/saveOrUpdateCfg" method="post" class="form-horizontal">
<input type="hidden" name="operator" value="${operator}">
<input type="hidden" name="mainTable" value="${_cfg.mainTable}">
<input type="hidden" name="mainTableType" value="${_cfg.mainTableType}">
<input type="hidden" name="audit" value="${audit}">
<input type="hidden" name="serviceId" value="${_cfg.serviceId}">
<input type="hidden" name="cfgName" value="${cfgName}">
<input type="hidden" name="action" value="${_cfg.action}">
<input type="hidden" name="compileId" value="${_cfg.compileId}">
<div class="form-body">
<c:choose>
<c:when test="${_cfg.mainTableType eq '4'}">
<%@include file="/WEB-INF/include/form/multiple/complexInfo.jsp" %>
</c:when>
<c:when test="${_cfg.mainTableType eq '3'}">
</c:when>
<c:when test="${_cfg.mainTableType eq '2'}">
<%@include file="/WEB-INF/include/form/multiple/stringInfo.jsp" %>
</c:when>
<c:when test="${_cfg.mainTableType eq '1'}">
<%@include file="/WEB-INF/include/form/multiple/ipInfo.jsp" %>
</c:when>
</c:choose>
<c:forEach items="${_cfg.otherTables}" var="otherTable">
<c:choose>
<c:when test="${otherTable.tableType eq '4'}">
<%@include file="/WEB-INF/include/form/multiple/complexInfo.jsp" %>
</c:when>
<c:when test="${otherTable.tableType eq '3'}">
</c:when>
<c:when test="${otherTable.tableType eq '2'}">
<%@include file="/WEB-INF/include/form/multiple/stringInfo.jsp" %>
</c:when>
<c:when test="${otherTable.tableType eq '1'}">
<%@include file="/WEB-INF/include/form/multiple/ipInfo.jsp" %>
</c:when>
</c:choose>
</c:forEach>
<%@include file="/WEB-INF/include/form/multiple/basicInfo.jsp" %>
</div>
<div class="form-actions">
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-offset-3 col-md-8">
<button id="save" type="submit" class="btn green"><spring:message code="submit"/></button>
<button id="cancel" type="button" class="btn default"><spring:message code="cancel"/></button>
</div>
</div>
</div>
<div class="col-md-6"> </div>
</div>
</div>
</form>
<!-- END FORM-->
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,564 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title><spring:message code="${cfgName}"></spring:message></title>
<script>
$(document).ready(function() {
//搜索框提示语初始化
if("${cfg.stringCfg.cfgKeywords}"){
$("#intype").val("${cfg.stringCfg.cfgKeywords}");
}else if("${cfg.stringCfg.cfgDesc}"){
$("#intype").val("${cfg.stringCfg.cfgDesc}");
}else if("${cfg.complexCfg.cfgDesc}"){
$("#intype").val("${cfg.complexCfg.cfgDesc}");
}else if("${cfg.complexCfg.district}"){
$("#seltype").val("${cfg.complexCfg.district}");
}else if("${cfg.complexCfg.keywords}"){
$("#intype").val("${cfg.complexCfg.keywords}");
}else{
$("#intype").attr("placeholder","<spring:message code='input'/> "+$("#seltype").find("option:selected").text());
}
$("#seltype").change(function(){
$("#intype").attr("placeholder","<spring:message code='input'/> "+$(this).find("option:selected").text());
});
//筛选功能初始化
filterActionInit();
$("#isAudit").change(function(){
page();
});
//reset
$("#resetBtn").on("click",function(){
$("select.selectpicker").each(function(){
$(this).selectpicker('val',$(this).find('option:first').val());
$(this).find("option").attr("selected",false);
$(this).find("option:first").attr("selected",true);
});
$(".Wdate").attr("value",'');
$("#keywords").attr("value",'');
$("#searchForm")[0].reset();
});
});
//查询
function page(n,s){
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").submit();
return false;
}
</script>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<c:if test="${audit==0}">
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/cfg/multiple/form?serviceId=${serviceId}&action=${action}&cfgName=${cfgName}&mainTable=${mainTable}'"><spring:message code="add"></spring:message></button>
</c:if>
</div>
<h3 class="page-title">
<spring:message code="${cfgName}"></spring:message>
<small><spring:message code="date_list"/></small>
</h3>
<h5 class="page-header"></h5>
<div class="row">
<div class="col-md-12">
<div class="portlet">
<div class="portlet-body">
<div class="row" >
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/cfg/multiple/list" method="post" class="form-search">
<input id="mainTable" name="mainTable" type="hidden" value="${mainTable}"/>
<input id="mainTableType" name="mainTableType" type="hidden" value="${mainTableType}"/>
<input id="cfgType" name="cfgType" type="hidden" value="${cfgType}"/>
<input id="cfgName" name="cfgName" type="hidden" value="${cfgName}"/>
<input id="action" name="action" type="hidden" value="${action}"/>
<input id="serviceId" name="serviceId" type="hidden" value="${serviceId}"/>
<input id="audit" name="audit" type="hidden" value="${audit}"/>
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<!-- 筛选按钮展开状态-->
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<div class="pull-left">
<form:select path="isAudit" class="selectpicker select2 input-small">
<form:option value=""><spring:message code="state"/></form:option>
<form:option value="0"><spring:message code="created"></spring:message></form:option>
<form:option value="1"><spring:message code="approved"></spring:message></form:option>
<form:option value="2"><spring:message code="unapproved"></spring:message></form:option>
<form:option value="3"><spring:message code="cancel_approved"></spring:message></form:option>
</form:select>
</div>
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<form:select path="seltype" class="selectpicker select2 input-small" >
<c:if test="${mainTableType eq '2'}">
<form:option value="stringCfg.cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="stringCfg.cfgKeywords"><spring:message code="key_word"></spring:message></form:option>
</c:if>
<c:if test="${mainTableType eq '4'}">
<form:option value="complexCfg.cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="complexCfg.district"><spring:message code="match_area"></spring:message></form:option>
<form:option value="complexCfg.keywords"><spring:message code="key_word"></spring:message></form:option>
</c:if>
</form:select>
</div>
<input id="intype" class="form-control input-medium" type="text" value="">
</div>
</div>
<div class="pull-left">
<button type="button" class="btn blue" onClick="return page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
<button type="button" class="btn btn-default" id="resetBtn" > <i class="fa fa-refresh"></i> <spring:message code="reset"/> </button>
<button type="button" class="btn btn-default" id="filter-btn"> 筛选 <i class="fa fa-angle-double-down"></i></button>
</div>
<div class="pull-right">
<a class="btn btn-icon-only btn-default setfields tooltips"
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
<i class="icon-wrench"></i>
</a>
</div>
<%-- <button type="button" class="btn btn-default btn-sm" onclick="return page()">
<i class="fa fa-edit"></i><spring:message code="search"></spring:message>
</button> --%>
<%-- <div class="pull-left">
<c:set var="sortI18n"><spring:message code="sort"/></c:set>
<select name="orderBy" class="selectpicker select2 input-small" title="${sortI18n}">
<option value="${mainTable}.create_time asc" <c:if test="${fn:contains(page.orderBy,'create_time asc') }">selected</c:if> ><spring:message code="createTime_asc"/></option>
<option value="${mainTable}.create_time desc" <c:if test="${fn:contains(page.orderBy , 'create_time desc') }">selected</c:if> ><spring:message code="createTime_desc"/></option>
<option value="${mainTable}.edit_time asc" <c:if test="${fn:contains(page.orderBy , 'edit_time asc') }">selected</c:if> ><spring:message code="editTime_asc"/></option>
<option value="${mainTable}.edit_time desc" <c:if test="${fn:contains(page.orderBy , 'edit_time desc') }">selected</c:if> ><spring:message code="editTime_desc"/></option>
<option value="${mainTable}.audit_time asc" <c:if test="${fn:contains(page.orderBy , 'audit_time asc') }">selected</c:if> ><spring:message code="auditTime_asc"/></option>
<option value="${mainTable}.audit_time desc" <c:if test="${fn:contains(page.orderBy , 'audit_time desc') }">selected</c:if> ><spring:message code="auditTime_desc"/></option>
</select>
</div> --%>
</div>
<!-- 搜索内容与操作按钮栏 -->
<!-- 筛选搜索内容栏默认隐藏-->
<div class="col-md-12 filter-action-select-panle hide" >
<div class="row">
<c:choose>
<c:when test="${action==5}">
</c:when>
<c:when test="${action==8}">
</c:when>
<c:otherwise>
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='request_number'/></label>
<form:select path="requestId" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code='select'/></form:option>
<c:forEach items="${requestInfos}" var="requestInfo" >
<form:option value="${requestInfo.id}"><spring:message code="${requestInfo.requestTitle}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='type'/></label>
<form:select path="classify" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code='select'/></form:option>
<c:forEach items="${fls}" var="fl" >
<form:option value="${fl.serviceDictId}"><spring:message code="${fl.itemValue}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='attribute'/></label>
<form:select path="attribute" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code='select'/></form:option>
<c:forEach items="${xzs}" var="xz" >
<form:option value="${xz.serviceDictId}"><spring:message code="${xz.itemValue}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='label'/></label>
<form:select path="lable" class="selectpicker form-control" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code='select'/></form:option>
<c:forEach items="${lables}" var="lable" >
<form:option value="${lable.serviceDictId}"><spring:message code="${lable.itemValue}"></spring:message></form:option>
</c:forEach>
</form:select>
</div>
</div>
</c:otherwise>
</c:choose>
</div>
<div class="row">
<div class="row">
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="config_time"/></label>
<input name="search_create_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value='${cfg.search_create_time_start}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label>&nbsp;</label>
<input name="search_create_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${cfg.search_create_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="edit_time"/></label>
<input name="search_edit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${cfg.search_edit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label>&nbsp;</label>
<input name="search_edit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${cfg.search_edit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="audit_time"/></label>
<input name="search_audit_time_start" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${cfg.search_audit_time_start}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label>&nbsp;</label>
<input name="search_audit_time_end" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${cfg.search_audit_time_end}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
</div>
</div>
</div>
<!-- /筛选搜索内容栏 结束-->
</form:form>
</div>
<div class="table-responsive">
<table class="table table-striped table-bordered table-condensed text-nowrap">
<thead>
<tr>
<%-- <th><spring:message code="seq"/></th> --%>
<%--遍历主表属性 --%>
<c:choose>
<%--增强字符串 --%>
<c:when test="${mainTableType eq '4'}">
<th>增强字符串<spring:message code="config_describe"/></th>
<th><spring:message code="match_area"/></th>
<th><spring:message code="key_word"/></th>
</c:when>
<%--数值 --%>
<c:when test="${mainTableType eq '3'}">
</c:when>
<%--字符串 --%>
<c:when test="${mainTableType eq '2'}">
<th>字符串<spring:message code="config_describe"/></th>
<th><spring:message code="key_word"/></th>
</c:when>
<%--IP --%>
<c:when test="${mainTableType eq '1'}">
<th>ip<spring:message code="config_describe"/></th>
<th>ip<spring:message code="type"/></th>
<th><spring:message code="client_ip"/></th>
<th><spring:message code="client_address_mask"/></th>
<th><spring:message code="client_port"/></th>
<th><spring:message code="client_port_mask"/></th>
<th><spring:message code="server_ip"/></th>
<th><spring:message code="server_address_mask"/></th>
<th><spring:message code="server_port"/></th>
<th><spring:message code="server_port_mask"/></th>
<th><spring:message code="direction"/></th>
<th><spring:message code="protocol"/></th>
</c:when>
</c:choose>
<%--遍历主表属性 --%>
<%--遍历子表属性 --%>
<c:forEach items="${cfg.otherTables}" var="other" varStatus="status">
<c:if test="${other.tableType eq '4'}">
<th>增强字符串<spring:message code="config_describe"/></th>
<th><spring:message code="match_area"/></th>
<th><spring:message code="key_word"/></th>
</c:if>
<c:if test="${other.tableType eq '3'}">
</c:if>
<c:if test="${other.tableType eq'2'}">
<th>字符串<spring:message code="config_describe"/></th>
<th><spring:message code="key_word"/></th>
</c:if>
<c:if test="${other.tableType eq '1'}">
<th>ip<spring:message code="config_describe"/></th>
<th>ip<spring:message code="type"/></th>
<th><spring:message code="client_ip"/></th>
<th><spring:message code="client_address_mask"/></th>
<th><spring:message code="client_port"/></th>
<th><spring:message code="client_port_mask"/></th>
<th><spring:message code="server_ip"/></th>
<th><spring:message code="server_address_mask"/></th>
<th><spring:message code="server_port"/></th>
<th><spring:message code="server_port_mask"/></th>
<th><spring:message code="direction"/></th>
<th><spring:message code="protocol"/></th>
</c:if>
</c:forEach>
<%--遍历子表属性 --%>
<th><spring:message code="block_type"/></th>
<th><spring:message code="letter"/></th>
<th><spring:message code="whether_area_block"/></th>
<th><spring:message code="type"/></th>
<th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th>
<th><spring:message code="valid_identifier"/></th>
<th><spring:message code="is_audit"/></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>
<th class="sort-column r.edit_time"><spring:message code="edit_time"/></th>
<th><spring:message code="auditor"/></th>
<th class="sort-column r.audit_time"><spring:message code="audit_time"/></th>
<th><spring:message code="operation"></spring:message></th>
</tr>
</thead>
<tbody>
<c:forEach items="${page.list }" var="bean" varStatus="status" step="1">
<tr>
<%-- <td>${status.index+1 }</td> --%>
<%--遍历主表值 --%>
<c:choose>
<%--增强字符串 --%>
<c:when test="${mainTableType eq '4'}">
<td>${bean.complexCfg[mainTable].cfgDesc }</td>
<td>${bean.complexCfg[mainTable].district }</td>
<td>${bean.complexCfg[mainTable].keywords }</td>
</c:when>
<%--数值 --%>
<c:when test="${mainTableType eq '3'}">
</c:when>
<%--字符串 --%>
<c:when test="${mainTableType eq '2'}">
<td>${bean.stringCfg[mainTable].cfgDesc }</td>
<td>${bean.stringCfg[mainTable].cfgKeywords }</td>
</c:when>
<%--IP --%>
<c:when test="${mainTableType eq '1'}">
<td>${bean.ipCfg[mainTable].cfgDesc }</td>
<td>V${bean.ipCfg[mainTable].ipType }</td>
<td>${bean.ipCfg[mainTable].srcIp }</td>
<td>${bean.ipCfg[mainTable].srcIpMask }</td>
<td>${bean.ipCfg[mainTable].srcPort }</td>
<td>${bean.ipCfg[mainTable].srcPortMask }</td>
<td>${bean.ipCfg[mainTable].dstIp }</td>
<td>${bean.ipCfg[mainTable].dstIpMask }</td>
<td>${bean.ipCfg[mainTable].dstPort }</td>
<td>${bean.ipCfg[mainTable].dstPortMask }</td>
<td>
<c:if test="${bean.ipCfg[mainTable].direction==0}"><spring:message code="twoway"/></c:if>
<c:if test="${bean.ipCfg[mainTable].direction==1}"><spring:message code="oneway"/></c:if>
</td>
<td>
<c:if test="${bean.ipCfg[mainTable].protocol==6}"><spring:message code="TCP"/></c:if>
<c:if test="${bean.ipCfg[mainTable].protocol==17}"><spring:message code="UDP"/></c:if>
<c:if test="${bean.ipCfg[mainTable].protocol==0}"><spring:message code="arbitrary"/></c:if>
</td>
</c:when>
</c:choose>
<%--遍历主表值 --%>
<%--遍历子表值 --%>
<c:forEach items="${cfg.otherTables}" var="other" varStatus="status">
<c:if test="${other.tableType eq '4'}">
<c:choose>
<c:when test="${bean.complexCfg[other.tableName]!=null}">
<td>${bean.complexCfg[other.tableName].cfgDesc }</td>
<td>${bean.complexCfg[other.tableName].district }</td>
<td>${bean.complexCfg[other.tableName].keywords }</td>
</c:when>
<c:otherwise><td></td><td></td><td></td></c:otherwise>
</c:choose>
</c:if>
<c:if test="${other.tableType eq '3'}">
<c:choose>
<c:when test="${bean.numCfg[other.tableName]!=null}">
</c:when>
<c:otherwise></c:otherwise>
</c:choose>
</c:if>
<c:if test="${other.tableType eq '2'}">
<c:choose>
<c:when test="${bean.stringCfg[other.tableName]!=null}">
<td>${bean.stringCfg[other.tableName].cfgDesc }</td>
<td>${bean.stringCfg[other.tableName].cfgKeywords }</td>
</c:when>
<c:otherwise><td></td><td></td></c:otherwise>
</c:choose>
</c:if>
<c:if test="${other.tableType eq '1'}">
<c:choose>
<c:when test="${bean.ipCfg[other.tableName]!=null}">
<td>${bean.ipCfg[other.tableName].cfgDesc }</td>
<td>V${bean.ipCfg[other.tableName].ipType }</td>
<td>${bean.ipCfg[other.tableName].srcIp }</td>
<td>${bean.ipCfg[other.tableName].srcIpMask }</td>
<td>${bean.ipCfg[other.tableName].srcPort }</td>
<td>${bean.ipCfg[other.tableName].srcPortMask }</td>
<td>${bean.ipCfg[other.tableName].dstIp }</td>
<td>${bean.ipCfg[other.tableName].dstIpMask }</td>
<td>${bean.ipCfg[other.tableName].dstPort }</td>
<td>${bean.ipCfg[other.tableName].dstPortMask }</td>
<td>
<c:if test="${bean.ipCfg[other.tableName].direction==0}"><spring:message code="twoway"/></c:if>
<c:if test="${bean.ipCfg[other.tableName].direction==1}"><spring:message code="oneway"/></c:if>
</td>
<td>
<c:if test="${bean.ipCfg[other.tableName].protocol==6}"><spring:message code="TCP"/></c:if>
<c:if test="${bean.ipCfg[other.tableName].protocol==17}"><spring:message code="UDP"/></c:if>
<c:if test="${bean.ipCfg[other.tableName].protocol==0}"><spring:message code="arbitrary"/></c:if>
</td>
</c:when>
<c:otherwise>
<td></td><td></td><td></td><td></td><td></td><td></td>
<td></td><td></td><td></td><td></td><td></td><td></td>
</c:otherwise>
</c:choose>
</c:if>
</c:forEach>
<%--遍历子表值 --%>
<td>
<c:if test="${1 eq bean.action }"><spring:message code="block"/></c:if>
<c:if test="${2 eq bean.action }"><spring:message code="monitor"/></c:if>
<c:if test="${5 eq bean.action }"><spring:message code="block_white_list"/></c:if>
<c:if test="${6 eq bean.action }"><spring:message code="monitor_white_list"/></c:if>
<c:if test="${7 eq bean.action }"><spring:message code="block_monitor_white_list"/></c:if>
<c:if test="${8 eq bean.action }"><spring:message code="grey_list"/></c:if>
</td>
<%-- <td>${cfg.serviceId }</td> --%>
<td>${bean.requestName }</td>
<%-- <td>${cfg.compileId }</td> --%>
<td>
<c:if test="${bean.isAreaEffective==0}"><spring:message code="no"/></c:if>
<c:if test="${bean.isAreaEffective==1}"><spring:message code="yes"/></c:if>
</td>
<td>
<c:forEach items="${fn:split(bean.classify,',')}" var="classifyId">
<c:forEach items="${fls}" var="fl">
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
${fl.itemValue},
</c:if>
</c:forEach>
</c:forEach>
</td>
<td>
<c:forEach items="${fn:split(bean.attribute,',')}" var="attributeId">
<c:forEach items="${xzs}" var="xz">
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">${xz.itemValue},</c:if>
</c:forEach>
</c:forEach>
</td>
<td>
<c:forEach items="${fn:split(bean.lable,',')}" var="lableId">
<c:forEach items="${lables}" var="lable">
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">${lable.itemValue},</c:if>
</c:forEach>
</c:forEach>
</td>
<%-- <td>${cfg.areaEffectiveIds }</td> --%>
<td>
<c:if test="${bean.isValid==0}"><spring:message code="no"/></c:if>
<c:if test="${bean.isValid==1}"><spring:message code="yes"/></c:if>
<c:if test="${bean.isValid==-1}"><spring:message code="deleted"/></c:if>
</td>
<td>
<c:choose>
<c:when test="${bean.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
<c:when test="${bean.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
<c:when test="${bean.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
<c:when test="${bean.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
</c:choose>
</td>
<td>${bean.creatorName }</td>
<td><fmt:formatDate value="${bean.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${bean.editorName }</td>
<td><fmt:formatDate value="${bean.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${bean.auditorName }</td>
<td><fmt:formatDate value="${bean.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>
<div class="btn-group btn-xs">
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#"><spring:message code="operation"></spring:message><span class="caret"></span></a>
<ul class="dropdown-menu btn-xs">
<c:if test="${audit==0}">
<c:choose>
<c:when test="${bean.isAudit eq '2'}">
<li><a href="${ctx}/cfg/multiple/updateForm?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&cfgName=${cfgName}&mainTable=${mainTable}&mainTableType=${mainTableType}" onclick="javascript:return confirm('sure', this.href)"><spring:message code="edit"></spring:message></a></li>
</c:when>
<c:when test="${bean.isAudit eq '0'}">
<li><a href="${ctx}/cfg/multiple/updateForm?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&cfgName=${cfgName}&mainTable=${mainTable}&mainTableType=${mainTableType}" onclick="javascript:return confirm('sure', this.href)"><spring:message code="edit"></spring:message></a></li>
<li><a href="${ctx}/cfg/multiple/deleteCfg?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&cfgName=${cfgName}" onclick="return confirm('sure', this.href)"><spring:message code="delete"></spring:message></a></li>
</c:when>
</c:choose>
</c:if>
<c:if test="${audit==1}">
<c:choose>
<c:when test="${bean.isAudit eq '1'}">
<li><a href="${ctx}/cfg/multiple/auditCfg?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&isAudit=3&cfgName=${cfgName}&mainTable=${mainTable}" onclick="return confirm('sure', this.href)"><spring:message code="cancel"></spring:message></a></li>
</c:when>
<c:when test="${bean.isAudit eq '0'}">
<li><a href="${ctx}/cfg/multiple/auditCfg?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&isAudit=1&cfgName=${cfgName}&mainTable=${mainTable}" onclick="return confirm('sure', this.href)"><spring:message code="approved"></spring:message></a></li>
<li><a href="${ctx}/cfg/multiple/auditCfg?serviceId=${bean.serviceId}&action=${bean.action}&compileId=${bean.compileId}&isAudit=2&cfgName=${cfgName}&mainTable=${mainTable}" onclick="return confirm('sure', this.href)"><spring:message code="unapproved"></spring:message></a></li>
</c:when>
</c:choose>
</c:if>
</ul>
</div>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
</div>
<style>
.input-medium {
width: 200px !important;
}
.Wdate {
border: #c2cad8 1px solid;
height: 26px;
}
.dropdown-menu {
min-width: 50px;
}
</style>
</body>
</html>