feat(dashboard): add time-frame filtering and used-models-only pricing
Some checks failed
CI / Check (push) Has been cancelled
CI / Clippy (push) Has been cancelled
CI / Formatting (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Release Build (push) Has been cancelled

- All usage endpoints now accept ?period=today|24h|7d|30d|all|custom
  with optional &from=ISO&to=ISO for custom ranges
- Time-series chart adapts granularity: hourly for today/24h, daily for
  7d/30d/all
- Analytics and Costs pages have period selector buttons with custom
  date-range picker
- Pricing table on Costs page now only shows models that have actually
  been used (GET /models?used_only=true)
- Cache-bust version bumped to v=6
This commit is contained in:
2026-03-02 15:29:23 -05:00
parent 54c45cbfca
commit 5bf41be343
7 changed files with 498 additions and 144 deletions

View File

@@ -1069,6 +1069,28 @@ body {
font-size: 0.75rem;
}
/* Period Selector */
.period-selector {
display: flex;
gap: 0.25rem;
flex-wrap: wrap;
}
.period-selector .btn.active {
background: var(--blue);
color: var(--bg0);
border-color: var(--blue);
}
.input-sm {
padding: 0.35rem 0.5rem;
font-size: 0.8rem;
background: var(--bg1);
border: 1px solid var(--bg3);
border-radius: 4px;
color: var(--fg1);
}
/* Toast Container */
.toast-container {
position: fixed;