1.由配置跳转日志查询默认时间修改为前五分钟 2.报表Action检索条件修改
This commit is contained in:
@@ -40,7 +40,7 @@ public class BaseLogEntity<T> extends BaseEntity<T> {
|
||||
protected String searchFoundStartTime;//开始时间,格式为yyyy-mm-dd hh24:mi:ss
|
||||
protected String searchFoundEndTime;//结束时间,格式同上
|
||||
|
||||
protected String isLogTotalSearch;//由配置列表点击日志总量进行查询的标识
|
||||
protected String isLogTotalSearch;//由配置界面跳转日志查询标识
|
||||
protected String orderBy;//排序参数
|
||||
|
||||
//新增字段
|
||||
|
||||
@@ -486,7 +486,34 @@ public class BaseController {
|
||||
|
||||
protected void initReportCondition(Model model, SearchReport report) {
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(report.getFunctionId());
|
||||
// HTTP(+keyword)报表处理
|
||||
if(report.getFunctionId() == 8){
|
||||
serviceList.addAll(DictUtils.getFunctionServiceDictList(635));
|
||||
for (FunctionServiceDict serviceDict : serviceList) {
|
||||
if(serviceDict.getFunctionId() == report.getFunctionId()){
|
||||
if(serviceDict.getAction() == Constants.MONIT_ACTION){
|
||||
serviceDict.setActionCode("log_search_http_monit");
|
||||
}else if(serviceDict.getAction() == Constants.REJECT_ACTION){
|
||||
serviceDict.setActionCode("log_search_http_reject");
|
||||
}
|
||||
}else{
|
||||
if(serviceDict.getAction() == Constants.MONIT_ACTION){
|
||||
serviceDict.setActionCode("log_search_keyword_monit");
|
||||
}else if(serviceDict.getAction() == Constants.REJECT_ACTION){
|
||||
serviceDict.setActionCode("log_search_keyword_reject");
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
String prefix = "action_";
|
||||
for (FunctionServiceDict serviceDict : serviceList) {
|
||||
if(!serviceDict.getActionCode().contains(prefix)){
|
||||
serviceDict.setActionCode(prefix+serviceDict.getActionCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
if (StringUtils.isBlank(report.getReportTime())) {
|
||||
report.setReportTime(DateUtils.formatDate(new Date(), "yyyy-MM-dd"));
|
||||
}
|
||||
@@ -809,15 +836,14 @@ public class BaseController {
|
||||
// 判断是否是从配置界面过来的日志查询
|
||||
if (StringUtils.isNotBlank(entry.getIsLogTotalSearch())) {
|
||||
Calendar time = Calendar.getInstance();
|
||||
time.add(Calendar.MINUTE, -5);
|
||||
String searchEndTime = DateUtils.formatDateTime(time.getTime());
|
||||
params.put("searchFoundEndTime", searchEndTime);
|
||||
entry.setSearchFoundEndTime(searchEndTime);
|
||||
|
||||
time.add(Calendar.MINUTE, -5);
|
||||
String searchStartTime = DateUtils.formatDateTime(time.getTime());
|
||||
|
||||
params.put("searchFoundStartTime", searchStartTime);
|
||||
params.put("searchFoundEndTime", searchEndTime);
|
||||
entry.setSearchFoundStartTime(searchStartTime);
|
||||
entry.setSearchFoundEndTime(searchEndTime);
|
||||
|
||||
// 判断startTime是否有值
|
||||
/*
|
||||
|
||||
@@ -373,21 +373,21 @@ white-space:nowrap;
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-content">
|
||||
<%-- <div class="theme-panel hidden-xs hidden-sm">
|
||||
<%-- <div class="theme-panel hidden-xs hidden-sm">
|
||||
<c:forEach items="${serviceList}" var="service" varStatus="status">
|
||||
<c:if test="${(service.action ne 128) && (service.serviceId ne 37) && (service.serviceId ne 149)}" >
|
||||
<div data-service="${service.serviceId}" class="service btn">
|
||||
<spring:message code="total"/>
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION')}" var="action">
|
||||
<c:if test="${service.functionId eq bean.functionId and action.itemCode eq service.action}">
|
||||
<spring:message code="${action.itemValue}"/>
|
||||
<c:if test="${action.itemCode eq service.action}">
|
||||
<spring:message code="${service.actionCode}"/>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
<span>0</span>
|
||||
</div>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</div> --%>
|
||||
</div> --%>
|
||||
<h3 class="page-title">
|
||||
<spring:message code="${bean.cfgName}"/>
|
||||
<small><spring:message code="report_list"/></small>
|
||||
@@ -415,7 +415,7 @@ white-space:nowrap;
|
||||
<c:forEach items="${serviceList}" var="service" >
|
||||
<c:forEach items="${fns:getDictList('SERVICE_ACTION') }" var="dict">
|
||||
<c:if test="${(dict.itemCode eq service.action) && (service.action ne 128) && (service.serviceId ne 37)&& (service.serviceId ne 149) }">
|
||||
<form:option value="${service.serviceId}"><spring:message code="${dict.itemValue}"/></form:option>
|
||||
<form:option value="${service.serviceId}"><spring:message code="${service.actionCode}"/></form:option>
|
||||
</c:if>
|
||||
</c:forEach>
|
||||
</c:forEach>
|
||||
|
||||
Reference in New Issue
Block a user