HTTP(S)监测 修改为 查询 操控日志的接口

This commit is contained in:
shangguanyanfei
2019-06-10 10:22:24 +08:00
parent 3247d6fc9e
commit 4f85cf1beb
3 changed files with 32 additions and 11 deletions

View File

@@ -49,7 +49,7 @@ import com.nis.web.security.UserUtils;
@RequestMapping("${adminPath}/log/pxy")
public class PxyHttpManipulLogController extends BaseController{
@RequestMapping(value = "/httpManipulList")
@RequestMapping(value = {"/httpManipulList", "/httpBlockLists", "/httpMonitLists"})
public String list(@ModelAttribute("log") PxyHttpManipulationLog log, Model model, HttpServletRequest request,
HttpServletResponse response,Integer searchAction) {
try {
@@ -214,8 +214,16 @@ public class PxyHttpManipulLogController extends BaseController{
}
}
}
titleList.add("http_manipulation");
classMap.put("http_manipulation", PxyHttpManipulationLog.class);
String title="";
if(log.getAction().equals(1)){//监测
title="http_monit";
}else if(log.getAction().equals(16)){//阻断
title="http_block";
}else if(log.getAction().equals(48)){//操控
title="http_manipulation";
}
titleList.add(title);
classMap.put(title, PxyHttpManipulationLog.class);
SysUser user = UserUtils.getUser();
if (!user.isAdmin()) {
hColumns += ",scene_file,";
@@ -225,15 +233,15 @@ public class PxyHttpManipulLogController extends BaseController{
String cfgIndexInfoNoExport = ",req_header,resp_header,inner_smac,inner_dmac,nest_addr_list,scene_file,"
+ ",found_time,"
+ hColumns;
noExportMap.put("http_manipulation", cfgIndexInfoNoExport);
dataMap.put("http_manipulation", list);
String timeRange= initLogMaps(log,"http_manipulation");
noExportMap.put(title, cfgIndexInfoNoExport);
dataMap.put(title, list);
String timeRange= initLogMaps(log,title);
noExportMap.put("timeRange", timeRange);
if ("csv".equals(type)) {
this._exportCsv(model, request, response, redirectAttributes, "http_manipulation", titleList, classMap,
this._exportCsv(model, request, response, redirectAttributes, title, titleList, classMap,
dataMap, noExportMap);
} else {
this._export(model, request, response, redirectAttributes, "http_manipulation", titleList, classMap, dataMap,
this._export(model, request, response, redirectAttributes, title, titleList, classMap, dataMap,
noExportMap);
}
} catch (Exception e) {