mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-08-09 11:04:36 +00:00
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>
This is a Next.js project bootstrapped with create-next-app.
Getting Started
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
Learn More
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
Deploy on Vercel
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.