feat(dashboard): choose the time range of the overview charts (#7139)

Every overview chart gets the same range selector: 2m, 5m, 30m, 1h, 6h and 12h. The 2m default is the live trend the page already drew, one point per status poll, so nothing changes until a longer range is picked. A longer range is read from the server's stored rollups through the new GET /panel/api/server/overviewHistory/:bucket, which returns all eight overview series in one response, and is refreshed once per point, at most once a minute.

A metric the host cannot report stays empty in a ranged window instead of drawing zeros, a range change clears the chart rather than showing the old range under the new label, and avg/peak labels keep their number order in RTL locales.
This commit is contained in:
Mr Cortex
2026-11-25 01:04:29 +03:30
committed by GitHub
parent 142a1ab28e
commit 05e8f17268
23 changed files with 720 additions and 55 deletions
+1
View File
@@ -99,6 +99,7 @@ var monitorScopeAllow = map[string]struct{}{
"/server/status": {},
"/server/cpuHistory/:bucket": {},
"/server/history/:metric/:bucket": {},
"/server/overviewHistory/:bucket": {},
"/server/xrayMetricsState": {},
"/server/xrayMetricsHistory/:metric/:bucket": {},
"/server/xrayObservatory": {},