Skip to content

feat: implement admin overview dashboard with metrics and API endpoint#153

Open
AjdinDev wants to merge 1 commit into
ConvoyPanel:developfrom
cloudnovi:develop
Open

feat: implement admin overview dashboard with metrics and API endpoint#153
AjdinDev wants to merge 1 commit into
ConvoyPanel:developfrom
cloudnovi:develop

Conversation

@AjdinDev
Copy link
Copy Markdown

This pull request introduces a new admin dashboard overview endpoint that provides real-time metrics and recent activity for administrators. It includes the backend API, data aggregation and transformation logic, frontend API integration, and supporting database and localization changes. The implementation is covered by feature tests and includes performance improvements via new database indexes.

Backend API and Data Aggregation:

  • Added a new OverviewController and OverviewService to aggregate and serve admin dashboard metrics, including server statuses, resource allocation, address usage, backup and ISO statistics, per-node metrics, and recent activity. Results are cached for 15 seconds for efficiency.
  • Implemented OverviewTransformer to format the aggregated metrics for API responses, ensuring consistent and structured output.
  • Registered the new API route at /api/admin/overview for accessing the overview data.

Frontend Integration:

  • Added TypeScript interfaces and data transformation logic in getOverview.ts to consume and type the new API endpoint in the admin dashboard frontend.
  • Introduced a SWR hook useOverviewSWR.ts for efficient, auto-refreshing data fetching on the dashboard (refreshes every 10 seconds).

Performance and Localization:

  • Added database indexes on the activity_logs.timestamp and servers.status columns to improve query performance for dashboard metrics.
  • Added English localization strings for the dashboard overview panel and its UI elements.

Testing:

  • Added feature tests to verify correct metrics aggregation, API response structure, and admin-only access restrictions for the new endpoint.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Ajdin Lokvancic (TME) seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@AjdinDev AjdinDev marked this pull request as ready for review May 23, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants