Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ internal/**/*.gen.go
.go/
/.cunzhi-memory
log-index/
*.prof
*.test
16 changes: 8 additions & 8 deletions api/nginx_log/analytics.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func GetLogPreflight(c *gin.Context) {
IndexStatus: result.IndexStatus,
}

logger.Debugf("Preflight response: log_path=%s, available=%v, index_status=%s",
logger.Debugf("Preflight response: log_path=%s, available=%v, index_status=%s",
logPath, result.Available, result.IndexStatus)

c.JSON(http.StatusOK, response)
Expand Down Expand Up @@ -178,7 +178,7 @@ func AdvancedSearchLogs(c *gin.Context) {
}

// Execute search with timeout
ctx, cancel := context.WithTimeout(c.Request.Context(), 30*time.Second)
ctx, cancel := context.WithTimeout(c.Request.Context(), 30*time.Minute)
defer cancel()

result, err := service.SearchLogs(ctx, queryReq)
Expand Down Expand Up @@ -368,14 +368,14 @@ func GetDashboardAnalytics(c *gin.Context) {
// Debug: Check time range from Bleve for this file
debugStart, debugEnd := service.GetTimeRangeFromSummaryStatsForPath(req.LogPath)
logger.Debugf("Bleve time range for %s - start=%v, end=%v", req.LogPath, debugStart, debugEnd)

// Debug: Log exact query parameters
queryRequest := &nginx_log.DashboardQueryRequest{
LogPath: req.LogPath,
StartTime: startTime.Unix(),
EndTime: endTime.Unix(),
}
logger.Debugf("Query parameters - LogPath='%s', StartTime=%v, EndTime=%v",
logger.Debugf("Query parameters - LogPath='%s', StartTime=%v, EndTime=%v",
queryRequest.LogPath, queryRequest.StartTime, queryRequest.EndTime)

// Get analytics from Bleve aggregations
Expand All @@ -387,16 +387,16 @@ func GetDashboardAnalytics(c *gin.Context) {
}

logger.Debugf("Successfully retrieved dashboard analytics from Bleve aggregations")

// Debug: Log summary of results
if analytics != nil {
logger.Debugf("Results summary - TotalUV=%d, TotalPV=%d, HourlyStats=%d, DailyStats=%d, TopURLs=%d",
analytics.Summary.TotalUV, analytics.Summary.TotalPV,
logger.Debugf("Results summary - TotalUV=%d, TotalPV=%d, HourlyStats=%d, DailyStats=%d, TopURLs=%d",
analytics.Summary.TotalUV, analytics.Summary.TotalPV,
len(analytics.HourlyStats), len(analytics.DailyStats), len(analytics.TopURLs))
} else {
logger.Debugf("Analytics result is nil")
}

c.JSON(http.StatusOK, analytics)
}

Expand Down
14 changes: 7 additions & 7 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"@simplewebauthn/browser": "^13.1.2",
"@uozi-admin/curd": "^4.10.5",
"@uozi-admin/request": "^2.8.4",
"@vue/reactivity": "^3.5.18",
"@vue/shared": "^3.5.18",
"@vue/reactivity": "^3.5.19",
"@vue/shared": "^3.5.19",
"@vueuse/components": "^13.7.0",
"@vueuse/core": "^13.7.0",
"@vueuse/integrations": "^13.7.0",
Expand All @@ -30,7 +30,7 @@
"@xterm/addon-fit": "^0.10.0",
"@xterm/xterm": "^5.5.0",
"ant-design-vue": "^4.2.6",
"apexcharts": "^5.3.3",
"apexcharts": "^5.3.4",
"axios": "^1.11.0",
"dayjs": "^1.11.13",
"echarts": "^6.0.0",
Expand All @@ -51,7 +51,7 @@
"unocss": "^66.4.2",
"uuid": "^11.1.0",
"vite-plugin-build-id": "0.5.0",
"vue": "^3.5.18",
"vue": "^3.5.19",
"vue-dompurify-html": "^5.3.0",
"vue-echarts": "^7.0.3",
"vue-router": "^4.5.1",
Expand All @@ -75,11 +75,11 @@
"@vitejs/plugin-legacy": "^7.2.1",
"@vitejs/plugin-vue": "^6.0.1",
"@vitejs/plugin-vue-jsx": "^5.0.1",
"@vue/compiler-sfc": "^3.5.18",
"@vue/compiler-sfc": "^3.5.19",
"@vue/tsconfig": "^0.8.1",
"ace-builds": "^1.43.2",
"autoprefixer": "^10.4.21",
"eslint": "^9.33.0",
"eslint": "^9.34.0",
"eslint-plugin-sonarjs": "^3.0.4",
"less": "^4.4.1",
"postcss": "^8.5.6",
Expand All @@ -90,6 +90,6 @@
"vite": "^7.1.3",
"vite-plugin-inspect": "^11.3.2",
"vite-svg-loader": "^5.1.0",
"vue-tsc": "^3.0.5"
"vue-tsc": "^3.0.6"
}
}
Loading
Loading