feat: 统计页支持一年时段和按日趋势

在线人数在新的有效访问后尽快刷新,历史查询保留一年并画出每日连接数。
This commit is contained in:
nixevol
2026-09-28 11:08:28 +08:00
parent 28170a7fe2
commit fe24a88bac
12 changed files with 358 additions and 36 deletions
+3 -1
View File
@@ -255,5 +255,7 @@ func (a *App) handleTile(w http.ResponseWriter, r *http.Request) {
}
ip := clientIP(r, a.cfg.TrustProxy)
fp := fingerprint(a.salt, ip, r.UserAgent())
a.rec.Record(a.now(), tp.table, hadSID, fp)
if a.rec.Record(a.now(), tp.table, hadSID, fp) {
a.pokeOnline()
}
}