IP复用策略拆分为SNAT/DNAT复用策略.

This commit is contained in:
zhangwq
2018-10-05 21:31:48 +08:00
parent c06d7e11cb
commit 236660f3ce
8 changed files with 1319 additions and 39 deletions

View File

@@ -111,4 +111,101 @@ public class IpMultiplexController extends CommonController {
@ModelAttribute("cfg")IpPortCfg entity,String ids,RedirectAttributes redirectAttributes){
this._exportIp(columns,model, request, response, entity, ids, redirectAttributes);
}
/**
* IP复用策略拆分为SNAT/DNAT复用策略
*/
@RequestMapping(value = {"/snatPolicyList"})
public String snatPolicyList(String cfgName,Model model,@ModelAttribute("cfg")IpPortCfg cfg,HttpServletRequest request,HttpServletResponse response) {
this._ipList(cfgName,model, cfg, request, response);
return "/cfg/manipulation/ipmulitiplex/snatPolicyList";
}
@RequestMapping(value = {"/snatPolicyForm"})
@RequiresPermissions(value={"snat_policy:config"})
public String snatPolicyForm(String cfgName,Model model,String ids,Integer functionId,BaseIpCfg entity) {
this._ipForm(cfgName,model, ids, functionId, entity);
SysDataDictionaryItem dict=null;
List<SysDataDictionaryItem> dictList= DictUtils.getDictList("GROUP_TYPE");
for(SysDataDictionaryItem di:dictList){
if("2".equals(di.getItemCode())){
dict=di;
break;
}
}
if(dict!=null){
List<PolicyGroupInfo> policyGroups=policyGroupInfoService.findPolicyGroupInfosByType(Integer.parseInt(dict.getItemCode()));
model.addAttribute("policyGroups", policyGroups);
}
model.addAttribute("urlPrefix","/manipulation/ipmulitiplex");
return "/cfg/manipulation/ipmulitiplex/snatPolicyForm";
}
@RequestMapping(value = {"/saveOrUpdateSnat"})
public String saveOrUpdateSnat(String cfgName,RedirectAttributes model, IpPortCfg cfg) {
this._saveOrUpdateIp(cfgName,model, cfg);
return "redirect:" + adminPath +"/manipulation/ipmulitiplex/snatPolicyList?functionId="+cfg.getFunctionId();
}
@RequestMapping(value = {"/snatDelete"})
@RequiresPermissions("snat_policy:config")
public String snatDelete(String cfgName,String ids,String compileIds,Integer functionId,RedirectAttributes model) {
this._deleteIp(cfgName,ids, compileIds, functionId, model);
return "redirect:" + adminPath +"/manipulation/ipmulitiplex/snatPolicyList?functionId="+functionId;
}
@RequestMapping(value = {"/auditSnat"})
@RequiresPermissions("snat_policy:confirm")
public String auditSnat(String cfgName,String ids,IpPortCfg cfg,RedirectAttributes redirectAttributes) {
this._auditIp(cfgName,ids, cfg, redirectAttributes);
return "redirect:" + adminPath +"/manipulation/ipmulitiplex/snatPolicyList?functionId="+cfg.getFunctionId();
}
@RequestMapping(value = {"/dnatPolicyList"})
public String dnatPolicyList(String cfgName,Model model,@ModelAttribute("cfg")IpPortCfg cfg,HttpServletRequest request,HttpServletResponse response) {
this._ipList(cfgName,model, cfg, request, response);
return "/cfg/manipulation/ipmulitiplex/dnatPolicyList";
}
@RequestMapping(value = {"/dnatPolicyForm"})
@RequiresPermissions(value={"dnat_policy:config"})
public String dnatPolicyForm(String cfgName,Model model,String ids,Integer functionId,BaseIpCfg entity) {
this._ipForm(cfgName,model, ids, functionId, entity);
SysDataDictionaryItem dict=null;
List<SysDataDictionaryItem> dictList= DictUtils.getDictList("GROUP_TYPE");
for(SysDataDictionaryItem di:dictList){
if("3".equals(di.getItemCode())){
dict=di;
break;
}
}
if(dict!=null){
List<PolicyGroupInfo> policyGroups=policyGroupInfoService.findPolicyGroupInfosByType(Integer.parseInt(dict.getItemCode()));
model.addAttribute("policyGroups", policyGroups);
}
model.addAttribute("urlPrefix","/manipulation/ipmulitiplex");
return "/cfg/manipulation/ipmulitiplex/dnatPolicyForm";
}
@RequestMapping(value = {"/saveOrUpdateDnat"})
public String saveOrUpdateDnat(String cfgName,RedirectAttributes model, IpPortCfg cfg) {
this._saveOrUpdateIp(cfgName,model, cfg);
return "redirect:" + adminPath +"/manipulation/ipmulitiplex/dnatPolicyList?functionId="+cfg.getFunctionId();
}
@RequestMapping(value = {"/dnatDelete"})
@RequiresPermissions("dnat_policy:config")
public String dnatDelete(String cfgName,String ids,String compileIds,Integer functionId,RedirectAttributes model) {
this._deleteIp(cfgName,ids, compileIds, functionId, model);
return "redirect:" + adminPath +"/manipulation/ipmulitiplex/dnatPolicyList?functionId="+functionId;
}
@RequestMapping(value = {"/auditDnat"})
@RequiresPermissions("dnat_policy:confirm")
public String auditDnat(String cfgName,String ids,IpPortCfg cfg,RedirectAttributes redirectAttributes) {
this._auditIp(cfgName,ids, cfg, redirectAttributes);
return "redirect:" + adminPath +"/manipulation/ipmulitiplex/dnatPolicyList?functionId="+cfg.getFunctionId();
}
}

View File

@@ -334,7 +334,7 @@ public class IpCfgService extends CrudService<IpCfgDao,BaseIpCfg> {
Map<String,List> areaMap = cfgConvert(areaIpRegionList,beans1,1,cfg,groupRelationList);
groupRelationList=areaMap.get("groupList");
areaIpRegionList=areaMap.get("dstList");
maatCfg.setAreaEffectiveIds(StringUtils.isBlank(cfg.getAreaEffectiveIds())?"0":cfg.getAreaEffectiveIds());
//maatCfg.setAreaEffectiveIds(StringUtils.isBlank(cfg.getAreaEffectiveIds())?"0":cfg.getAreaEffectiveIds());
maatCfg.setAction(cfg.getAction());
maatCfg.setAuditTime(cfg.getAuditTime());
maatCfg.setIpRegionList(ipRegionList);

View File

@@ -1195,3 +1195,5 @@ dnat_ip_complex_loop=DNAT Complex Loop
snat_ip_complex_loop=SNAT Complex Loop
snat_ip_reuse_adress_pool_loop=SNAT IP Reuse Address Pool Loop
dnat_ip_reuse_adress_pool_loop=DNAT IP Reuse Address Pool Loop
snat_policy=SNAT Reuse Policy
dnat_policy=DNAT Reuse Policy

View File

@@ -1189,3 +1189,5 @@ APP_SSL_ADMIN=APP SSL Admin
APP_DK_GL=APP\u591A\u7528\u9014\u6807\u7B7E
dnat_complex_loop=DNAT IP\u590D\u7528\u56DE\u6D41
ip_reuse_adress_pool_loop=IP\u590D\u7528\u5730\u5740\u6C60\u56DE\u6D41
snat_policy=SNAT\u590D\u7528\u7B56\u7565
dnat_policy=DNAT\u590D\u7528\u7B56\u7565

View File

@@ -0,0 +1,346 @@
<%@ 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(){
//$("select[name='protocol']").parents(".form-group").addClass("hidden");
$("select[name='direction']").parents(".form-group").addClass("hidden");
if('${fn:length(serviceList)}'>1){
$("#serviceId").val($(".action:checked").attr("serviceId"));
$("#protocolId").val($(".action:checked").attr("protocolId"));
}
$(".action").on("change", function() {
$("#serviceId").val($(this).attr("serviceId"));
$("#protocolId").val($(this).attr("protocolId"));
});
$("#ipCfgFrom").validate({
errorPlacement: function(error,element){
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
},
submitHandler: function(form){
//loading('<spring:message code="onloading"/>');
form.submit();
},
errorContainer: "#messageBox"
});
});
</script>
</head>
<body>
<div class="page-content">
<h3 class="page-title">
<spring:message code="${_cfg.menuNameCode }"></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.cfgId}"><spring:message code="add"></spring:message></c:if>
<c:if test="${not empty _cfg.cfgId}"><spring:message code="edit"></spring:message></c:if>
</div>
</div>
<div class="portlet-body form">
<!-- BEGIN FORM-->
<form id="ipCfgFrom" action="${ctx}${urlPrefix}/saveOrUpdateDnat" method="post" class="form-horizontal">
<div class="form-body row">
<input name="cfgName" type="hidden" value="${cfgName}"/>
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
<input type="hidden" name="compileId" value="${_cfg.compileId}">
<input type="hidden" name="functionId" value="${_cfg.functionId}">
<input type="hidden" name="isAreaEffective" value="0">
<c:if test="${fn:length(serviceList)==1}">
<c:forEach items="${serviceList}" var="service">
<input type="hidden" name="action" serviceId="${service.serviceId }" protocolId="${service.protocolId }" regionCode="${service.regionCode}" value="${service.action }">
<input type="hidden" id="protocolId" name="protocolId" value="${service.protocolId}">
<input type="hidden" id="serviceId" name="serviceId" value="${service.serviceId}">
</c:forEach>
</c:if>
<c:if test="${fn:length(serviceList)>1}">
<input type="hidden" id="protocolId" name="protocolId" value="${_cfg.protocolId}">
<input type="hidden" id="serviceId" name="serviceId" value="${_cfg.serviceId}">
</c:if>
<!-- 配置域类型 -->
<c:forEach items="${regionList}" var="region">
<input type="hidden" name="${cfgName}.configServiceType" value="${region.configServiceType}">
<input type="hidden" id="cfgType${region.configRegionCode}" name="cfgType" value="${region.configRegionValue}">
<input type="hidden" id="cfgRegionCode${region.configRegionCode}" name="cfgRegionCode"
isMaat="${region.isMaat}"
serviceType="${region.configServiceType}"
ipPortShow="${region.configIpPortShow}"
ipType="${region.configIpType}"
ipPattern="${region.configIpPattern}"
portPattern="${region.configPortPattern}"
direction="${region.configDirection}"
protocol="${region.configProtocol}"
regionType="${region.regionType}"
value="${region.configRegionCode}">
</c:forEach>
<div class="form-body">
<!-- desc and action -->
<div class="row">
<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">
<input class="form-control" type="text" name="cfgDesc" value="${_cfg.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="group"/></label>
<div class="col-md-6">
<select id="dnsStrategyId" name="dnsStrategyId" class="selectpicker show-tick form-control required">
<option value="" <c:if test="${empty _cfg.dnsStrategyId }">selected</c:if>><spring:message code="select"/></option>
<c:forEach items="${policyGroups }" var="policyGroup">
<option value="${policyGroup.groupId}" <c:if test="${_cfg.dnsStrategyId==policyGroup.groupId }">selected</c:if>><spring:message code="${policyGroup.groupName}"/></option>
</c:forEach>
</select>
</div>
<div for="dnsStrategyId"></div>
</div>
</div>
<c:if test="${fn:length(serviceList)>1}">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><spring:message code="action"/></label>
<div class="col-md-6">
<c:forEach items="${serviceList}" var="service"
varStatus="satus">
<label class="radio-inline"> <c:if
test="${_cfg.functionId eq service.functionId}">
<input type="radio" name="action"
serviceId="${service.serviceId }"
protocolId="${service.protocolId }"
regionCode="${service.regionCode }"
value="${service.action }" class="required action"
<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:if test="${dict.itemCode eq service.action }">
<spring:message code="${dict.itemValue }"/>
</c:if>
</c:forEach>
</c:if>
</label>
</c:forEach>
</div>
<div for="action"></div>
</div>
</div>
</c:if>
</div>
<%--@include file="/WEB-INF/include/form/complexIpInfo.jsp" --%>
<div class="row ipInfo">
<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="ip_type"/></label>
<div class="col-md-6">
<select name="ipType" class="selectpicker show-tick form-control required">
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipTypeC">
<option value="${ipTypeC.itemCode}"
<c:if test="${_cfg.ipType==ipTypeC.itemCode
|| (_cfg.ipType==null && ipTypeC.itemCode==4)}">
selected
</c:if>
>
<spring:message code="${ipTypeC.itemValue}"/>
</option>
</c:forEach>
</select>
</div>
<div for="ipType"></div>
</div>
</div>
<div class="col-md-6 hidden">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip"/></label>
<div class="col-md-6">
<input class="form-control required ipCheck" type="text" name="srcIpAddress" value="${_cfg.srcIpAddress}">
</div>
<div for="srcIpAddress"></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_ip"/></label>
<div class="col-md-6">
<input class="form-control required ipCheck" type="text" name="destIpAddress" value="${_cfg.destIpAddress}">
</div>
<div for="destIpAddress"></div>
</div>
</div>
</div>
<div class="row ip">
<div class="col-md-6 hidden">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_pattern"/></label>
<div class="col-md-6">
<select name="ipPattern" class="selectpicker show-tick form-control required">
<c:forEach items="${fns:getDictList('IP_PATTERN')}" var="ipPatternC">
<option value="${ipPatternC.itemCode}" <c:if test="${_cfg.ipPattern==ipPatternC.itemCode || (_cfg.ipPattern==null && ipPatternC.itemCode==3)}">selected</c:if>><spring:message code="${ipPatternC.itemValue}"/></option>
</c:forEach>
</select>
</div>
<div for="ipPattern"></div>
</div>
</div>
</div>
<div class="row hidden port">
<div class="col-md-6 hidden">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="port_pattern"/></label>
<div class="col-md-6">
<select name="portPattern" class="selectpicker show-tick form-control required">
<c:forEach items="${fns:getDictList('PORT_PATTERN')}" var="portPatternC">
<option value="${portPatternC.itemCode}" <c:if test="${_cfg.portPattern==portPatternC.itemCode || (_cfg.portPattern==null && portPatternC.itemCode==1)}">selected</c:if>><spring:message code="${portPatternC.itemValue}"/></option>
</c:forEach>
</select>
</div>
<div for="portPattern"></div>
</div>
</div>
<div class="col-md-6 hidden">
<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">
<input class="form-control required portCheck" type="text" name="srcPort" value="${_cfg.srcPort}">
</div>
<div for="srcPort"></div>
</div>
</div>
</div>
<div class="row destPort">
<%-- <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">
<input class="form-control required ipCheck" type="text" name="destIpAddress" value="${_cfg.destIpAddress}">
</div>
<div for="destIpAddress"></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">
<select name="protocol"
class="selectpicker show-tick form-control required">
<c:forEach items="${fns:getDictList('PROTOCOL')}" var="protocolC">
<option value="${protocolC.itemCode}" <c:if test="${_cfg.protocol==protocolC.itemCode || (_cfg.protocol==null && protocolC.itemCode==0)}">selected</c:if>><spring:message code="${protocolC.itemValue}"/></option>
</c:forEach>
</select>
</div>
<div for="protocol"></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"/></label>
<div class="col-md-6">
<input class="form-control required portCheck" type="text" name="destPort" value="${_cfg.destPort}">
</div>
<div for="destPort"></div>
</div>
</div>
</div>
<div class="row protocol ">
<%-- <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">
<select name="protocol"
class="selectpicker show-tick form-control required">
<c:forEach items="${fns:getDictList('PROTOCOL')}" var="protocolC">
<option value="${protocolC.itemCode}" <c:if test="${_cfg.protocol==protocolC.itemCode || (_cfg.protocol==null && protocolC.itemCode==0)}">selected</c:if>><spring:message code="${protocolC.itemValue}"/></option>
</c:forEach>
</select>
</div>
<div for="protocol"></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="direction" /></label>
<div class="col-md-6">
<select name="direction"
class="selectpicker show-tick form-control required">
<c:forEach items="${fns:getDictList('DIRECTION')}" var="directionC">
<option value="${directionC.itemCode}"><spring:message code="${directionC.itemValue}"/></option>
</c:forEach>
</select>
</div>
<div for="direction"></div>
</div>
</div>
</div>
<%-- <div class="row">
<button type="button" class="btn btn-red-hollow center-block"
onClick="more(this);" data-click-times="0">
<spring:message code="show_more" />
</button>
</div> --%>
<br>
</div>
<div class="row ipmulitiplex">
<div class="col-md-6 hidden">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ir_type"/></label>
<div class="col-md-6">
<select name="irType" class="selectpicker show-tick form-control required">
<option value=""><spring:message code="select"/></option>
<c:forEach items="${fns:getDictList('IR_TYPE')}" var="irTypeC">
<option value="${irTypeC.itemCode}" <c:if test="${1==irTypeC.itemCode}">selected</c:if>><spring:message code="${irTypeC.itemValue}"/></option>
</c:forEach>
</select>
</div>
<div for="irType"></div>
</div>
</div>
</div>
<div class="row ratelimit hidden">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ratelimit"/></label>
<div class="col-md-6">
<input class="form-control required number" range="[0,100]" type="text" name="ratelimit" value="${_cfg.ratelimit}">
</div>
<div for="ratelimit"></div>
</div>
</div>
</div>
<%@include file="/WEB-INF/include/form/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>
</div>
</body>
</html>

View File

@@ -0,0 +1,415 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title><spring:message code="dnat_policy"></spring:message></title>
<script>
$(document).ready(function() {
//搜索框提示语初始化
if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){
$("#intype").val("${cfg.compileId}");
}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",'');
$("#level").attr("value",'');
$("#searchForm")[0].reset();
});
});
</script>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<shiro:hasPermission name="dnat_policy:config">
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/manipulation/ipmulitiplex/dnatPolicyForm?functionId=${cfg.functionId}'">
<i class="fa fa-plus"></i>
<spring:message code="add"></spring:message></button>
</shiro:hasPermission>
</div>
<h3 class="page-title">
<spring:message code="dnat_policy"></spring:message>
</h3>
<h5 class="page-header"></h5>
<div class="col-md-12">
<div class="portlet">
<div class="portlet-body">
<div class="row" >
<sys:message content="${message}"/>
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/manipulation/ipmulitiplex/dnatPolicyList?functionId=${cfg.functionId}" method="post" class="form-search">
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
<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}"/>
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
callback="page();" />
<!-- 筛选按钮展开状态-->
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<div class="pull-left">
<c:set var="state"><spring:message code='state'/></c:set>
<form:select path="isAudit" class="selectpicker select2 input-small">
<form:option value=""><spring:message code="all_states"/></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:select>
</div>
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="action"><spring:message code="action"></spring:message></form:option>
<form:option value="isValid"><spring:message code="is_valid"></spring:message></form:option>
</form:select>
</div>
<input id="intype" class="form-control input-medium" type="text" value="">
<div class="input-group-btn">
<form:select id="actionSelect" path="action" class="selectpicker select2 input-small" >
<form:option value=""><spring:message code="select"/></form:option>
<c:forEach items="${serviceList}" var="service">
<form:option value="${service.action }"><spring:message code="action_${service.actionCode }"/></form:option>
</c:forEach>
</form:select>
<form:select path="isValid" class="selectpicker select2 input-small" >
<form:option value=""><spring:message code="select"/></form:option>
<form:option value="1"><spring:message code="yes"/></form:option>
<form:option value="0"><spring:message code="no"/></form:option>
</form:select>
</div>
</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"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
</div>
<div class="pull-right">
<shiro:hasPermission name="dnat_policy:config">
<sys:delRow url="${ctx}/manipulation/ipmulitiplex/dnatPolicyForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/manipulation/ipmulitiplex/dnatDelete?functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
</shiro:hasPermission>
<shiro:hasPermission name="dnat_policy:config">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right">
<li><sys:delRow url="${ctx}/manipulation/ipmulitiplex/auditDnat?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
<li><sys:delRow url="${ctx}/manipulation/ipmulitiplex/auditDnat?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
<li><sys:delRow url="${ctx}/manipulation/ipmulitiplex/auditDnat?isAudit=3&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
</ul>
</div>
</shiro:hasPermission>
<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>
</div>
<!-- /搜索内容与操作按钮栏 -->
<!-- 筛选搜索内容栏默认隐藏-->
<div class="col-md-12 filter-action-select-panle hide" >
<div class="row">
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='letter'/></label>
<c:set var="select"><spring:message code='select'/></c:set>
<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='classification'/></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>
<c:set var="select"><spring:message code='select'/></c:set>
<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>
</div>
<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>
<!-- /筛选搜索内容栏 结束-->
</form:form>
</div>
<div class="table-responsive">
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
<thead>
<tr>
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
<th class="sort-column a.compile_id" style="display: none"><spring:message code="cfg_id"/></th>
<th class="sort-column a.cfg_desc cfgDesc"><spring:message code="config_describe"/></th>
<th class="sort-column a.action"><spring:message code="block_type"/></th>
<%-- <th><spring:message code="do_log"/></th> --%>
<%-- <th><spring:message code="whether_area_block"/></th> --%>
<th><spring:message code="letter"/></th>
<th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th>
<th class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th>
<th><spring:message code="is_audit"/></th>
<th><spring:message code="log_total"/></th>
<th><spring:message code="creator"/></th>
<th class="sort-column a.create_time"><spring:message code="config_time"/></th>
<th><spring:message code="editor"/></th>
<th class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
<th><spring:message code="auditor"/></th>
<th class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
</tr>
</thead>
<tbody>
<c:forEach items="${page.list }" var="indexCfg" varStatus="status" step="1">
<tr>
<td>
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" value="${indexCfg.isAudit}">
</td>
<td>${indexCfg.compileId }</td>
<td>${indexCfg.cfgDesc }</td>
<td>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq indexCfg.action }">
<spring:message code="${dict.itemValue }"/>
</c:if>
</c:forEach>
</td>
<%-- <td>
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
<c:if test="${dict.itemCode eq indexCfg.doLog }">
<spring:message code="${dict.itemValue }"/>
</c:if>
</c:forEach>
</td> --%>
<%-- <td>
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
<c:if test="${indexCfg.isAreaEffective==1}">
<a href="javascript:viewAreaInfo('${ctx}','${indexCfg.areaEffectiveIds }','${indexCfg.compileId }')" >
<spring:message code="selective"/>
</a>
</c:if>
</td> --%>
<td>${indexCfg.requestName }</td>
<td>
<c:set var="classify"></c:set>
<c:forEach items="${fn:split(indexCfg.classify,',')}" var="classifyId" varStatus="status">
<c:forEach items="${fls}" var="fl">
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
<c:if test="${status.index+1 eq 1}">
<c:set var="classify" value="${fl.itemValue}"></c:set>
</c:if>
<c:if test="${status.index+1 ne 1}">
<c:set var="classify" value="${classify},${fl.itemValue}"></c:set>
</c:if>
</c:if>
</c:forEach>
</c:forEach>
<a href="javascript:;" data-original-title="${classify}"
class="tooltips" data-flag="false" data-html="true" data-placement="top">
${fns:abbr(classify,20)}
</a>
</td>
<td>
<c:set var="attribute"></c:set>
<c:forEach items="${fn:split(indexCfg.attribute,',')}" var="attributeId" varStatus="status">
<c:forEach items="${xzs}" var="xz">
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">
<c:if test="${status.index+1 eq 1}">
<c:set var="attribute" value="${xz.itemValue}"></c:set>
</c:if>
<c:if test="${status.index+1 ne 1}">
<c:set var="attribute" value="${attribute},${xz.itemValue}"></c:set>
</c:if>
</c:if>
</c:forEach>
</c:forEach>
<a href="javascript:;" data-original-title="${attribute}"
class="tooltips" data-flag="false" data-html="true" data-placement="top">
${fns:abbr(attribute,20)}
</a>
</td>
<td>
<c:set var="lableInfo"></c:set>
<c:forEach items="${fn:split(indexCfg.lable,',')}" var="lableId" varStatus="status">
<c:forEach items="${lables}" var="lable">
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">
<c:if test="${status.index+1 eq 1}">
<c:set var="lableInfo" value="${lable.itemValue}"></c:set>
</c:if>
<c:if test="${status.index+1 ne 1}">
<c:set var="lableInfo" value="${lableInfo},${lable.itemValue}"></c:set>
</c:if>
</c:if>
</c:forEach>
</c:forEach>
<a href="javascript:;" data-original-title="${lableInfo}"
class="tooltips" data-flag="false" data-html="true" data-placement="top">
${fns:abbr(lableInfo,20)}
</a>
</td>
<td>
<c:if test="${indexCfg.isValid==0}"><spring:message code="no"/></c:if>
<c:if test="${indexCfg.isValid==1}"><spring:message code="yes"/></c:if>
<c:if test="${indexCfg.isValid==-1}"><spring:message code="deleted"/></c:if>
</td>
<td>
<c:choose>
<c:when test="${indexCfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
<c:when test="${indexCfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
<c:when test="${indexCfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
<c:when test="${indexCfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
</c:choose>
</td>
<td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}"><div class="loading-total"></div></td>
<td>${indexCfg.creatorName }</td>
<td><fmt:formatDate value="${indexCfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${indexCfg.editorName }</td>
<td><fmt:formatDate value="${indexCfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${indexCfg.auditorName }</td>
<td><fmt:formatDate value="${indexCfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -20,7 +20,7 @@ $(function(){
$(element).parents(".form-group").find("div[for='"+element.attr("name")+"']").append(error);
},
submitHandler: function(form){
loading('<spring:message code="onloading"/>');
//loading('<spring:message code="onloading"/>');
form.submit();
},
errorContainer: "#messageBox"
@@ -45,7 +45,7 @@ $(function(){
</div>
<div class="portlet-body form">
<!-- BEGIN FORM-->
<form id="ipCfgFrom" action="${ctx}${urlPrefix}/saveOrUpdate" method="post" class="form-horizontal">
<form id="ipCfgFrom" action="${ctx}${urlPrefix}/saveOrUpdateSnat" method="post" class="form-horizontal">
<div class="form-body row">
<input name="cfgName" type="hidden" value="${cfgName}"/>
<input type="hidden" name="cfgId" value="${_cfg.cfgId}">
@@ -90,6 +90,20 @@ $(function(){
</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="group"/></label>
<div class="col-md-6">
<select id="dnsStrategyId" name="dnsStrategyId" class="selectpicker show-tick form-control required">
<option value="" <c:if test="${empty _cfg.dnsStrategyId }">selected</c:if>><spring:message code="select"/></option>
<c:forEach items="${policyGroups }" var="policyGroup">
<option value="${policyGroup.groupId}" <c:if test="${_cfg.dnsStrategyId==policyGroup.groupId }">selected</c:if>><spring:message code="${policyGroup.groupName}"/></option>
</c:forEach>
</select>
</div>
<div for="dnsStrategyId"></div>
</div>
</div>
<c:if test="${fn:length(serviceList)>1}">
<div class="col-md-6">
<div class="form-group">
@@ -142,9 +156,18 @@ $(function(){
<div for="ipType"></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"/></label>
<div class="col-md-6">
<input class="form-control required ipCheck" type="text" name="srcIpAddress" value="${_cfg.srcIpAddress}">
</div>
<div for="srcIpAddress"></div>
</div>
</div>
</div>
<div class="row ip">
<div class="col-md-6">
<div class="col-md-6 hidden">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ip_pattern"/></label>
<div class="col-md-6">
@@ -157,18 +180,10 @@ $(function(){
<div for="ipPattern"></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_ip"/></label>
<div class="col-md-6">
<input class="form-control required ipCheck" type="text" name="srcIpAddress" value="${_cfg.srcIpAddress}">
</div>
<div for="srcIpAddress"></div>
</div>
</div>
</div>
<div class="row hidden port">
<div class="col-md-6">
<div class="col-md-6 hidden">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="port_pattern"/></label>
<div class="col-md-6">
@@ -181,7 +196,7 @@ $(function(){
<div for="portPattern"></div>
</div>
</div>
<div class="col-md-6">
<div class="col-md-6 hidden">
<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">
@@ -211,7 +226,7 @@ $(function(){
</div>
</div>
</div>
<div class="row hidden protocol">
<div class="row hidden protocol ">
<div class="col-md-6">
<div class="form-group ">
<label class="control-label col-md-3"><font color="red">*</font>
@@ -235,7 +250,7 @@ $(function(){
<select name="direction"
class="selectpicker show-tick form-control required">
<c:forEach items="${fns:getDictList('DIRECTION')}" var="directionC">
<option value="${directionC.itemCode}" <c:if test="${_cfg.direction==directionC.itemCode || (_cfg.direction==null && directionC.itemCode==0)}">selected</c:if>><spring:message code="${directionC.itemValue}"/></option>
<option value="${directionC.itemCode}"><spring:message code="${directionC.itemValue}"/></option>
</c:forEach>
</select>
</div>
@@ -243,37 +258,24 @@ $(function(){
</div>
</div>
</div>
<div class="row">
<%-- <div class="row">
<button type="button" class="btn btn-red-hollow center-block"
onClick="more(this);" data-click-times="0">
<spring:message code="show_more" />
</button>
</div>
</div> --%>
<br>
</div>
<div class="row ipmulitiplex">
<div class="col-md-6">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="group"/></label>
<div class="col-md-6">
<select id="dnsStrategyId" name="dnsStrategyId" class="selectpicker show-tick form-control required">
<option value="" <c:if test="${empty _cfg.dnsStrategyId }">selected</c:if>><spring:message code="select"/></option>
<c:forEach items="${policyGroups }" var="policyGroup">
<option value="${policyGroup.groupId}" <c:if test="${_cfg.dnsStrategyId==policyGroup.groupId }">selected</c:if>><spring:message code="${policyGroup.groupName}"/></option>
</c:forEach>
</select>
</div>
<div for="dnsStrategyId"></div>
</div>
</div>
<div class="col-md-6">
<div class="col-md-6 hidden">
<div class="form-group">
<label class="control-label col-md-3"><font color="red">*</font><spring:message code="ir_type"/></label>
<div class="col-md-6">
<select name="irType" class="selectpicker show-tick form-control required">
<option value=""><spring:message code="select"/></option>
<c:forEach items="${fns:getDictList('IR_TYPE')}" var="irTypeC">
<option value="${irTypeC.itemCode}" <c:if test="${_cfg.irType==irTypeC.itemCode}">selected</c:if>><spring:message code="${irTypeC.itemValue}"/></option>
<option value="${irTypeC.itemCode}" <c:if test="${0==irTypeC.itemCode}">selected</c:if>><spring:message code="${irTypeC.itemValue}"/></option>
</c:forEach>
</select>
</div>
@@ -315,5 +317,6 @@ $(function(){
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1,415 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title><spring:message code="snat_policy"></spring:message></title>
<script>
$(document).ready(function() {
//搜索框提示语初始化
if("${cfg.cfgDesc}"){
$("#intype").val("${cfg.cfgDesc}");
}else if("${cfg.compileId}"){
$("#intype").val("${cfg.compileId}");
}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",'');
$("#level").attr("value",'');
$("#searchForm")[0].reset();
});
});
</script>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<shiro:hasPermission name="snat_policy:config">
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/manipulation/ipmulitiplex/snatPolicyForm?functionId=${cfg.functionId}'">
<i class="fa fa-plus"></i>
<spring:message code="add"></spring:message></button>
</shiro:hasPermission>
</div>
<h3 class="page-title">
<spring:message code="snat_policy"></spring:message>
</h3>
<h5 class="page-header"></h5>
<div class="col-md-12">
<div class="portlet">
<div class="portlet-body">
<div class="row" >
<sys:message content="${message}"/>
<form:form id="searchForm" modelAttribute="cfg" action="${ctx}/manipulation/ipmulitiplex/snatPolicyList?functionId=${cfg.functionId}" method="post" class="form-search">
<input id="functionId" name="functionId" type="hidden" value="${cfg.functionId}"/>
<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}"/>
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}"
callback="page();" />
<!-- 筛选按钮展开状态-->
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${cfg.isFilterAction }"/>
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<div class="pull-left">
<c:set var="state"><spring:message code='state'/></c:set>
<form:select path="isAudit" class="selectpicker select2 input-small">
<form:option value=""><spring:message code="all_states"/></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:select>
</div>
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<form:select path="seltype" class="selectpicker select2 input-small" >
<form:option value="cfgDesc"><spring:message code="config_describe"></spring:message></form:option>
<form:option value="compileId"><spring:message code="cfg_id"></spring:message></form:option>
<form:option value="action"><spring:message code="action"></spring:message></form:option>
<form:option value="isValid"><spring:message code="is_valid"></spring:message></form:option>
</form:select>
</div>
<input id="intype" class="form-control input-medium" type="text" value="">
<div class="input-group-btn">
<form:select id="actionSelect" path="action" class="selectpicker select2 input-small" >
<form:option value=""><spring:message code="select"/></form:option>
<c:forEach items="${serviceList}" var="service">
<form:option value="${service.action }"><spring:message code="action_${service.actionCode }"/></form:option>
</c:forEach>
</form:select>
<form:select path="isValid" class="selectpicker select2 input-small" >
<form:option value=""><spring:message code="select"/></form:option>
<form:option value="1"><spring:message code="yes"/></form:option>
<form:option value="0"><spring:message code="no"/></form:option>
</form:select>
</div>
</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"> <spring:message code="filter"/> <i class="fa fa-angle-double-down"></i></button>
</div>
<div class="pull-right">
<shiro:hasPermission name="snat_policy:config">
<sys:delRow url="${ctx}/manipulation/ipmulitiplex/snatPolicyForm" id="contentTable" label="update"></sys:delRow>
<sys:delRow url="${ctx}/manipulation/ipmulitiplex/snatDelete?functionId=${cfg.functionId }" id="contentTable" label="delete"></sys:delRow>
</shiro:hasPermission>
<shiro:hasPermission name="snat_policy:config">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-wrench"></i> <spring:message code="examine"></spring:message>
<i class="fa fa-angle-down"></i>
</button>
<ul class="dropdown-menu pull-right">
<li><sys:delRow url="${ctx}/manipulation/ipmulitiplex/auditSnat?isAudit=1&isValid=1&functionId=${cfg.functionId }" id="contentTable" label="approved"></sys:delRow></li>
<li><sys:delRow url="${ctx}/manipulation/ipmulitiplex/auditSnat?isAudit=2&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="unapproved"></sys:delRow></li>
<li><sys:delRow url="${ctx}/manipulation/ipmulitiplex/auditSnat?isAudit=3&isValid=0&functionId=${cfg.functionId }" id="contentTable" label="cancelPass"></sys:delRow></li>
</ul>
</div>
</shiro:hasPermission>
<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>
</div>
<!-- /搜索内容与操作按钮栏 -->
<!-- 筛选搜索内容栏默认隐藏-->
<div class="col-md-12 filter-action-select-panle hide" >
<div class="row">
<div class="col-md-3">
<div class="form-group">
<label class="control-label"><spring:message code='letter'/></label>
<c:set var="select"><spring:message code='select'/></c:set>
<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='classification'/></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>
<c:set var="select"><spring:message code='select'/></c:set>
<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>
</div>
<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>
<!-- /筛选搜索内容栏 结束-->
</form:form>
</div>
<div class="table-responsive">
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
<thead>
<tr>
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
<th class="sort-column a.compile_id" style="display: none"><spring:message code="cfg_id"/></th>
<th class="sort-column a.cfg_desc cfgDesc"><spring:message code="config_describe"/></th>
<th class="sort-column a.action"><spring:message code="block_type"/></th>
<%-- <th><spring:message code="do_log"/></th> --%>
<%-- <th><spring:message code="whether_area_block"/></th> --%>
<th><spring:message code="letter"/></th>
<th><spring:message code="classification"/></th>
<th><spring:message code="attribute"/></th>
<th><spring:message code="label"/></th>
<th class="sort-column a.is_valid"><spring:message code="valid_identifier"/></th>
<th><spring:message code="is_audit"/></th>
<th><spring:message code="log_total"/></th>
<th><spring:message code="creator"/></th>
<th class="sort-column a.create_time"><spring:message code="config_time"/></th>
<th><spring:message code="editor"/></th>
<th class="sort-column a.edit_time"><spring:message code="edit_time"/></th>
<th><spring:message code="auditor"/></th>
<th class="sort-column a.audit_time"><spring:message code="audit_time"/></th>
</tr>
</thead>
<tbody>
<c:forEach items="${page.list }" var="indexCfg" varStatus="status" step="1">
<tr>
<td>
<input type="checkbox" class="i-checks child-checks" id="${indexCfg.cfgId}" value="${indexCfg.isAudit}">
</td>
<td>${indexCfg.compileId }</td>
<td>${indexCfg.cfgDesc }</td>
<td>
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
<c:if test="${dict.itemCode eq indexCfg.action }">
<spring:message code="${dict.itemValue }"/>
</c:if>
</c:forEach>
</td>
<%-- <td>
<c:forEach items="${fns:getDictList('DO_LOG') }" var="dict">
<c:if test="${dict.itemCode eq indexCfg.doLog }">
<spring:message code="${dict.itemValue }"/>
</c:if>
</c:forEach>
</td> --%>
<%-- <td>
<c:if test="${indexCfg.isAreaEffective==0}"><spring:message code="all"/></c:if>
<c:if test="${indexCfg.isAreaEffective==1}">
<a href="javascript:viewAreaInfo('${ctx}','${indexCfg.areaEffectiveIds }','${indexCfg.compileId }')" >
<spring:message code="selective"/>
</a>
</c:if>
</td> --%>
<td>${indexCfg.requestName }</td>
<td>
<c:set var="classify"></c:set>
<c:forEach items="${fn:split(indexCfg.classify,',')}" var="classifyId" varStatus="status">
<c:forEach items="${fls}" var="fl">
<c:if test="${classifyId eq fn:trim(fl.serviceDictId)}">
<c:if test="${status.index+1 eq 1}">
<c:set var="classify" value="${fl.itemValue}"></c:set>
</c:if>
<c:if test="${status.index+1 ne 1}">
<c:set var="classify" value="${classify},${fl.itemValue}"></c:set>
</c:if>
</c:if>
</c:forEach>
</c:forEach>
<a href="javascript:;" data-original-title="${classify}"
class="tooltips" data-flag="false" data-html="true" data-placement="top">
${fns:abbr(classify,20)}
</a>
</td>
<td>
<c:set var="attribute"></c:set>
<c:forEach items="${fn:split(indexCfg.attribute,',')}" var="attributeId" varStatus="status">
<c:forEach items="${xzs}" var="xz">
<c:if test="${attributeId eq fn:trim(xz.serviceDictId)}">
<c:if test="${status.index+1 eq 1}">
<c:set var="attribute" value="${xz.itemValue}"></c:set>
</c:if>
<c:if test="${status.index+1 ne 1}">
<c:set var="attribute" value="${attribute},${xz.itemValue}"></c:set>
</c:if>
</c:if>
</c:forEach>
</c:forEach>
<a href="javascript:;" data-original-title="${attribute}"
class="tooltips" data-flag="false" data-html="true" data-placement="top">
${fns:abbr(attribute,20)}
</a>
</td>
<td>
<c:set var="lableInfo"></c:set>
<c:forEach items="${fn:split(indexCfg.lable,',')}" var="lableId" varStatus="status">
<c:forEach items="${lables}" var="lable">
<c:if test="${lableId eq fn:trim(lable.serviceDictId)}">
<c:if test="${status.index+1 eq 1}">
<c:set var="lableInfo" value="${lable.itemValue}"></c:set>
</c:if>
<c:if test="${status.index+1 ne 1}">
<c:set var="lableInfo" value="${lableInfo},${lable.itemValue}"></c:set>
</c:if>
</c:if>
</c:forEach>
</c:forEach>
<a href="javascript:;" data-original-title="${lableInfo}"
class="tooltips" data-flag="false" data-html="true" data-placement="top">
${fns:abbr(lableInfo,20)}
</a>
</td>
<td>
<c:if test="${indexCfg.isValid==0}"><spring:message code="no"/></c:if>
<c:if test="${indexCfg.isValid==1}"><spring:message code="yes"/></c:if>
<c:if test="${indexCfg.isValid==-1}"><spring:message code="deleted"/></c:if>
</td>
<td>
<c:choose>
<c:when test="${indexCfg.isAudit eq '0'}"><span class="label label-danger"><spring:message code="created"></spring:message></span></c:when>
<c:when test="${indexCfg.isAudit eq '1'}"><span class="label label-success"><spring:message code="approved"></spring:message></span></c:when>
<c:when test="${indexCfg.isAudit eq '2'}"><span class="label label-warning"><spring:message code="unapproved"></spring:message></span></c:when>
<c:when test="${indexCfg.isAudit eq '3'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:when>
</c:choose>
</td>
<td audit="${indexCfg.isAudit}" functionId="${indexCfg.functionId}" compileId="${indexCfg.compileId}" action="${indexCfg.action}"><div class="loading-total"></div></td>
<td>${indexCfg.creatorName }</td>
<td><fmt:formatDate value="${indexCfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${indexCfg.editorName }</td>
<td><fmt:formatDate value="${indexCfg.editTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${indexCfg.auditorName }</td>
<td><fmt:formatDate value="${indexCfg.auditTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>