web日志查询增加修复以及日志数据持久化
This commit is contained in:
@@ -1247,6 +1247,8 @@ func (s *Server) handleLogsQuery(w http.ResponseWriter, r *http.Request) {
|
||||
offset := 0
|
||||
sortField := r.URL.Query().Get("sort")
|
||||
sortDirection := r.URL.Query().Get("direction")
|
||||
resultFilter := r.URL.Query().Get("result")
|
||||
searchTerm := r.URL.Query().Get("search")
|
||||
|
||||
if limitStr := r.URL.Query().Get("limit"); limitStr != "" {
|
||||
fmt.Sscanf(limitStr, "%d", &limit)
|
||||
@@ -1257,7 +1259,7 @@ func (s *Server) handleLogsQuery(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
// 获取日志数据
|
||||
logs := s.dnsServer.GetQueryLogs(limit, offset, sortField, sortDirection)
|
||||
logs := s.dnsServer.GetQueryLogs(limit, offset, sortField, sortDirection, resultFilter, searchTerm)
|
||||
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
json.NewEncoder(w).Encode(logs)
|
||||
|
||||
Reference in New Issue
Block a user