Commit Graph

6 Commits

Author SHA1 Message Date
13805a47be fix: refactor time range to single source of truth with correct dates
- Default range changed from 30d to 7d
- Presets (today/7d/30d) now directly set customStart/customEnd dates,
  eliminating duplicate getTimeRange() calculation
- "All" preset fetches actual data boundaries from /api/date-range
  and backfills the custom date picker
- Clicking "custom" opens popover without triggering data refresh;
  only confirm applies changes
- SQL trend dates cast to ::text to avoid pg driver Date timezone offset
- Fix created_at filter from < to <= for end timestamp
2026-04-07 16:22:18 +08:00
918a615793 fix: locale toggle shows current language, date inputs respect locale
- Language switcher now displays current locale (中文/English) instead of target
- Add lang attribute to date inputs for proper localization of native date picker
2026-04-07 15:30:25 +08:00
9bb36432ba feat: global time range context with custom date picker
Lift time range state into a shared React context so the selected
range persists across page navigation and browser refreshes
(localStorage). Add a "Custom" option with a popover date picker
that lets users specify arbitrary start/end dates. All preset end
times now use endOf("day") (23:59:59) instead of the current moment.
2026-04-07 14:49:58 +08:00
cc66034e59 feat: sync embedded analytics theme with parent app 2026-04-02 20:11:33 +08:00
1b5977a420 feat: add hidden /portal page for SinoCode iframe embedding
Full-screen landing page with glassmorphism cards linking to monitoring
(8018), docs (8017), and analytics (8019). Sidebar is conditionally
hidden on the portal route. Supports dark/light themes and i18n.
2026-04-02 19:30:32 +08:00
b719b358f8 feat: API analytics dashboard with i18n and theme support
Next.js full-stack analytics dashboard for new-api.
- Direct PostgreSQL readonly queries on logs table
- 5 pages: Dashboard, Rankings, Aggregation, Logs, Detail
- Dark/Light/System theme with CSS variables
- Chinese/English i18n (default Chinese)
- Recharts with dual Y-axis for input/output tokens
- Lucide icons + Motion animations
- Docker + docker-compose with external sinobridge network, port 8019
2026-04-02 12:47:50 +08:00