Commit Graph
31 Commits
Author SHA1 Message Date
Cursor Agentanddb2002dominic e85f7660ba feat: Add logs and usage tracking to admin UI
This commit introduces new endpoints and UI components for viewing system logs and usage metrics. It includes:

- **Backend changes:**
    - New API endpoints in `admin.py` for fetching logs, usage metrics, summary statistics, error details, and revenue by model.
    - A new `LogManager` class in `log_manager.py` to handle log file parsing and data aggregation.
    - Updates to `logging.py` to document critical log messages used for usage tracking.
    - Routing for the new UI pages in `main.py`.

- **Frontend changes:**
    - New pages for Logs (`ui/app/logs/page.tsx`) and Usage (`ui/app/usage/page.tsx`).
    - Components for displaying log entries, filters, details dialogs, usage charts, summary cards, error tables, and revenue tables.
    - Updates to `app-sidebar.tsx` to include links to the new pages.
    - Styling adjustments in `globals.css`.

These changes provide administrators with valuable insights into system activity and performance.

Co-authored-by: db2002dominic <db2002dominic@gmail.com>
2025-11-22 02:03:18 +00:00
9qeklajc cfe03d6dcb remove redundant setting & doc 2025-11-10 22:59:32 +01:00
9qeklajc 8c08be9e11 better ui 2025-11-05 00:12:23 +01:00
9qeklajc f5c9cde852 clean up 2025-11-04 23:46:38 +01:00
9qeklajc ded82cd729 fix model endpoint & filter query 2025-11-04 23:16:08 +01:00
9qeklajc 1b6188b130 better model update 2025-11-02 23:42:18 +01:00
Shroominic 293f8471b3 add: msat/sat/usd unit toggle 2025-11-02 13:34:57 +08:00
Shroominic a88f999dc5 add Node to title 2025-10-30 12:38:51 +08:00
9qeklajc d8d91ab57b better balance display 2025-10-26 00:39:36 +02:00
9qeklajc 8b0ced22e5 add dark mode 2025-10-25 00:21:41 +02:00
9qeklajc 8bb1e0d321 fix mobile view 2025-10-25 00:16:14 +02:00
9qeklajc 2c507796eb fix build 2025-10-24 22:25:16 +02:00
9qeklajc 430bf8a610 clean up 2025-10-24 22:11:40 +02:00
9qeklajc cf9a6d83ff add model filtering 2025-10-24 22:04:58 +02:00
9qeklajc 82e01e3e13 add temp balances 2025-10-24 21:31:35 +02:00
9qeklajc 65a211388e move to different repo 2025-10-24 19:56:56 +02:00
9qeklajc 014eba550d clean up 2025-10-24 17:56:41 +02:00
9qeklajc 86e4b99297 use different endpoint for models 2025-10-24 17:19:15 +02:00
9qeklajc f3e8718660 fix icon 2025-10-24 15:55:48 +02:00
9qeklajc e146b4a08a better passwrod setting 2025-10-24 15:22:45 +02:00
9qeklajc 57cace0e77 better setting ui 2025-10-24 14:37:56 +02:00
9qeklajc 90f56357d9 fmt 2025-10-24 14:20:27 +02:00
9qeklajc 793f33efb4 add settings 2025-10-24 13:53:32 +02:00
9qeklajc 769ad00e42 better price validation 2025-10-24 13:43:28 +02:00
9qeklajc 3716184ea9 clean up 2025-10-24 13:11:05 +02:00
9qeklajc 5f38f1a36b add delete and disable options 2025-10-24 13:06:39 +02:00
9qeklajc b85b81ac22 update input 2025-10-24 12:49:10 +02:00
9qeklajc 307e81bd61 fix model update 2025-10-24 12:37:11 +02:00
9qeklajc 65c19bc375 clean up 2025-10-24 11:50:45 +02:00
9qeklajc 3420ac73d7 fmt 2025-10-23 20:09:07 +02:00
9qeklajc 4d28586d13 add ui code 2025-10-21 22:07:47 +02:00