修改日志openvpn页面搜索栏显示,增加日志ssh,ipsec列表展示

This commit is contained in:
zhanghongqing
2018-06-14 15:40:58 +08:00
parent 30c6d43130
commit 45fc0f8cf1
9 changed files with 1315 additions and 651 deletions

View File

@@ -0,0 +1,79 @@
package com.nis.web.controller.log.ntc;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.client.ClientProtocolException;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import com.nis.domain.Page;
import com.nis.domain.log.NtcIpsecLog;
import com.nis.domain.log.NtcIpsecLog;
import com.nis.domain.maat.LogRecvData;
import com.nis.util.Constants;
import com.nis.util.httpclient.HttpClientUtil;
import com.nis.web.controller.BaseController;
@Controller
@RequestMapping(value = "${adminPath}/log/ntc/ntcIpsecLogs")
public class IpsecController extends BaseController{
/**
* @param model
* @param entry
* @param request
* @param response
* @return
* @throws ClientProtocolException
* @throws Exception
*/
@RequestMapping(value={"list",""})
public String list(Model model,@ModelAttribute("log")NtcIpsecLog entry,HttpServletRequest request, HttpServletResponse response) throws ClientProtocolException, IOException {
try {
Page<NtcIpsecLog> page = new Page<NtcIpsecLog>(request, response);
Map<String, Object> params=new HashMap<>();
params.put("pageSize", page.getPageSize());
params.put("pageNo", page.getPageNo());
//查询值判断
initLogSearchValue(entry,params);
String url = "";
url = Constants.LOG_BASE_URL+Constants.NTC_IPSEC_LOG;
String jsonString = HttpClientUtil.getMsg(url,params);
Gson gson = new GsonBuilder().create();
//gson泛型支持
LogRecvData<NtcIpsecLog> fromJson = gson.fromJson(jsonString, new TypeToken<LogRecvData<NtcIpsecLog>>(){}.getType());
if (fromJson.getStatus().intValue() == 200) {
BeanUtils.copyProperties(fromJson.getData(), page);
List<NtcIpsecLog> list = page.getList();
for (NtcIpsecLog l : list) {
l.setFunctionId(entry.getFunctionId());
setLogAction(l);
}
model.addAttribute("page", page);
logger.info("查询Ipsec日志成功");
}
} catch (Exception e) {
logger.info("查询Ipsec日志失败");
e.printStackTrace();
}
return "/log/ntc/ipsecList";
}
}

View File

@@ -1,7 +1,6 @@
package com.nis.web.controller.log.ntc;
import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -10,6 +9,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.client.ClientProtocolException;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
@@ -20,10 +20,9 @@ import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import com.nis.domain.Page;
import com.nis.domain.log.NtcOpenVpnLog;
import com.nis.domain.log.NtcOpenVpnLog;
import com.nis.domain.maat.LogRecvData;
import com.nis.util.Constants;
import com.nis.util.DateUtils;
import com.nis.util.StringUtils;
import com.nis.util.httpclient.HttpClientUtil;
import com.nis.web.controller.BaseController;
@@ -44,8 +43,6 @@ public class OpenVpnController extends BaseController{
public String list(Model model,@ModelAttribute("log")NtcOpenVpnLog entry,HttpServletRequest request, HttpServletResponse response) throws ClientProtocolException, IOException {
try {
//初始化action
initLogServiceType(model, entry);
Page<NtcOpenVpnLog> page = new Page<NtcOpenVpnLog>(request, response);
Map<String, Object> params=new HashMap<>();
@@ -62,12 +59,16 @@ public class OpenVpnController extends BaseController{
//gson泛型支持
LogRecvData<NtcOpenVpnLog> fromJson = gson.fromJson(jsonString, new TypeToken<LogRecvData<NtcOpenVpnLog>>(){}.getType());
Page<NtcOpenVpnLog> data = fromJson.getData();
List<NtcOpenVpnLog> list = data.getList();
page.setList(list);
page.setCount(data.getCount());
model.addAttribute("page", page);
logger.info("查询OpenVpn日志成功");
if (fromJson.getStatus().intValue() == 200) {
BeanUtils.copyProperties(fromJson.getData(), page);
List<NtcOpenVpnLog> list = page.getList();
for (NtcOpenVpnLog l : list) {
l.setFunctionId(entry.getFunctionId());
setLogAction(l);
}
model.addAttribute("page", page);
logger.info("查询OpenVpn日志成功");
}
} catch (Exception e) {
logger.info("查询OpenVpn日志失败");
e.printStackTrace();

View File

@@ -0,0 +1,79 @@
package com.nis.web.controller.log.ntc;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.client.ClientProtocolException;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import com.nis.domain.Page;
import com.nis.domain.log.NtcSshLog;
import com.nis.domain.log.NtcSshLog;
import com.nis.domain.maat.LogRecvData;
import com.nis.util.Constants;
import com.nis.util.httpclient.HttpClientUtil;
import com.nis.web.controller.BaseController;
@Controller
@RequestMapping(value = "${adminPath}/log/ntc/ntcSshLogs")
public class SshController extends BaseController{
/**
* @param model
* @param entry
* @param request
* @param response
* @return
* @throws ClientProtocolException
* @throws Exception
*/
@RequestMapping(value={"list",""})
public String list(Model model,@ModelAttribute("log")NtcSshLog entry,HttpServletRequest request, HttpServletResponse response) throws ClientProtocolException, IOException {
try {
Page<NtcSshLog> page = new Page<NtcSshLog>(request, response);
Map<String, Object> params=new HashMap<>();
params.put("pageSize", page.getPageSize());
params.put("pageNo", page.getPageNo());
//查询值判断
initLogSearchValue(entry,params);
String url = "";
url = Constants.LOG_BASE_URL+Constants.NTC_SSH_LOG;
String jsonString = HttpClientUtil.getMsg(url,params);
Gson gson = new GsonBuilder().create();
//gson泛型支持
LogRecvData<NtcSshLog> fromJson = gson.fromJson(jsonString, new TypeToken<LogRecvData<NtcSshLog>>(){}.getType());
if (fromJson.getStatus().intValue() == 200) {
BeanUtils.copyProperties(fromJson.getData(), page);
List<NtcSshLog> list = page.getList();
for (NtcSshLog l : list) {
l.setFunctionId(entry.getFunctionId());
setLogAction(l);
}
model.addAttribute("page", page);
logger.info("查询Ssh日志成功");
}
} catch (Exception e) {
logger.info("查询Ssh日志失败");
e.printStackTrace();
}
return "/log/ntc/sshList";
}
}

View File

@@ -631,4 +631,9 @@ encrypt_mode=encrypt mode
hmac=HMAC
tunnel_type=tunnel type
log_total=log total
host_key=host key
host_cookie=host cookie
mac=mac
ex_protocol=exchange protocol
isakmp_mode=ISAKMP mode
#===========log end =============

View File

@@ -457,4 +457,9 @@ encrypt_mode=encrypt mode
hmac=HMAC
tunnel_type=tunnel type
log_total=log total
host_key=host key
host_cookie=host cookie
mac=mac
ex_protocol=exchange protocol
isakmp_mode=ISAKMP mode
#===========log end =============

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,239 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<script type="text/javascript">
$(document).ready(function(){
//筛选功能
filterActionInit();
//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",'');
$(':input','#searchForm')
.not(':button,:submit,:reset,:hidden')
.attr("value",'');
$("#searchForm")[0].reset();
});
});
//查询
function page(n,s){
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/log/ntc/ntcIpsecLogs");
$("#searchForm").submit();
return false;
}
</script>
</head>
<body>
<div class="page-content">
<h3 class="page-title">
IPSEC
<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="log" action="${ctx}/log/ntc/ntcIpsecLogs" 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}"/>
<!-- 筛选按钮展开状态-->
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${log.isFilterAction }"/>
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
</div>
<input id="searchFoundStartTime" name="searchFoundStartTime" type="text" readonly="readonly" class="form-control input-medium Wdate "
value="${log.searchFoundStartTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
</div>
<input id="searchFoundEndTime" name="searchFoundEndTime" type="text" readonly="readonly" class="form-control input-medium Wdate "
value="${log.searchFoundEndTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</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" 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"></spring:message> <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>
</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="protocol_type"/></label>
<c:set var="select"><spring:message code='select'/></c:set>
<form:select path="protocol" class="selectpicker select2 form-control" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code="select"/></form:option>
<c:forEach items="${fns:getDictList('LOG_PROTOCOL')}" var="dict">
<form:option value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="direct"/></label>
<form:select path="direction" class="selectpicker select2 form-control">
<form:option value=""><spring:message code="select"/></form:option>
<c:forEach items="${fns:getDictList('DIRECTION')}" var="dict">
<form:option value="${dict.itemCode}"><spring:message code="${dict.itemValue}"/></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="entrance_id"/></label>
<input id=entranceId name="entranceId" class="form-control" type="text" value="${log.entranceId}"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="clj_ip"/></label>
<input id=cljIp name="cljIp" class="form-control" type="text" value="${log.cljIp}"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="clientip"/></label>
<input id="clientIp" name="clientIp" class="form-control" type="text" value="${log.clientIp}"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="serverip"/></label>
<input id="serverIp" name="serverIp" class="form-control" type="text" value="${log.serverIp}"/>
</div>
</div>
</div>
</div>
<!-- /筛选搜索内容栏 结束-->
</form:form>
</div>
<div class="table-responsive">
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
<thead>
<tr>
<th><spring:message code='cfg_id'/></th>
<th><spring:message code='entrance_id'/></th>
<th><spring:message code='action'/></th>
<th><spring:message code='direct'/></th>
<th><spring:message code='found_time'/></th>
<th><spring:message code='recv_time'/></th>
<th><spring:message code='protocol_type'/></th>
<th><spring:message code='addr_type'/></th>
<th><spring:message code='serverip'/></th>
<th><spring:message code='clientip'/></th>
<th><spring:message code='serverport'/></th>
<th><spring:message code='clientport'/></th>
<th><spring:message code='deviceid'/></th>
<th><spring:message code='stream_type'/></th>
<th><spring:message code='clj_ip'/></th>
<th><spring:message code='nest_addr_list'/></th>
<th><spring:message code='user_region'/></th>
<th><spring:message code='ex_protocol'/></th>
<th><spring:message code='isakmp_mode'/></th>
</tr>
</thead>
<tbody>
<c:forEach items="${page.list}" var="log" varStatus="status" step="1">
<tr>
<td>${log.cfgId}</td>
<td>${log.entranceId}</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>
<c:forEach items="${fns:getDictList('DIRECTION')}" var="dic">
<c:if test="${log.direction==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
</c:forEach>
</td>
<td>${log.foundTime}</td>
<td>${log.recvTime}</td>
<td>
<c:forEach items="${fns:getDictList('LOG_PROTOCOL')}" var="dic">
<c:if test="${log.protocol==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
</c:forEach>
</td>
<td>
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="dic">
<c:if test="${log.addrType==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
</c:forEach>
</td>
<td>${log.serverIp}</td>
<td>${log.clientIp}</td>
<td>${log.serverPort}</td>
<td>${log.clientPort}</td>
<td>${log.deviceId}</td>
<td>
<c:forEach items="${fns:getDictList('LOG_STREAM_TYPE')}" var="dic">
<c:if test="${log.streamType==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
</c:forEach>
</td>
<td>${log.cljIp}</td>
<td>${log.nestAddrList}</td>
<td>${log.userRegion}</td>
<td>
<c:if test="${log.exProtocol==1}">ISAKMP(V1)</c:if>
<c:if test="${log.exProtocol==2}">IKEv2</c:if>
<c:if test="${log.exProtocol==3}">其它</c:if>
</td>
<td>
<c:if test="${log.isakmpMode==1}">Aggre</c:if>
<c:if test="${log.isakmpMode==2}">Main</c:if>
<c:if test="${log.isakmpMode==3}">nat_aggre</c:if>
<c:if test="${log.isakmpMode==4}">nat_main</c:if>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -50,7 +50,7 @@ $(document).ready(function(){
<form:form id="searchForm" modelAttribute="log" action="${ctx}/log/ntc/ntcOpenvpnLogs" 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}"/>
<!-- 筛选按钮展开状态-->
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${log.isFilterAction }"/>
@@ -58,54 +58,31 @@ $(document).ready(function(){
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<div class="pull-left">
<form:select path="serviceType" class="selectpicker select2 input-small">
<form:option value=""><spring:message code="action"/></form:option>
<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">
<div class="input-group">
<div class="input-group-btn">
<c:set var="select"><spring:message code='select'/></c:set>
<form:select path="protocol" class="selectpicker select2 input-small" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code="protocol_type"/></form:option>
<c:forEach items="${fns:getDictList('LOG_PROTOCOL')}" var="dict">
<form:option value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/></form:option>
</c:forEach>
</form:select>
</div></div>
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
</div>
<input id="searchFoundStartTime" name="searchFoundStartTime" type="text" readonly="readonly" class="form-control input-medium Wdate "
value="${log.searchFoundStartTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
</div>
<input id="searchFoundEndTime" name="searchFoundEndTime" type="text" readonly="readonly" class="form-control input-medium Wdate "
value="${log.searchFoundEndTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<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:select>
</div>
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<form:select path="direction" class="selectpicker select2 input-small">
<form:option value=""><spring:message code="direct"/></form:option>
<c:forEach items="${fns:getDictList('DIRECTION')}" var="dict">
<form:option value="${dict.itemCode}"><spring:message code="${dict.itemValue}"/></form:option>
</c:forEach>
</form:select>
</div>
</div>
</div>
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<span class="selectpicker form-control" ><spring:message code="entrance_id"/></span>
</div>
<input id="entranceId" name="entranceId" class="form-control input-small" type="text" value="${log.entranceId}"/>
</div>
</div>
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<span class="selectpicker form-control" ><spring:message code="clj_ip"/></span>
</div>
<input id="cljIp" name="cljIp" class="form-control input-small" type="text" value="${log.cljIp}"/>
</div>
</div>
<div class="pull-left">
<button type="button" class="btn blue" onClick="page()"> <i class="fa fa-search"></i> <spring:message code="search"/> </button>
@@ -125,19 +102,39 @@ $(document).ready(function(){
<div class="col-md-12 filter-action-select-panle hide" >
<div class="row">
<div class="col-md-2">
<div class="form-group">
<label class="form-label"><spring:message code="begin_date"/></label>
<input id="searchFoundStartTime" name="searchFoundStartTime" type="text" readonly="readonly" class="form-control Wdate"
value="${log.searchFoundStartTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
<div class="form-group">
<label><spring:message code="protocol_type"/></label>
<c:set var="select"><spring:message code='select'/></c:set>
<form:select path="protocol" class="selectpicker select2 form-control" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code="select"/></form:option>
<c:forEach items="${fns:getDictList('LOG_PROTOCOL')}" var="dict">
<form:option value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="end_date"/></label>
<input id="searchFoundEndTime" name="searchFoundEndTime" type="text" readonly="readonly" class="form-control Wdate"
value="${log.searchFoundEndTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
<label><spring:message code="direct"/></label>
<form:select path="direction" class="selectpicker select2 form-control">
<form:option value=""><spring:message code="select"/></form:option>
<c:forEach items="${fns:getDictList('DIRECTION')}" var="dict">
<form:option value="${dict.itemCode}"><spring:message code="${dict.itemValue}"/></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="entrance_id"/></label>
<input id=entranceId name="entranceId" class="form-control" type="text" value="${log.entranceId}"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="clj_ip"/></label>
<input id=cljIp name="cljIp" class="form-control" type="text" value="${log.cljIp}"/>
</div>
</div>
<div class="col-md-2">
@@ -165,6 +162,7 @@ $(document).ready(function(){
<tr>
<th><spring:message code='cfg_id'/></th>
<th><spring:message code='entrance_id'/></th>
<th><spring:message code="action"/></th>
<th><spring:message code='direct'/></th>
<th><spring:message code='found_time'/></th>
<th><spring:message code='recv_time'/></th>
@@ -190,6 +188,10 @@ $(document).ready(function(){
<tr>
<td>${log.cfgId}</td>
<td>${log.entranceId}</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>
<c:forEach items="${fns:getDictList('DIRECTION')}" var="dic">
<c:if test="${log.direction==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>

View File

@@ -0,0 +1,249 @@
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/include/taglib.jsp"%>
<html>
<head>
<script type="text/javascript">
$(document).ready(function(){
//筛选功能
filterActionInit();
//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",'');
$(':input','#searchForm')
.not(':button,:submit,:reset,:hidden')
.attr("value",'');
$("#searchForm")[0].reset();
});
});
//查询
function page(n,s){
$("#intype").attr("name",$("#seltype").val());
$("#pageNo").val(n);
$("#pageSize").val(s);
$("#searchForm").attr("action","${ctx}/log/ntc/ntcSshLogs");
$("#searchForm").submit();
return false;
}
</script>
</head>
<body>
<div class="page-content">
<h3 class="page-title">
SSH
<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="log" action="${ctx}/log/ntc/ntcSshLogs" 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}"/>
<!-- 筛选按钮展开状态-->
<input id="isFilterAction" name="isFilterAction" type="hidden" value="${log.isFilterAction }"/>
<sys:tableSort id="orderBy" name="orderBy" value="${page.orderBy}" callback="page();"/>
<!-- 搜索内容与操作按钮栏 -->
<div class="col-md-12">
<div class="pull-left">
<form:select path="serviceType" class="selectpicker select2 input-small">
<form:option value=""><spring:message code="action"/></form:option>
<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">
<div class="input-group">
<div class="input-group-btn">
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
</div>
<input id="searchFoundStartTime" name="searchFoundStartTime" type="text" readonly="readonly" class="form-control input-medium Wdate "
value="${log.searchFoundStartTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</div>
<div class="pull-left">
<div class="input-group">
<div class="input-group-btn">
<span class="selectpicker form-control" ><spring:message code="begin_date"/></span>
</div>
<input id="searchFoundEndTime" name="searchFoundEndTime" type="text" readonly="readonly" class="form-control input-medium Wdate "
value="${log.searchFoundEndTime}" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:true});"/>
</div>
</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" 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"></spring:message> <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>
</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="protocol_type"/></label>
<c:set var="select"><spring:message code='select'/></c:set>
<form:select path="protocol" class="selectpicker select2 form-control" data-live-search="true" data-live-search-placeholder="search">
<form:option value=""><spring:message code="select"/></form:option>
<c:forEach items="${fns:getDictList('LOG_PROTOCOL')}" var="dict">
<form:option value="${dict.itemCode}" ><spring:message code="${dict.itemValue}"/></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="direct"/></label>
<form:select path="direction" class="selectpicker select2 form-control">
<form:option value=""><spring:message code="select"/></form:option>
<c:forEach items="${fns:getDictList('DIRECTION')}" var="dict">
<form:option value="${dict.itemCode}"><spring:message code="${dict.itemValue}"/></form:option>
</c:forEach>
</form:select>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="entrance_id"/></label>
<input id=entranceId name="entranceId" class="form-control" type="text" value="${log.entranceId}"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="clj_ip"/></label>
<input id=cljIp name="cljIp" class="form-control" type="text" value="${log.cljIp}"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="clientip"/></label>
<input id="clientIp" name="clientIp" class="form-control" type="text" value="${log.clientIp}"/>
</div>
</div>
<div class="col-md-2">
<div class="form-group">
<label><spring:message code="serverip"/></label>
<input id="serverIp" name="serverIp" class="form-control" type="text" value="${log.serverIp}"/>
</div>
</div>
</div>
</div>
<!-- /筛选搜索内容栏 结束-->
</form:form>
</div>
<div class="table-responsive">
<sys:message content="${message}"/>
<table id="contentTable" class="table table-striped table-bordered table-condensed text-nowrap">
<thead>
<tr>
<th><spring:message code='cfg_id'/></th>
<th><spring:message code='entrance_id'/></th>
<th><spring:message code='action'/></th>
<th><spring:message code='direct'/></th>
<th><spring:message code='found_time'/></th>
<th><spring:message code='recv_time'/></th>
<th><spring:message code='protocol_type'/></th>
<th><spring:message code='addr_type'/></th>
<th><spring:message code='serverip'/></th>
<th><spring:message code='clientip'/></th>
<th><spring:message code='serverport'/></th>
<th><spring:message code='clientport'/></th>
<th><spring:message code='deviceid'/></th>
<th><spring:message code='stream_type'/></th>
<th><spring:message code='clj_ip'/></th>
<th><spring:message code='nest_addr_list'/></th>
<th><spring:message code='user_region'/></th>
<th><spring:message code='version'/></th>
<th><spring:message code='host_key'/></th>
<th><spring:message code='host_cookie'/></th>
<th><spring:message code='encrypt_mode'/></th>
<th><spring:message code='mac'/></th>
<th><spring:message code='tunnel_type'/></th>
</tr>
</thead>
<tbody>
<c:forEach items="${page.list}" var="log" varStatus="status" step="1">
<tr>
<td>${log.cfgId}</td>
<td>${log.entranceId}</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>
<c:forEach items="${fns:getDictList('DIRECTION')}" var="dic">
<c:if test="${log.direction==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
</c:forEach>
</td>
<td>${log.foundTime}</td>
<td>${log.recvTime}</td>
<td>
<c:forEach items="${fns:getDictList('LOG_PROTOCOL')}" var="dic">
<c:if test="${log.protocol==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
</c:forEach>
</td>
<td>
<c:forEach items="${fns:getDictList('IP_TYPE')}" var="dic">
<c:if test="${log.addrType==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
</c:forEach>
</td>
<td>${log.serverIp}</td>
<td>${log.clientIp}</td>
<td>${log.serverPort}</td>
<td>${log.clientPort}</td>
<td>${log.deviceId}</td>
<td>
<c:forEach items="${fns:getDictList('LOG_STREAM_TYPE')}" var="dic">
<c:if test="${log.streamType==dic.itemCode}"><spring:message code="${dic.itemValue }"/></c:if>
</c:forEach>
</td>
<td>${log.cljIp}</td>
<td>${log.nestAddrList}</td>
<td>${log.userRegion}</td>
<td>${log.version}</td>
<td>${log.hostKey}</td>
<td>${log.hostCookie}</td>
<td>${log.encryptMode}</td>
<td>${log.mac}</td>
<td>
<c:if test="${log.tunnelType==1}">SSH</c:if>
<c:if test="${log.tunnelType==2}">SSHD</c:if>
<c:if test="${log.tunnelType==3}">SFTP</c:if>
</td>
</tr>
</c:forEach>
</tbody>
</table>
<div class="page">${page}</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>