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

316 lines
14 KiB
Plaintext
Raw Normal View History

2018-03-17 17:09:19 +08:00
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title><spring:message code="agreement_ip_configuration" /></title>
2018-03-17 17:09:19 +08:00
<script>
$(document).ready(function() {
//筛选功能初始化
filterActionInit();
$("#isAudit").change(function(){
page();
});
$("#direction").change(function(){
page();
});
$("#protocol").change(function(){
page();
});
$("#ipType").change(function(){
page();
});
$("#ipType").change(function(){
page();
});
2018-03-17 17:09:19 +08:00
//全选及取消
$("#checkAll").change(function(){
if($("#checkAll").prop("checked")){
$("input.i-checks").prop("checked",true);
}else{
$("input.i-checks").prop("checked",false);
}
});
});
function resetx(){
$(':input','#searchForm')
.not(':button,:submit,:reset,:hidden')
.val('')
.removeAttr('checked')
.removeAttr('selected');
$("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);
});
$("#specServiceId").attr("value","");
$("#srcIp").attr("value","");
$("#dstIp").attr("value","");
}
//修改
function cmdEdit(){
var cked = $("tbody tr td input[name='check']:checkbox:checked");
if(cked.length<1){
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
}
if(cked.length>1){
top.$.jBox.tip("<spring:message code='check_one'/>", "<spring:message code='info'/>");
}
if(cked.length==1){
var url=arguments[0];
confirmx("<spring:message code='confirm_message'/>", url+"?hostId="+cked.val());
}
2018-03-17 17:09:19 +08:00
}
//删除
function delAll(){
var mulitId="";
jQuery("#contentTable").find(":checkbox:checked[name='check']").each(function(){
if(jQuery(this).val()!=""){
mulitId+=jQuery(this).val()+",";
}
});
if(mulitId!=""){
confirmx("<spring:message code='confirm_message'/>", '${ctx}/specific/specificServiceHostCfg/delete?mulitId='+mulitId);
2018-03-17 17:09:19 +08:00
}else{
top.$.jBox.tip("<spring:message code='one_more'/>", "<spring:message code='info'/>");
2018-03-17 17:09:19 +08:00
}
}
//查询
function page(n,s){
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/specific/specificServiceHostCfg/list");
$("#searchForm").submit();
return false;
}
</script>
</head>
<body>
<div class="page-content">
<div class="theme-panel hidden-xs hidden-sm">
<%-- <button type="button" class="btn btn-default" onclick="javascript:window.location='${ctx}/specific/specificServiceHostCfg/list'"><spring:message code="refresh"></spring:message></button> --%>
<shiro:hasPermission name="specific:serviceIp:edit">
2018-03-17 17:09:19 +08:00
<button type="button" class="btn btn-primary"
onClick="javascript:window.location='${ctx}/specific/specificServiceHostCfg/form'">
<i class="fa fa-plus"></i>
<spring:message code="add"/></button>
</shiro:hasPermission>
2018-03-17 17:09:19 +08:00
</div>
<h3 class="page-title">
<spring:message code="agreement_ip_configuration" />
2018-03-17 17:09:19 +08:00
<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="specificServiceHostCfg" action="${ctx}/specific/specificServiceHostCfg/list" method="post" class="form-search">
<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="${specificServiceHostCfg.isFilterAction }"/>
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
2018-03-17 17:09:19 +08:00
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<div class="pull-left">
<c:set var="spec_service_id"><spring:message code="protocol_name"/></c:set>
<form:select path="specServiceId" class="selectpicker select2 input-small" title="${spec_service_id}" data-live-search="true" data-live-search-placeholder="search" onchange="page()">
<c:forEach items="${listSpecService}" var="specService" >
<form:option value="${specService.specServiceId}">${specService.specServiceName}</form:option>
2018-03-17 17:09:19 +08:00
</c:forEach>
</form:select>
</div>
<div class="pull-left" style="margin-right:0px;">
<form:select path="ipType" class="selectpicker select2 input-small" >
<form:option value=""><spring:message code="ip_type"/></form:option>
<c:forEach items="${fns:getDictList('SPEC_IP_TYPE')}" var="dict">
<form:option value="${dict.itemCode}"><spring:message code="${dict.itemValue}"/></form:option>
</c:forEach>
</form:select>
2018-03-17 17:09:19 +08:00
</div>
<div class="pull-left">
<c:set var = "condition_srcIp"><spring:message code="client_ip" /></c:set>
<form:input path="srcIp" placeholder="${condition_srcIp}" class="form-control input-small"/>
2018-03-17 17:09:19 +08:00
</div>
<div class="pull-left">
<c:set var = "condition_dstIp"><spring:message code="server_ip" /></c:set>
<form:input path="dstIp" placeholder="${condition_dstIp}" class="form-control input-small"/>
2018-03-17 17:09:19 +08:00
</div>
<div class="pull-left" style="margin-right:0px;">
<form:select path="protocol" class="selectpicker select2 input-small" >
<form:option value=""><spring:message code="protocol"/></form:option>
2018-03-17 17:09:19 +08:00
<c:forEach items="${fns:getDictList('SPEC_PROTOCOL')}" var="dict">
<form:option value="${dict.itemCode}"><spring:message code="${dict.itemValue}"/></form:option>
2018-03-17 17:09:19 +08:00
</c:forEach>
</form:select>
</div>
<div class="pull-left">
<button type="button" class="btn blue" onClick="page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
<button type="button" class="btn btn-default" onClick="resetx()"> <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"></spring:message> <i class="fa fa-angle-double-down"></i></button>
2018-03-17 17:09:19 +08:00
</div>
<div class="pull-right">
<shiro:hasPermission name="specific:serviceIp:edit">
<button type="button" class="btn btn-default" onclick="cmdEdit('${ctx}/specific/specificServiceHostCfg/form')">
2018-03-17 17:09:19 +08:00
<i class="fa fa-edit"></i> <spring:message code="edit"></spring:message></button>
<button type="button" class="btn btn-default" onclick="delAll()">
<i class="fa fa-trash"></i><spring:message code="delete"/></button>
</shiro:hasPermission>
2018-03-17 17:09:19 +08:00
<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:;">
2018-03-17 17:09:19 +08:00
<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-2">
<div class="form-group">
<label><spring:message code="config_time"/></label>
<input name="beginDate" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value='${specificServiceHostCfg.beginDate}' pattern='yyyy-MM-dd HH:mm:ss'/>" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
2018-03-17 17:09:19 +08:00
</div>
<div class="col-md-2">
<div class="form-group">
<label>&nbsp;</label>
<input name="endDate" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${specificServiceHostCfg.endDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
2018-03-17 17:09:19 +08:00
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="edit_time"/></label>
<input name="editBeginDate" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
2018-03-17 17:09:19 +08:00
value="<fmt:formatDate value="${specificServiceHostCfg.editBeginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
2018-03-17 17:09:19 +08:00
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label>&nbsp;</label>
<input name="editEndDate" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
2018-03-17 17:09:19 +08:00
value="<fmt:formatDate value="${specificServiceHostCfg.editEndDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
2018-03-17 17:09:19 +08:00
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="audit_time"/></label>
<input name="auditBeginDate" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
2018-03-17 17:09:19 +08:00
value="<fmt:formatDate value="${specificServiceHostCfg.auditBeginDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
2018-03-17 17:09:19 +08:00
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label>&nbsp;</label>
<input name="auditEndDate" type="text" readonly="readonly" maxlength="20" class="form-control Wdate"
2018-03-17 17:09:19 +08:00
value="<fmt:formatDate value="${specificServiceHostCfg.auditEndDate}" pattern="yyyy-MM-dd HH:mm:ss"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
2018-03-17 17:09:19 +08:00
</div>
</div>
</div>
2018-03-17 17:09:19 +08:00
</div>
<!-- /筛选搜索内容栏 结束-->
</form:form>
</div>
<div class="table-responsive">
2018-03-17 17:09:19 +08:00
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
2018-03-17 17:09:19 +08:00
<thead>
<tr>
<th><input type="checkbox" class="i-checks" id="checkAll"></th>
<th><spring:message code="protocol_name" /></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>
<th><spring:message code="is_audit" /></th>
<th><spring:message code="creator" /></th>
<th class="sort-column create_time"><spring:message code="config_time" /></th>
<th><spring:message code="editor" /></th>
<th class="sort-column edit_time"><spring:message code="edit_time" /></th>
<th isVisible="false"><spring:message code="auditor" /></th>
<th isVisible="false" class="sort-column audit_time"><spring:message code="audit_time" /></th>
2018-03-17 17:09:19 +08:00
</tr>
</thead>
<tbody>
<c:forEach items="${page.list}" var="specificServiceHostCfg">
<tr>
<td><input type="checkbox" class="i-checks" name="check" id="${specificServiceHostCfg.hostId}" value="${specificServiceHostCfg.hostId}"></td>
<td>${fns:getBySpecServiceId(specificServiceHostCfg.specServiceId).specServiceName }</td>
<td title="${specificServiceHostCfg.srcIp}">${fns:abbr(specificServiceHostCfg.srcIp,15)}</td>
<td title="${specificServiceHostCfg.srcIpMask}">${fns:abbr(specificServiceHostCfg.srcIpMask,15) }</td>
<td>${specificServiceHostCfg.srcPort}</td>
<td>${specificServiceHostCfg.srcPortMask}</td>
<td title="${specificServiceHostCfg.dstIp}">${fns:abbr(specificServiceHostCfg.dstIp,15) }</td>
<td title="${specificServiceHostCfg.dstIpMask}">${fns:abbr(specificServiceHostCfg.dstIpMask,15) }</td>
2018-03-17 17:09:19 +08:00
<td>${specificServiceHostCfg.dstPort }</td>
<td>${specificServiceHostCfg.dstPortMask }</td>
<td><spring:message code='${fns:getDictLabel("SPEC_DIRECTION",specificServiceHostCfg.direction,"0")}' /></td>
<td><spring:message code='${fns:getDictLabel("SPEC_PROTOCOL",specificServiceHostCfg.protocol,"0")}' /></td>
<td><spring:message code='${fns:getDictLabel("SPEC_AUDIT",specificServiceHostCfg.isAudit,"0")}' /></td>
2018-03-17 17:09:19 +08:00
<td>${fns:getUserById(specificServiceHostCfg.creator.id).name}</td>
<td><fmt:formatDate value="${specificServiceHostCfg.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${fns:getUserById(specificServiceHostCfg.editor.id).name}</td>
<td><fmt:formatDate value="${specificServiceHostCfg.editTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
<td>${fns:getUserById(specificServiceHostCfg.auditor.id==null?0:specificServiceHostCfg.auditor.id).name}</td>
<td><fmt:formatDate value="${specificServiceHostCfg.auditTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
2018-03-17 17:09:19 +08:00
</div>
</div>
</div>
</div>
</body>
</html>