Merge branch 'develop' of http://10.0.6.99/gwall/gwall.git into develop
This commit is contained in:
91
src/main/java/com/nis/domain/log/ReportLog.java
Normal file
91
src/main/java/com/nis/domain/log/ReportLog.java
Normal file
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
*@Title: ReportLog.java
|
||||
*@Package com.nis.domain.log
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年6月13日 下午2:21:04
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.domain.log;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.nis.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* @ClassName: ReportLog.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年6月13日 下午2:21:04
|
||||
* @version V1.0
|
||||
*/
|
||||
public class ReportLog extends BaseEntity<ReportLog>{
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = 7079305499220977782L;
|
||||
private Long configId;
|
||||
private Long sum;
|
||||
private Integer service;
|
||||
private Date statTime;
|
||||
/**
|
||||
* configId
|
||||
* @return configId
|
||||
*/
|
||||
|
||||
public Long getConfigId() {
|
||||
return configId;
|
||||
}
|
||||
/**
|
||||
* @param configId the configId to set
|
||||
*/
|
||||
public void setConfigId(Long configId) {
|
||||
this.configId = configId;
|
||||
}
|
||||
/**
|
||||
* sum
|
||||
* @return sum
|
||||
*/
|
||||
|
||||
public Long getSum() {
|
||||
return sum;
|
||||
}
|
||||
/**
|
||||
* @param sum the sum to set
|
||||
*/
|
||||
public void setSum(Long sum) {
|
||||
this.sum = sum;
|
||||
}
|
||||
/**
|
||||
* service
|
||||
* @return service
|
||||
*/
|
||||
|
||||
public Integer getService() {
|
||||
return service;
|
||||
}
|
||||
/**
|
||||
* @param service the service to set
|
||||
*/
|
||||
public void setService(Integer service) {
|
||||
this.service = service;
|
||||
}
|
||||
/**
|
||||
* statTime
|
||||
* @return statTime
|
||||
*/
|
||||
|
||||
public Date getStatTime() {
|
||||
return statTime;
|
||||
}
|
||||
/**
|
||||
* @param statTime the statTime to set
|
||||
*/
|
||||
public void setStatTime(Date statTime) {
|
||||
this.statTime = statTime;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -24,7 +24,7 @@ import com.nis.domain.RestfulResult;
|
||||
*/
|
||||
public class ReportResultLog extends RestfulResult{
|
||||
private Integer logSource;
|
||||
private List<Page<ReportLog>> data;
|
||||
private Page<ReportLog> data;
|
||||
/**
|
||||
* logSource
|
||||
* @return logSource
|
||||
@@ -44,84 +44,14 @@ public class ReportResultLog extends RestfulResult{
|
||||
* @return data
|
||||
*/
|
||||
|
||||
public List<Page<ReportLog>> getData() {
|
||||
public Page<ReportLog> getData() {
|
||||
return data;
|
||||
}
|
||||
/**
|
||||
* @param data the data to set
|
||||
*/
|
||||
public void setData(List<Page<ReportLog>> data) {
|
||||
public void setData(Page<ReportLog> data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
}
|
||||
class ReportLog extends BaseEntity<ReportLog>{
|
||||
/**
|
||||
* @Fields serialVersionUID:TODO(用一句话描述这个变量表示什么)
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
||||
private static final long serialVersionUID = 7079305499220977782L;
|
||||
private Long configId;
|
||||
private Long sum;
|
||||
private Integer service;
|
||||
private Date statTime;
|
||||
/**
|
||||
* configId
|
||||
* @return configId
|
||||
*/
|
||||
|
||||
public Long getConfigId() {
|
||||
return configId;
|
||||
}
|
||||
/**
|
||||
* @param configId the configId to set
|
||||
*/
|
||||
public void setConfigId(Long configId) {
|
||||
this.configId = configId;
|
||||
}
|
||||
/**
|
||||
* sum
|
||||
* @return sum
|
||||
*/
|
||||
|
||||
public Long getSum() {
|
||||
return sum;
|
||||
}
|
||||
/**
|
||||
* @param sum the sum to set
|
||||
*/
|
||||
public void setSum(Long sum) {
|
||||
this.sum = sum;
|
||||
}
|
||||
/**
|
||||
* service
|
||||
* @return service
|
||||
*/
|
||||
|
||||
public Integer getService() {
|
||||
return service;
|
||||
}
|
||||
/**
|
||||
* @param service the service to set
|
||||
*/
|
||||
public void setService(Integer service) {
|
||||
this.service = service;
|
||||
}
|
||||
/**
|
||||
* statTime
|
||||
* @return statTime
|
||||
*/
|
||||
|
||||
public Date getStatTime() {
|
||||
return statTime;
|
||||
}
|
||||
/**
|
||||
* @param statTime the statTime to set
|
||||
*/
|
||||
public void setStatTime(Date statTime) {
|
||||
this.statTime = statTime;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
*@Title: NtcPzReportController.java
|
||||
*@Package com.nis.web.controller.log.ntc
|
||||
*@Description TODO
|
||||
*@author dell
|
||||
*@date 2018年6月12日 下午2:09:41
|
||||
*@version 版本号
|
||||
*/
|
||||
package com.nis.web.controller.log.ntc;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.nis.domain.FunctionServiceDict;
|
||||
import com.nis.domain.log.ReportLog;
|
||||
import com.nis.domain.log.ReportResultLog;
|
||||
import com.nis.util.ConfigServiceUtil;
|
||||
import com.nis.util.Constants;
|
||||
import com.nis.util.DictUtils;
|
||||
import com.nis.web.controller.BaseController;
|
||||
|
||||
/**
|
||||
* @ClassName: NtcPzReportController.java
|
||||
* @Description: TODO
|
||||
* @author (dell)
|
||||
* @date 2018年6月12日 下午2:09:41
|
||||
* @version V1.0
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("${adminPath}/logs")
|
||||
public class NtcPzReportController extends BaseController{
|
||||
@RequestMapping(value="ajaxGetLogTotal")
|
||||
@ResponseBody
|
||||
public String ajaxGetLogTotal(Model model,long endTime,int action,Integer functionId,String compileIds){
|
||||
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mi:ss");
|
||||
int interval=Constants.LOG_TIME_RANGE;
|
||||
Date endDate=new Date(endTime);
|
||||
Date startDate=new Date(endTime-interval);
|
||||
int serviceId=0;
|
||||
List<FunctionServiceDict> serviceList=DictUtils.getFunctionServiceDictList(functionId.intValue());
|
||||
for(FunctionServiceDict service:serviceList){
|
||||
if(service.getAction().intValue()==action){
|
||||
serviceId=service.getServiceId().intValue();
|
||||
break;
|
||||
}
|
||||
}
|
||||
ReportResultLog result=ConfigServiceUtil.getReport(Constants.BUSINESSTYPE_CONFIG, compileIds, String.valueOf(serviceId), sdf.format(startDate), sdf.format(endDate));
|
||||
if(result.getData()!=null&&result.getData().getList()!=null){
|
||||
model.addAttribute("data", result.getData().getList());
|
||||
}
|
||||
return "success";
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.nis.web.controller.log.ntc;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@@ -11,7 +10,6 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.http.client.ClientProtocolException;
|
||||
import org.aspectj.util.FileUtil;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
@@ -46,46 +44,16 @@ 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<>();
|
||||
params.put("pageSize", page.getPageSize());
|
||||
params.put("pageNo", page.getPageNo());
|
||||
//查询值判断
|
||||
initLogSearchValue(entry,params);
|
||||
|
||||
if (StringUtils.isNotBlank(entry.getSearchFoundStartTime())&&StringUtils.isNotBlank(entry.getSearchFoundEndTime())) {
|
||||
params.put("searchFoundStartTime", entry.getSearchFoundStartTime());
|
||||
params.put("searchFoundEndTime", entry.getSearchFoundEndTime());
|
||||
}else{
|
||||
//设置默认查询当前时间及前五分钟
|
||||
String startTime = DateUtils.getDateTime();
|
||||
Date dateEnd = new Date(new Date().getTime()-Constants.LOG_TIME_RANGE);
|
||||
String endTime = DateUtils.formatDateTime(dateEnd);
|
||||
params.put("searchFoundStartTime", startTime);
|
||||
params.put("searchFoundEndTime",endTime );
|
||||
entry.setSearchFoundStartTime(startTime);
|
||||
entry.setSearchFoundEndTime(endTime);
|
||||
}
|
||||
|
||||
if (StringUtils.isNotBlank(entry.getProtocol())) {
|
||||
params.put("searchProtocol", entry.getProtocol());
|
||||
}
|
||||
if (entry.getServiceType()!=null) {
|
||||
params.put("searchServiceType", entry.getServiceType());
|
||||
}
|
||||
if (StringUtils.isNotBlank(entry.getServerIp())) {
|
||||
params.put("searchServerIp", entry.getServerIp());
|
||||
}
|
||||
if (StringUtils.isNotBlank(entry.getClientIp())) {
|
||||
params.put("searchClientIp", entry.getClientIp());
|
||||
}
|
||||
if (StringUtils.isNotBlank(entry.getCljIp())) {
|
||||
params.put("searchCljIp", entry.getCljIp());
|
||||
}
|
||||
if (entry.getDirection()!=null) {
|
||||
params.put("searchDirection", entry.getDirection());
|
||||
}
|
||||
if (entry.getEntranceId()!=null) {
|
||||
params.put("searchEntranceId", entry.getEntranceId());
|
||||
}
|
||||
String url = "";
|
||||
url = Constants.LOG_BASE_URL+Constants.NTC_OPENVPN_LOG;
|
||||
String jsonString = HttpClientUtil.getMsg(url,params);
|
||||
|
||||
@@ -311,7 +311,7 @@
|
||||
<c:if test="${cfg.isAudit eq auditC.itemCode and auditC.itemValue eq 'cancel'}"><span class="label label-warning"><spring:message code="cancel_approved"></spring:message></span></c:if>
|
||||
</c:forEach>
|
||||
</td>
|
||||
<td compileId="${cfg.compileId}">0</td>
|
||||
<td compileId="${cfg.compileId}" ><div class="loading-total"></div></td>
|
||||
<td>${cfg.creatorName }</td>
|
||||
<td><fmt:formatDate value="${cfg.createTime }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
|
||||
<td>${cfg.editorName }</td>
|
||||
@@ -328,13 +328,5 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="loadingModal">
|
||||
<div style="width:100%;height:100%; z-index:200000; position:absolute;text-align:center;left:50%;top:50%;margin-left:-100px;margin-top:-10px">
|
||||
<!-- <div class="progress progeress-striped active" style="margin-bottom: 0;">
|
||||
<div class="process-bar process-bar-info" role="processbar" style="width:100%"></div>
|
||||
</div>
|
||||
<h5><spring:message code="loading..."/></h5>-->
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -58,14 +58,26 @@ $(document).ready(function(){
|
||||
|
||||
<!-- 搜索内容与操作按钮栏 -->
|
||||
<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="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">
|
||||
<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>
|
||||
</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">
|
||||
@@ -78,19 +90,14 @@ $(document).ready(function(){
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
</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">
|
||||
@@ -117,7 +124,7 @@ $(document).ready(function(){
|
||||
<!-- 筛选搜索内容栏默认隐藏-->
|
||||
<div class="col-md-12 filter-action-select-panle hide" >
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<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"
|
||||
@@ -126,23 +133,23 @@ $(document).ready(function(){
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<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});"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="clientip"/>:</label>
|
||||
<input id="clientIp" name="clientIp" class="form-control input-hide-bg" type="text" value="${log.clientIp}"/>
|
||||
<input id="clientIp" name="clientIp" class="form-control" type="text" value="${log.clientIp}"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<label><spring:message code="serverip"/>:</label>
|
||||
<input id="serverIp" name="serverIp" class="form-control input-hide-bg" type="text" value="${log.serverIp}"/>
|
||||
<input id="serverIp" name="serverIp" class="form-control" type="text" value="${log.serverIp}"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -184,7 +191,7 @@ $(document).ready(function(){
|
||||
<td>${log.cfgId}</td>
|
||||
<td>${log.entranceId}</td>
|
||||
<td>
|
||||
<c:forEach items="${fns:getDictList('LOG_DIRECTION')}" var="dic">
|
||||
<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>
|
||||
@@ -215,7 +222,10 @@ $(document).ready(function(){
|
||||
<td>${log.userRegion}</td>
|
||||
<td>${log.version}</td>
|
||||
<td>${log.encryptMode}</td>
|
||||
<td>${log.hmac}</td>
|
||||
<td>
|
||||
<c:if test="${log.hmac==0}"><spring:message code="no"/></c:if>
|
||||
<c:if test="${log.hmac==1}"><spring:message code="yes"/></c:if>
|
||||
</td>
|
||||
<td>
|
||||
<c:if test="${log.tunnelType==1}">TCP</c:if>
|
||||
<c:if test="${log.tunnelType==2}">UDP</c:if>
|
||||
|
||||
@@ -22538,12 +22538,13 @@ transition: background-color .1s ease-in-out;
|
||||
|
||||
/* END SHOW MORE CSS**/
|
||||
|
||||
/**<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><EFBFBD>Ӽ<EFBFBD>չʾ<EFBFBD><EFBFBD>ʽ**/
|
||||
/**子配置选项卡样式**/
|
||||
.tabInfo {
|
||||
width: 150px;
|
||||
border: 1px solid #c2cad8;
|
||||
padding: 5px;
|
||||
border-bottom: 0px
|
||||
border-bottom: 0px;
|
||||
cursor:pointer;
|
||||
}
|
||||
.content {
|
||||
width: 80%;
|
||||
@@ -22569,4 +22570,12 @@ span[id^='open']{
|
||||
}
|
||||
span[id^='close']{
|
||||
cursor:pointer;
|
||||
}
|
||||
.loading-total{
|
||||
width:50px;
|
||||
height:10px;
|
||||
position:relative;
|
||||
background:url(../img/loading.gif) no-repeat center center;
|
||||
opacity:0.7;
|
||||
filter:progid:DXImageTransform.Microsoft.Alpha(opacity=70);
|
||||
}
|
||||
Reference in New Issue
Block a user