HTTP(S)操控
1.从配置到日志页面的跳转 2.列表的排序 3.配置ID查询条件的更改 4.八个新增字段的添加和展示
This commit is contained in:
@@ -72,6 +72,9 @@ public class PxyHttpManipulLogController extends BaseController{
|
||||
if (StringUtils.isNotBlank(log.getdIp())) {
|
||||
log.setServerIp(log.getdIp());
|
||||
}
|
||||
if(log.getCfgId()!=null && log.getPolicyId() ==null){
|
||||
log.setPolicyId(log.getCfgId());
|
||||
}
|
||||
initLogSearchValues(log, params);
|
||||
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
@@ -99,14 +102,14 @@ public class PxyHttpManipulLogController extends BaseController{
|
||||
l.setRecvTime(timeStamp2Date(l.getRecvTime(),null));
|
||||
for (CodeResult code : appCodeList) {
|
||||
Integer value3 = Integer.valueOf(code.getCode());
|
||||
if(l.getAppId().equals(value3)){
|
||||
if(l.getAppId() !=null && l.getAppId().equals(value3)){
|
||||
l.setAppName(code.getItem());
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (CodeResult code : protocolCodeList) {
|
||||
Integer value3 = Integer.valueOf(code.getCode());
|
||||
if(l.getProtocolId().equals(value3)){
|
||||
if(l.getProtocolId() !=null && l.getProtocolId().equals(value3)){
|
||||
l.setProtocolName(code.getItem());
|
||||
break;
|
||||
}
|
||||
@@ -156,7 +159,6 @@ public class PxyHttpManipulLogController extends BaseController{
|
||||
params.put("searchDomain", domain);
|
||||
}
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(log.getFunctionId());
|
||||
System.out.print(log.getFunctionId());
|
||||
model.addAttribute("serviceList", serviceList);
|
||||
|
||||
|
||||
@@ -181,14 +183,14 @@ public class PxyHttpManipulLogController extends BaseController{
|
||||
l.setRecvTime(timeStamp2Date(l.getRecvTime(),null));
|
||||
for (CodeResult code : appCodeList) {
|
||||
Integer value3 = Integer.valueOf(code.getCode());
|
||||
if(l.getAppId().equals(value3)){
|
||||
if(l.getAppId() !=null && l.getAppId().equals(value3)){
|
||||
l.setAppName(code.getItem());
|
||||
break;
|
||||
}
|
||||
}
|
||||
for (CodeResult code : protocolCodeList) {
|
||||
Integer value3 = Integer.valueOf(code.getCode());
|
||||
if(l.getProtocolId().equals(value3)){
|
||||
if(l.getProtocolId() !=null && l.getProtocolId().equals(value3)){
|
||||
l.setProtocolName(code.getItem());
|
||||
break;
|
||||
}
|
||||
@@ -236,8 +238,8 @@ public class PxyHttpManipulLogController extends BaseController{
|
||||
time.add(Calendar.MINUTE, -(Constants.LOG_TIME_RANGE/1000/60));
|
||||
String searchStartTime = DateUtils.formatDateTime(time.getTime());
|
||||
|
||||
params.put("searchStartRecvTime", searchStartTime);
|
||||
params.put("searchEndRecvTime", searchEndTime);
|
||||
params.put("searchStartRecvTime", date2TimeStamp(searchStartTime,"yyyy-MM-dd HH:mm:ss"));
|
||||
params.put("searchEndRecvTime", date2TimeStamp(searchEndTime,"yyyy-MM-dd HH:mm:ss"));
|
||||
entry.setSearchFoundStartTime(searchStartTime);
|
||||
entry.setSearchFoundEndTime(searchEndTime);
|
||||
} else {
|
||||
@@ -257,7 +259,7 @@ public class PxyHttpManipulLogController extends BaseController{
|
||||
if (StringUtils.isNotBlank(entry.getTransProto())) {
|
||||
params.put("searchTransProto", entry.getTransProto());
|
||||
}
|
||||
if (entry.getService() != null) {
|
||||
/* if (entry.getService() != null) {
|
||||
params.put("searchService", entry.getService());
|
||||
} else if (entry.getAction() != null) {
|
||||
List<FunctionServiceDict> serviceList = DictUtils.getFunctionServiceDictList(entry.getFunctionId());
|
||||
@@ -268,7 +270,7 @@ public class PxyHttpManipulLogController extends BaseController{
|
||||
params.put("searchService", dict.getServiceId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
if (StringUtils.isNotBlank(entry.getServerIp())) {
|
||||
params.put("searchServerIp", entry.getServerIp());
|
||||
}
|
||||
@@ -284,12 +286,15 @@ public class PxyHttpManipulLogController extends BaseController{
|
||||
if (entry.getEntranceId() != null) {
|
||||
params.put("searchEntranceId", entry.getEntranceId());
|
||||
}
|
||||
if (entry.getCompileId() != null) {
|
||||
params.put("searchCompileId", entry.getCompileId());
|
||||
if (entry.getPolicyId() != null) {
|
||||
params.put("searchPolicyId", entry.getPolicyId());
|
||||
}
|
||||
if (StringUtils.isNotBlank(entry.getOrderBy())) {
|
||||
params.put("orderBy", entry.getOrderBy());
|
||||
}
|
||||
if (StringUtils.isNotBlank(entry.getFields())) {
|
||||
params.put("fields", entry.getFields());
|
||||
}
|
||||
}
|
||||
|
||||
public String initLogMaps(PxyHttpManipulationLog log,String title){
|
||||
|
||||
Reference in New Issue
Block a user