HTTP(S)操控
1.从配置到日志页面的跳转 2.列表的排序 3.配置ID查询条件的更改 4.八个新增字段的添加和展示
This commit is contained in:
@@ -52,8 +52,8 @@ public class PxyHttpManipulationLog extends BaseEntity<PxyHttpManipulationLog>{
|
||||
private String respBody;
|
||||
// @ExcelField(title="website",sort=8)
|
||||
// private String website;
|
||||
|
||||
private String policyId;//
|
||||
@ExcelField(title="cfg_id",sort=1)
|
||||
private Integer policyId;//
|
||||
@ExcelField(title="app_proto",sort=31)
|
||||
private String appProto;//应用协议类型
|
||||
@ExcelField(title="startTime",sort=5)
|
||||
@@ -119,8 +119,9 @@ public class PxyHttpManipulationLog extends BaseEntity<PxyHttpManipulationLog>{
|
||||
protected String searchFoundEndTime;//结束时间,格式同上
|
||||
protected String isLogTotalSearch;//由配置界面跳转日志查询标识
|
||||
protected String orderBy;//排序参数
|
||||
|
||||
@ExcelField(title="cfg_id",sort=1)
|
||||
protected Integer cfgId;
|
||||
protected String fields;
|
||||
|
||||
protected Integer compileId;//
|
||||
protected String startRecvTime;//开始时间
|
||||
protected String endRecvTime; //结束时间
|
||||
@@ -148,21 +149,37 @@ public class PxyHttpManipulationLog extends BaseEntity<PxyHttpManipulationLog>{
|
||||
protected Integer conLatencyMs;//握手延迟
|
||||
@ExcelField(title="pinning",dictType="PINNING",sort=89)
|
||||
protected Integer pinningst;//pinning状态
|
||||
@ExcelField(title="c2s_pkt_num",sort=90)
|
||||
@ExcelField(title="intercept_state",dictType="INTERCEPT_STATE",sort=90)
|
||||
protected Integer interceptState;//拦截状态
|
||||
@ExcelField(title="ssl_server_side_latency",sort=91)
|
||||
protected Integer sslServerSideLatency;//服务器侧ssl建立延迟
|
||||
@ExcelField(title="ssl_client_side_latency",sort=92)
|
||||
protected Integer sslClientSideLatency;//客户端侧ssl建立延迟
|
||||
@ExcelField(title="ssl_server_side_version",sort=93)
|
||||
protected String sslServerSideVersion;//服务端侧ssl版本
|
||||
@ExcelField(title="ssl_client_side_version",sort=94)
|
||||
protected String sslClientSideVersion;//客户端侧ssl版本
|
||||
@ExcelField(title="ssl_cert_verify",dictType="SSL_CERT_VERIFY",sort=95)
|
||||
protected Integer sslCertVerify;//证书校验结果
|
||||
@ExcelField(title="stream_trace_id",sort=96)
|
||||
protected String streamTraceId;//流的追踪ID
|
||||
@ExcelField(title="ssl_error",sort=97)
|
||||
protected String sslError;//ssl错误信息
|
||||
@ExcelField(title="c2s_pkt_num",sort=98)
|
||||
protected Integer c2sPktNum;//c2s包数
|
||||
@ExcelField(title="s2c_pkt_num",sort=91)
|
||||
@ExcelField(title="s2c_pkt_num",sort=99)
|
||||
protected Integer s2cPktNum;//s2c包数
|
||||
@ExcelField(title="c2s_byte_num",sort=92)
|
||||
@ExcelField(title="c2s_byte_num",sort=100)
|
||||
protected Integer c2sByteNum;//c2s字节数
|
||||
@ExcelField(title="s2c_byte_num",sort=93)
|
||||
@ExcelField(title="s2c_byte_num",sort=101)
|
||||
protected Integer s2cByteNum;//s2c字节数
|
||||
@ExcelField(title="nas_ip",sort=94)
|
||||
@ExcelField(title="nas_ip",sort=102)
|
||||
protected String nasIp;//ISN接入的IP
|
||||
@ExcelField(title="framed_ip",sort=95)
|
||||
@ExcelField(title="framed_ip",sort=103)
|
||||
protected String framedIp;//用户IP地址
|
||||
@ExcelField(title="account",sort=96)
|
||||
@ExcelField(title="account",sort=104)
|
||||
protected String account;//用户名
|
||||
@ExcelField(title="packet_type",dictType="MESSAGE_TYPE",sort=97)
|
||||
@ExcelField(title="packet_type",dictType="MESSAGE_TYPE",sort=105)
|
||||
protected Integer packetType;//报文类型
|
||||
|
||||
protected String dIp;
|
||||
@@ -305,10 +322,10 @@ public class PxyHttpManipulationLog extends BaseEntity<PxyHttpManipulationLog>{
|
||||
public void setIsp(String isp) {
|
||||
this.isp = isp;
|
||||
}
|
||||
public String getPolicyId() {
|
||||
public Integer getPolicyId() {
|
||||
return policyId;
|
||||
}
|
||||
public void setPolicyId(String policyId) {
|
||||
public void setPolicyId(Integer policyId) {
|
||||
this.policyId = policyId;
|
||||
}
|
||||
public String getStartTime() {
|
||||
@@ -653,6 +670,66 @@ public class PxyHttpManipulationLog extends BaseEntity<PxyHttpManipulationLog>{
|
||||
public void setOrderBy(String orderBy) {
|
||||
this.orderBy = orderBy;
|
||||
}
|
||||
public Integer getInterceptState() {
|
||||
return interceptState;
|
||||
}
|
||||
public void setInterceptState(Integer interceptState) {
|
||||
this.interceptState = interceptState;
|
||||
}
|
||||
public Integer getSslServerSideLatency() {
|
||||
return sslServerSideLatency;
|
||||
}
|
||||
public void setSslServerSideLatency(Integer sslServerSideLatency) {
|
||||
this.sslServerSideLatency = sslServerSideLatency;
|
||||
}
|
||||
public Integer getSslClientSideLatency() {
|
||||
return sslClientSideLatency;
|
||||
}
|
||||
public void setSslClientSideLatency(Integer sslClientSideLatency) {
|
||||
this.sslClientSideLatency = sslClientSideLatency;
|
||||
}
|
||||
public String getSslServerSideVersion() {
|
||||
return sslServerSideVersion;
|
||||
}
|
||||
public void setSslServerSideVersion(String sslServerSideVersion) {
|
||||
this.sslServerSideVersion = sslServerSideVersion;
|
||||
}
|
||||
public String getSslClientSideVersion() {
|
||||
return sslClientSideVersion;
|
||||
}
|
||||
public void setSslClientSideVersion(String sslClientSideVersion) {
|
||||
this.sslClientSideVersion = sslClientSideVersion;
|
||||
}
|
||||
public Integer getSslCertVerify() {
|
||||
return sslCertVerify;
|
||||
}
|
||||
public void setSslCertVerify(Integer sslCertVerify) {
|
||||
this.sslCertVerify = sslCertVerify;
|
||||
}
|
||||
public String getStreamTraceId() {
|
||||
return streamTraceId;
|
||||
}
|
||||
public void setStreamTraceId(String streamTraceId) {
|
||||
this.streamTraceId = streamTraceId;
|
||||
}
|
||||
public String getSslError() {
|
||||
return sslError;
|
||||
}
|
||||
public void setSslError(String sslError) {
|
||||
this.sslError = sslError;
|
||||
}
|
||||
public Integer getCfgId() {
|
||||
return cfgId;
|
||||
}
|
||||
public void setCfgId(Integer cfgId) {
|
||||
this.cfgId = cfgId;
|
||||
}
|
||||
public String getFields() {
|
||||
return fields;
|
||||
}
|
||||
public void setFields(String fields) {
|
||||
this.fields = fields;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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