域名服务增加访问日志

This commit is contained in:
刘祥超
2021-06-02 11:53:08 +08:00
parent 201c3e2f97
commit b6fd9aeb14
25 changed files with 577 additions and 35 deletions

View File

@@ -53,11 +53,11 @@ func (this *LogAction) 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)
@@ -85,7 +85,7 @@ func (this *LogAction) RunGet(params struct {
this.ErrorPage(err)
return
}
if int64(len(prevResp.AccessLogs)) == size {
if int64(len(prevResp.HttpAccessLogs)) == size {
this.Data["lastRequestId"] = prevResp.RequestId
}
}