提交一版日志的action查询和展示

This commit is contained in:
chenjinsong
2018-06-14 10:37:59 +08:00
parent 7334247f5b
commit 30c6d43130
4 changed files with 110 additions and 46 deletions

View File

@@ -2,7 +2,12 @@
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title>IP<spring:message code="log"></spring:message></title>
<title>
<c:if test="${log.functionId eq 5 }">IP</c:if>
<c:if test="${log.functionId eq 7 }">DNS</c:if>
<c:if test="${log.functionId eq 8 }">HTTP</c:if>
<spring:message code="log"></spring:message>
</title>
<script>
$(document).ready(function() {
//reset
@@ -26,7 +31,10 @@
<div class="theme-panel hidden-xs hidden-sm">
</div>
<h3 class="page-title">
IP<spring:message code="log"></spring:message>
<c:if test="${log.functionId eq 5 }">IP</c:if>
<c:if test="${log.functionId eq 7 }">DNS</c:if>
<c:if test="${log.functionId eq 8 }">HTTP</c:if>
<spring:message code="log"></spring:message>
<small><spring:message code="date_list"/></small>
</h3>
<h5 class="page-header"></h5>
@@ -35,7 +43,16 @@
<div class="portlet">
<div class="portlet-body">
<div class="row" >
<form:form id="searchForm" modelAttribute="log" action="${ctx}/log/ntc/ip/list" method="post" class="form-search">
<c:if test="${log.functionId eq 5 }">
<c:set var="function" value="ip"/>
</c:if>
<c:if test="${log.functionId eq 7 }">
<c:set var="function" value="dns"/>
</c:if>
<c:if test="${log.functionId eq 8 }">
<c:set var="function" value="http"/>
</c:if>
<form:form id="searchForm" modelAttribute="log" action="${ctx}/log/ntc/${function}/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="functionId" name="functionId" type="hidden" value="${log.functionId}"/>
@@ -54,9 +71,8 @@
<div class="pull-left">
<form:select path="serviceType" class="selectpicker select2 input-small">
<form:option value=""><spring:message code="action"/></form:option>
<c:forEach items="${serviceList}" var="service">
<form:option value="${service.serviceId}" ><spring:message code="${service.actionCode}"/></form:option>
</c:forEach>
<form:option value="16"><spring:message code="action_reject"/></form:option>
<form:option value="1"><spring:message code="action_monit"/></form:option>
</form:select>
</div>
<div class="pull-left">
@@ -94,8 +110,8 @@
</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>
data-container="body" data-placement="top" data-original-title=<spring:message code="custom_columns"/> href="javascript:;">
<i class="icon-wrench"></i>
</a>
</div>
</div>
@@ -126,12 +142,22 @@
<input name="clientIp" type="text" class="form-control" value="${log.clientIp }"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="serverip"></spring:message></label>
<input name="serverIp" type="text" class="form-control" value="${log.serverIp }"/>
</div>
</div>
<c:if test="${log.functionId eq 8 }">
<div class="col-md-4">
<div class="form-group">
<label>URL</label>
<input name="url" type="text" class="form-control" value="${log.url }"/>
</div>
</div>
</c:if>
</div>
</div>
<!-- /筛选搜索内容栏 结束-->
@@ -142,9 +168,11 @@
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
<thead>
<tr>
<th></th>
<!--<th><input type="checkbox" class="i-checks" id="checkAll"></th>-->
<th><spring:message code='cfg_id'/></th>
<th>ip<spring:message code="type"/></th>
<th><spring:message code="action"/></th>
<th><spring:message code="client_ip"/></th>
<th><spring:message code="client_port"/></th>
<th><spring:message code="server_ip"/></th>
@@ -152,6 +180,9 @@
<th><spring:message code="protocol"/></th>
<th><spring:message code="entrance_id"/></th>
<th><spring:message code="direction"/></th>
<c:if test="${log.functionId eq 8 }">
<th>URL</th>
</c:if>
<th><spring:message code="found_time"/></th>
<th><spring:message code="recv_time"/></th>
<th><spring:message code="device_id"/></th>
@@ -160,40 +191,48 @@
<th><spring:message code="nest_addr_list"/></th>
<th><spring:message code="user_region"/></th>
</tr>
<c:forEach var="log" items="${page.list }">
<c:forEach var="_log" items="${page.list }">
<tr>
<td>${log.cfgId }</td>
<td></td>
<td>${_log.cfgId }</td>
<td>
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="ipType">
<c:if test="${ipType.itemCode==log.addrType}">${ipType.itemValue}</c:if>
<c:if test="${ipType.itemCode eq _log.addrType}">${ipType.itemValue}</c:if>
</c:forEach>
</td>
<td>${log.clientIp }</td>
<td>${log.clientPort }</td>
<td>${log.serverIp }</td>
<td>${log.serverPort }</td>
<td>
<c:if test="${_log.action eq 16 }"><spring:message code="action_reject"/></c:if>
<c:if test="${_log.action eq 1 }"><spring:message code="action_monit"/></c:if>
</td>
<td>${_log.clientIp }</td>
<td>${_log.clientPort }</td>
<td>${_log.serverIp }</td>
<td>${_log.serverPort }</td>
<td>
<c:forEach items="${fns:getDictList('LOG_PROTOCOL')}" var="logProtocol">
<c:if test="${logProtocol.itemCode == log.protocol}">${logProtocol.itemValue}</c:if>
<c:if test="${logProtocol.itemCode eq _log.protocol}">${logProtocol.itemValue}</c:if>
</c:forEach>
</td>
<td>${log.entranceId }</td>
<td>${_log.entranceId }</td>
<td>
<c:forEach items="${fns:getDictList('DIRECTION')}" var="direction">
<c:if test="${direction.itemCode == log.direction}"><spring:message code="${direction.itemValue}"/></c:if>
<c:if test="${direction.itemCode eq _log.direction}"><spring:message code="${direction.itemValue}"/></c:if>
</c:forEach>
</td>
<td>${log.foundTime }</td>
<td>${log.recvTime }</td>
<td>${log.deviceId }</td>
<c:if test="${log.functionId eq 8 }">
<td title="${_log.url }">${fns:abbr(_log.url, 20)}</td>
</c:if>
<td>${_log.foundTime }</td>
<td>${_log.recvTime }</td>
<td>${_log.deviceId }</td>
<td>
<c:forEach items="${fns:getDictList('LOG_STREAM_TYPE')}" var="streamType">
<c:if test="${streamType.itemCode == log.streamType}">${streamType.itemValue}</c:if>
<c:if test="${streamType.itemCode eq _log.streamType}">${streamType.itemValue}</c:if>
</c:forEach>
</td>
<td>${log.cljIp }</td>
<td>${log.nestAddrList }</td>
<td>${log.userRegion }</td>
<td>${_log.cljIp }</td>
<td>${_log.nestAddrList }</td>
<td>${_log.userRegion }</td>
</tr>
</c:forEach>
</thead>