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>