Revert "Ssl,Pptp,L2tp 日志查询"

This reverts commit c9dcdedd87
This commit is contained in:
wangxin
2018-06-19 18:31:57 -04:00
parent c9dcdedd87
commit 3652e9fecd
15 changed files with 8 additions and 1036 deletions

View File

@@ -1,30 +0,0 @@
package com.nis.domain.log;
public class NtcL2tpLog extends BaseLogEntity<NtcL2tpLog> {
private static final long serialVersionUID = -3547128625966615793L;
private Integer tunnelType;// 通道类型
private Integer encryptMode;// 加密方式
private String chapName; // 用户名称
public String getChapName() {
return chapName;
}
public void setChapName(String chapName) {
this.chapName = chapName;
}
public Integer getTunnelType() {
return tunnelType;
}
public void setTunnelType(Integer tunnelType) {
this.tunnelType = tunnelType;
}
public Integer getEncryptMode() {
return encryptMode;
}
public void setEncryptMode(Integer encryptMode) {
this.encryptMode = encryptMode;
}
}

View File

@@ -1,23 +0,0 @@
package com.nis.domain.log;
public class NtcPptpLog extends BaseLogEntity<NtcPptpLog> {
private static final long serialVersionUID = 6527360739786343374L;
private Integer tunnelType;// 通道类型
private Integer encryptMode;// 加密方式
public Integer getTunnelType() {
return tunnelType;
}
public void setTunnelType(Integer tunnelType) {
this.tunnelType = tunnelType;
}
public Integer getEncryptMode() {
return encryptMode;
}
public void setEncryptMode(Integer encryptMode) {
this.encryptMode = encryptMode;
}
}

View File

@@ -1,37 +0,0 @@
package com.nis.domain.log;
public class NtcSslLog extends BaseLogEntity<NtcSslLog>{
private static final long serialVersionUID = 533266057780162781L;
private String version;// 版本号
private String sni;// SNI
private String san;// SAN
private String ca;// CA
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getSni() {
return sni;
}
public void setSni(String sni) {
this.sni = sni;
}
public String getSan() {
return san;
}
public void setSan(String san) {
this.san = san;
}
public String getCa() {
return ca;
}
public void setCa(String ca) {
this.ca = ca;
}
}

View File

@@ -1,65 +0,0 @@
package com.nis.web.controller.log.ntc;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.JsonSyntaxException;
import com.google.gson.reflect.TypeToken;
import com.nis.domain.Page;
import com.nis.domain.log.NtcL2tpLog;
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("${adminPath}/log/ntc/l2tpLogs")
public class L2tpLogController extends BaseController {
@RequestMapping(value = {"/list"})
public String list(HttpServletRequest request, HttpServletResponse response, Model model, @ModelAttribute("log")NtcL2tpLog ntcL2tpLog) {
Page<NtcL2tpLog> page = new Page<NtcL2tpLog>(request,response);
Map<String, Object> params = new HashMap<String,Object>();
params.put("pageSize", page.getPageSize());
params.put("pageNo", page.getPageNo());
// 请求参数判断
initLogSearchValue(ntcL2tpLog, params);
try {
// 请求接口
String url = Constants.LOG_BASE_URL + Constants.NTC_L2TP_LOG;
String resJson = HttpClientUtil.getMsg(url, params);
Gson gson = new GsonBuilder().create();
LogRecvData<NtcL2tpLog> fromJson = gson.fromJson(resJson, new TypeToken<LogRecvData<NtcL2tpLog>>() {}.getType());
if(fromJson.getStatus().intValue() == 200) {
Page<NtcL2tpLog> fromPage = fromJson.getData();
BeanUtils.copyProperties(fromPage, page);
List<NtcL2tpLog> list = fromPage.getList();
for (NtcL2tpLog log : list) {
log.setFunctionId(ntcL2tpLog.getFunctionId());
setLogAction(log);
}
model.addAttribute("page", page);
}
} catch (JsonSyntaxException e) {
logger.info("L2TP日志查询失败");
e.printStackTrace();
}
return "/log/ntc/l2tpLogList";
}
}

View File

@@ -1,65 +0,0 @@
package com.nis.web.controller.log.ntc;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.JsonSyntaxException;
import com.google.gson.reflect.TypeToken;
import com.nis.domain.Page;
import com.nis.domain.log.NtcPptpLog;
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("${adminPath}/log/ntc/pptpLogs")
public class PptpLogController extends BaseController {
@RequestMapping(value = {"/list"})
public String list(HttpServletRequest request, HttpServletResponse response, Model model, @ModelAttribute("log")NtcPptpLog ntcPptpLog) {
Page<NtcPptpLog> page = new Page<NtcPptpLog>(request,response);
Map<String, Object> params = new HashMap<String,Object>();
params.put("pageSize", page.getPageSize());
params.put("pageNo", page.getPageNo());
// 请求参数判断
initLogSearchValue(ntcPptpLog, params);
try {
// 请求接口
String url = Constants.LOG_BASE_URL + Constants.NTC_PPTP_LOG;
String resJson = HttpClientUtil.getMsg(url, params);
Gson gson = new GsonBuilder().create();
LogRecvData<NtcPptpLog> fromJson = gson.fromJson(resJson, new TypeToken<LogRecvData<NtcPptpLog>>() {}.getType());
if(fromJson.getStatus().intValue() == 200) {
Page<NtcPptpLog> fromPage = fromJson.getData();
BeanUtils.copyProperties(fromPage, page);
List<NtcPptpLog> list = fromPage.getList();
for (NtcPptpLog log : list) {
log.setFunctionId(ntcPptpLog.getFunctionId());
setLogAction(log);
}
model.addAttribute("page", page);
}
} catch (JsonSyntaxException e) {
logger.info("PPTP日志查询失败");
e.printStackTrace();
}
return "/log/ntc/pptpLogList";
}
}

View File

@@ -1,68 +0,0 @@
package com.nis.web.controller.log.ntc;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
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.JsonSyntaxException;
import com.google.gson.reflect.TypeToken;
import com.nis.domain.Page;
import com.nis.domain.log.NtcSslLog;
import com.nis.domain.maat.LogRecvData;
import com.nis.util.Constants;
import com.nis.util.StringUtils;
import com.nis.util.httpclient.HttpClientUtil;
import com.nis.web.controller.BaseController;
@Controller
@RequestMapping("${adminPath}/log/ntc/sslLogs")
public class SslLogController extends BaseController {
@RequestMapping(value = {"/list"})
public String list(HttpServletRequest request, HttpServletResponse response, Model model, @ModelAttribute("log")NtcSslLog ntcSslLog) {
Page<NtcSslLog> page = new Page<NtcSslLog>(request,response);
Map<String, Object> params = new HashMap<String,Object>();
params.put("pageSize", page.getPageSize());
params.put("pageNo", page.getPageNo());
// 请求参数判断
initLogSearchValue(ntcSslLog, params);
if(StringUtils.isNotBlank(ntcSslLog.getSni())) {
params.put("SearchSni", ntcSslLog.getSni());
}
try {
// 请求接口
String url = Constants.LOG_BASE_URL + Constants.NTC_SSL_LOG;
String resJson = HttpClientUtil.getMsg(url, params);
Gson gson = new GsonBuilder().create();
LogRecvData<NtcSslLog> fromJson = gson.fromJson(resJson, new TypeToken<LogRecvData<NtcSslLog>>() {}.getType());
if(fromJson.getStatus().intValue() == 200) {
Page<NtcSslLog> fromPage = fromJson.getData();
BeanUtils.copyProperties(fromPage, page);
List<NtcSslLog> list = fromPage.getList();
for (NtcSslLog log : list) {
log.setFunctionId(ntcSslLog.getFunctionId());
setLogAction(log);
}
model.addAttribute("page", page);
}
} catch (JsonSyntaxException e) {
logger.info("SSL日志查询失败");
e.printStackTrace();
}
return "/log/ntc/sslLogList";
}
}