日志管理界面优化及国际化添加

This commit is contained in:
leijun
2018-10-12 20:05:32 +08:00
parent 5f671e9409
commit c91086c2d1
3 changed files with 152 additions and 54 deletions

View File

@@ -1227,4 +1227,13 @@ traffic_ipactive_hour_max=Active IPTOP10 Maximum In Nearly One Hour
ip_addr=IP
area_id=Area
link_num=Link Number
stat_time=Statistical Time
stat_time=Statistical Time
log_menu=Operation Menu
log_management=Log Management
log_date=Date Range
log_exception=Query Exception
log_user=Operating User
log_submission=Submission
log_ip=Operator IP
log_exception_info=Exception Information
system_log=Log Management

View File

@@ -1221,4 +1221,12 @@ traffic_ipactive_hour_max=\u6D3B\u8DC3IPTOP10\u8FD1\u4E00\u5C0F\u65F6\u5185\u670
ip_addr=IP\u5730\u5740
area_id=\u5730\u57DF
link_num=\u8FDE\u63A5\u6B21\u6570
stat_time=\u7EDF\u8BA1\u65F6\u95F4
stat_time=\u7EDF\u8BA1\u65F6\u95F4
log_menu=\u64CD\u4F5C\u83DC\u5355
system_log=\u65E5\u5FD7\u7BA1\u7406
log_date=\u65E5\u671F\u8303\u56F4
log_exception=\u53EA\u67E5\u8BE2\u5F02\u5E38\u4FE1\u606F
log_user=\u64CD\u4F5C\u7528\u6237
log_submission=\u63D0\u4EA4\u65B9\u5F0F
log_ip=\u64CD\u4F5C\u8005IP
log_exception_info=\u5F02\u5E38\u4FE1\u606F

View File

@@ -1,60 +1,141 @@
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<title>日志管理</title>
<script type="text/javascript">
function page(n,s){
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").submit();
return false;
}
</script>
<title>日志管理</title>
<script type="text/javascript">
function page(n, s) {
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").submit();
return false;
}
</script>
</head>
<body>
<!-- <ul class="nav nav-tabs"> -->
<%-- <li class="active"><a href="${ctx}/sys/log/">日志列表</a></li> --%>
<!-- </ul> -->
<form:form id="searchForm" action="${ctx}/sys/log" method="post" class="breadcrumb form-search">
<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
<div>
<label>操作菜单:</label><input id="title" name="title" type="text" maxlength="50" class="input-mini" value="${sysLog.title}"/>
<label>用户:</label><input id="createBy" name="createBy" type="text" maxlength="50" class="input-mini" value="${sysLog.createBy}"/>
<label>URI</label><input id="requestUri" name="requestUri" type="text" maxlength="50" class="input-mini" value="${sysLog.requestUri}"/>
</div><div style="margin-top:8px;">
<label>日期范围:&nbsp;</label><input id="beginDate" name="beginDate" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate"
value="<fmt:formatDate value="${sysLog.beginDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
<label>&nbsp;--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label><input id="endDate" name="endDate" type="text" readonly="readonly" maxlength="20" class="input-mini Wdate"
value="<fmt:formatDate value="${sysLog.endDate}" pattern="yyyy-MM-dd"/>" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>&nbsp;&nbsp;
&nbsp;<label for="exception"><input id="exception" name="exception" type="checkbox"${sysLog.exception eq '1'?' checked':''} value="1"/>只查询异常信息</label>
&nbsp;&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>&nbsp;&nbsp;
<%-- <ul class="nav nav-tabs">
<li class="active"><a href="${ctx}/sys/log/">日志列表</a></li>
</ul> --%>
<div class="page-content">
<h3 class="page-title">
<spring:message code="system_log"></spring:message>
</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" action="${ctx}/sys/log" method="post"
class="breadcrumb form-search" style="background-color:#fff">
<input id="pageNo" name="pageNo" type="hidden"
value="${page.pageNo}" />
<input id="pageSize" name="pageSize" type="hidden"
value="${page.pageSize}" />
<div class="col-md-12 filter-action-select-panle"
style="background-color: transparent">
<div class="row">
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="log_menu" /></label> <input
id="title" name="title" type="text" maxlength="50"
class="form-control" value="${sysLog.title}" />
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="user" /></label> <input
id="createBy" name="createBy" type="text" maxlength="50"
class="form-control" value="${sysLog.createBy}" />
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="URL" /></label> <input
id="requestUri" name="requestUri" type="text"
maxlength="50" class="form-control"
value="${sysLog.requestUri}" />
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="log_date" /></label> <input
id="beginDate" name="beginDate" type="text"
readonly="readonly" maxlength="20"
class="form-control Wdate"
value="<fmt:formatDate value="${sysLog.beginDate}" pattern="yyyy-MM-dd"/>"
onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});" />
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="" />&nbsp;</label> <input
id="endDate" name="endDate" type="text" readonly="readonly"
maxlength="20" class="form-control Wdate"
value="<fmt:formatDate value="${sysLog.endDate}" pattern="yyyy-MM-dd"/>"
onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});" />
</div>
</div>
<div class="col-md-1">
<div class="form-group">
<label for="exception"><input id="exception"
name="exception" type="checkbox"
${sysLog.exception eq '1'?' checked':''} value="1" /><spring:message code="log_exception" /></label>
<button type="submit" class="btn blue form-control"><i class="fa fa-search"></i><spring:message code="search" /></button>
</div>
</div>
</div>
</div>
</form:form>
</div>
<sys:message content="${message}" />
<div class="table-responsive">
<table id="contentTable1"
class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th><spring:message code="log_menu" /></th>
<th><spring:message code="log_user" /></th>
<th><spring:message code="URL" /></th>
<th><spring:message code="log_submission" /></th>
<th><spring:message code="log_ip" /></th>
<th><spring:message code="operate_time" /></th>
</thead>
<tbody>
<%
request.setAttribute("strEnter", "\n");
request.setAttribute("strTab", "\t");
%>
<c:forEach items="${page.list}" var="log">
<tr>
<td>${log.title}</td>
<td>${log.createBy}</td>
<td><strong>${log.requestUri}</strong></td>
<td>${log.method}</td>
<td>${log.remoteAddr}</td>
<td><fmt:formatDate value="${log.createDate}"
type="both" /></td>
</tr>
<c:if test="${not empty log.exception}">
<tr>
<td colspan="8"
style="word-wrap: break-word; word-break: break-all;">
<%-- 用户代理: ${log.userAgent}<br/> --%> <%-- 提交参数: ${fns:escapeHtml(log.params)} <br/> --%>
<spring:message code="log_exception_info" /><br />
${fn:replace(fn:replace(fns:escapeHtml(log.exception), strEnter, '<br/>'), strTab, '&nbsp; &nbsp; ')}
</td>
</tr>
</c:if>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
</div>
</div>
</form:form>
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
<thead><tr><th>操作菜单</th><th>操作用户</th><th>URI</th><th>提交方式</th><th>操作者IP</th><th>操作时间</th></thead>
<tbody><%request.setAttribute("strEnter", "\n");request.setAttribute("strTab", "\t");%>
<c:forEach items="${page.list}" var="log">
<tr>
<td>${log.title}</td>
<td>${log.createBy}</td>
<td><strong>${log.requestUri}</strong></td>
<td>${log.method}</td>
<td>${log.remoteAddr}</td>
<td><fmt:formatDate value="${log.createDate}" type="both"/></td>
</tr>
<c:if test="${not empty log.exception}"><tr>
<td colspan="8" style="word-wrap:break-word;word-break:break-all;">
<%-- 用户代理: ${log.userAgent}<br/> --%>
<%-- 提交参数: ${fns:escapeHtml(log.params)} <br/> --%>
异常信息: <br/>
${fn:replace(fn:replace(fns:escapeHtml(log.exception), strEnter, '<br/>'), strTab, '&nbsp; &nbsp; ')}</td>
</tr></c:if>
</c:forEach>
</tbody>
</table>
<div class="pagination">${page}</div>
</div>
</body>
</html>