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) {

View File

@@ -0,0 +1,4 @@
--->->HTTP(S) url
UPDATE `sys_menu` SET `href`='/log/pxy/httpBlockLists?searchAction=16' WHERE code='http_block' and href='/log/pxy/httpBlockList?searchAction=16' and permission= ''
--->->HTTP(S) url
UPDATE `sys_menu` SET `href`='/log/pxy/httpMonitLists?searchAction=1' WHERE code='http_monit' and href='/log/pxy/httpMonitogs' and permission= ''

View File

@@ -106,7 +106,15 @@
<div class="theme-panel hidden-xs hidden-sm">
</div>
<h3 class="page-title">
<spring:message code="http_manipulation"/>
<c:if test="${log.action eq 1}">
<spring:message code="http_monit"/>
</c:if>
<c:if test="${log.action eq 16}">
<spring:message code="http_block"/>
</c:if>
<c:if test="${log.action eq 48}">
<spring:message code="http_manipulation"/>
</c:if>
</h3>
<h5 class="page-header"></h5>
<div class="col-md-12">
@@ -117,6 +125,7 @@
<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="action" name="action" type="hidden" value="${log.action }"/>
<input id="apps" type="hidden" value="${log.appId}"/>
<input id="protos" type="hidden" value="${log.protocolId}"/>
<input id="jboxtCustomValue" type="hidden" value="true"/>
@@ -243,12 +252,12 @@
<input name="domain" type="text" class="form-control" value="${log.domain }"/>
</div>
</div>
<div class="col-md-2" style="display: none;">
<%-- <div class="col-md-2" style="display: none;">
<div class="form-group">
<label><spring:message code="action"></spring:message></label>
<input name="action" type="text" class="form-control" value="48"/>
</div>
</div>
</div> --%>
<div class="col-md-2">
<div class="form-group">
<label class="control-label"><spring:message code='application_layer_protocol'/></label>