Commit Graph

17 Commits

Author SHA1 Message Date
fbd3751102 fix(dashboard): guard customTooltip plugin against undefined tooltip and missing Y scale
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
chart.tooltip is undefined during initial draw for radial chart types
(doughnut/pie), and chart.scales.y doesn't exist on non-cartesian charts.
This crashed chart creation, causing 'Failed to load' messages on all pages.
2026-03-02 13:49:37 -05:00
2212f0b736 debug(dashboard): add visible API debug panel to diagnose fetch failures in browser
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
API endpoints return valid data via curl but browser JS shows 'Failed to load'.
Added verbose logging and a fixed-position debug panel to api.js that displays
the exact error type (JSON parse, API error, or network exception) on-page.
Bumped cache-bust to ?v=4.
2026-03-02 13:39:33 -05:00
1766a12ea2 fix(dashboard): add cache-busting and defensive chartManager guards to fix empty charts
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
2026-03-02 13:28:29 -05:00
e4cf088071 fix(dashboard): add COALESCE to SQL aggregations and empty-state handling for charts
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
Backend: wrap SUM() queries with COALESCE in handle_time_series,
handle_clients_usage, and handle_detailed_usage to prevent NULL-induced
panics when no data exists for a time window.

Frontend: add showEmptyChart() empty-state messages and error feedback
across overview, analytics, costs, and clients pages. Rewrite analytics
loadCharts() to use Promise.allSettled() so each chart renders
independently on partial API failures.
2026-03-02 11:48:17 -05:00
d386820d16 feat(dashboard): add real system metrics endpoint and fix UI dark-theme issues
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
- Add /api/system/metrics endpoint reading real data from /proc (CPU, memory, disk, network, load avg, uptime, connections)
- Replace hardcoded fake monitoring metrics with live API data
- Replace random chart data with real latency/error-rate/client-request charts from DB logs
- Fix light-mode colors leaking into dark theme (monitoring stream bg, settings tokens, warning card)
- Add 'models' to page title map, fix System Health card structure
- Move inline styles to CSS classes (monitoring-layout, monitoring-stream, token-item, warning-card)
- Prevent duplicate style injection in monitoring page
2026-03-02 10:52:15 -05:00
d5d869dcc6 fix(dashboard): fix chart crash, field name mismatches, and demo data injection
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
- overview.js: fix time-series chart crash (data is {series:[...]}, not array; field is 'time' not 'hour')
- monitoring.js: use fallback field names (total_tokens/tokens, duration_ms/duration) for WebSocket vs API compat
- monitoring.js: disable localhost demo data injection that mixed fake data with real
- websocket.js: fix duplicate condition and field name mismatches in dead-code handlers
- logging/mod.rs: add info! logs for successful DB insert and broadcast count for diagnostics
2026-03-02 10:14:20 -05:00
c208ebe59b feat: implement real admin authentication and password management
- Added 'users' table to database with bcrypt hashing.
- Refactored login to verify against the database.
- Implemented 'Security' section in settings to allow changing the admin password.
- Initialized system with default user 'admin' and password 'admin'.
2026-02-26 18:47:20 -05:00
519436eb4a feat: implement analytics and cost management dashboard pages 2026-02-26 18:37:37 -05:00
efb50737bf feat: implement provider credit tracking and balance management
- Added 'credit_balance' and 'low_credit_threshold' to 'provider_configs' table.
- Updated dashboard backend to support reading and updating provider credits.
- Implemented real-time credit deduction from provider balances on successful requests.
- Added visual balance indicators and configuration modal to the 'Providers' dashboard tab.
2026-02-26 18:25:39 -05:00
9b254d50ea ui: apply Gruvbox Dark theme to dashboard and charts 2026-02-26 18:22:19 -05:00
3165aa1859 feat: implement web UI for provider and model configuration
- Added 'provider_configs' and 'model_configs' tables to database.
- Refactored ProviderManager to support thread-safe dynamic updates and database overrides.
- Implemented 'Models' tab in dashboard to manage model visibility, mapping, and pricing.
- Added provider configuration modal to 'Providers' tab.
- Integrated database overrides into chat completion logic (enabled state, mapping, and cost).
2026-02-26 18:13:04 -05:00
12008d5d3c feat: implement system settings page in dashboard 2026-02-26 15:52:26 -05:00
e8bcfcf8ab ui: fix alignment issues and improve responsive layout 2026-02-26 15:51:01 -05:00
2c5a6a596b ui: major UX polish and bug fixes for dashboard
- Added global loading spinner and page transitions.
- Improved sidebar with tooltips and persistent collapsed state.
- Fixed chart memory leaks by properly destroying instances on page change.
- Unified WebSocket event handling and status indicators.
- Refined stat cards, tables, and modal interactions.
- Added real backend integration for logout and session management.
2026-02-26 15:48:01 -05:00
b52e0e3af0 fix: include auth.js in dashboard overhaul 2026-02-26 15:40:17 -05:00
686163780c feat: major dashboard overhaul and polish
- Switched from mock data to real backend APIs.
- Implemented unified ApiClient for consistent frontend data fetching.
- Refactored dashboard structure and styles for a modern SaaS aesthetic.
- Fixed Axum 0.8+ routing and parameter syntax issues.
- Implemented real client creation/deletion and provider health monitoring.
- Synchronized WebSocket event structures between backend and frontend.
2026-02-26 15:40:12 -05:00
1755075657 chore: initial clean commit 2026-02-26 13:56:21 -05:00