mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-12-27 04:46:34 +08:00
域名服务增加访问日志
This commit is contained in:
@@ -55,11 +55,11 @@ func (this *HistoryAction) RunGet(params struct {
|
||||
return
|
||||
}
|
||||
|
||||
if len(resp.AccessLogs) == 0 {
|
||||
if len(resp.HttpAccessLogs) == 0 {
|
||||
this.Data["accessLogs"] = []interface{}{}
|
||||
} else {
|
||||
this.Data["accessLogs"] = resp.AccessLogs
|
||||
for _, accessLog := range resp.AccessLogs {
|
||||
this.Data["accessLogs"] = resp.HttpAccessLogs
|
||||
for _, accessLog := range resp.HttpAccessLogs {
|
||||
if len(accessLog.RemoteAddr) > 0 {
|
||||
if !lists.ContainsString(ipList, accessLog.RemoteAddr) {
|
||||
ipList = append(ipList, accessLog.RemoteAddr)
|
||||
@@ -87,7 +87,7 @@ func (this *HistoryAction) RunGet(params struct {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
if int64(len(prevResp.AccessLogs)) == size {
|
||||
if int64(len(prevResp.HttpAccessLogs)) == size {
|
||||
this.Data["lastRequestId"] = prevResp.RequestId
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ func (this *IndexAction) RunPost(params struct {
|
||||
}
|
||||
|
||||
ipList := []string{}
|
||||
accessLogs := accessLogsResp.AccessLogs
|
||||
accessLogs := accessLogsResp.HttpAccessLogs
|
||||
if len(accessLogs) == 0 {
|
||||
accessLogs = []*pb.HTTPAccessLog{}
|
||||
} else {
|
||||
|
||||
@@ -39,11 +39,11 @@ func (this *TodayAction) RunGet(params struct {
|
||||
}
|
||||
|
||||
ipList := []string{}
|
||||
if len(resp.AccessLogs) == 0 {
|
||||
if len(resp.HttpAccessLogs) == 0 {
|
||||
this.Data["accessLogs"] = []interface{}{}
|
||||
} else {
|
||||
this.Data["accessLogs"] = resp.AccessLogs
|
||||
for _, accessLog := range resp.AccessLogs {
|
||||
this.Data["accessLogs"] = resp.HttpAccessLogs
|
||||
for _, accessLog := range resp.HttpAccessLogs {
|
||||
if len(accessLog.RemoteAddr) > 0 {
|
||||
if !lists.ContainsString(ipList, accessLog.RemoteAddr) {
|
||||
ipList = append(ipList, accessLog.RemoteAddr)
|
||||
@@ -71,7 +71,7 @@ func (this *TodayAction) RunGet(params struct {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
if int64(len(prevResp.AccessLogs)) == size {
|
||||
if int64(len(prevResp.HttpAccessLogs)) == size {
|
||||
this.Data["lastRequestId"] = prevResp.RequestId
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ func (this *ViewPopupAction) RunGet(params struct {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
accessLog := accessLogResp.AccessLog
|
||||
accessLog := accessLogResp.HttpAccessLog
|
||||
if accessLog == nil {
|
||||
this.WriteString("not found: " + params.RequestId)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user