Skip to content

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

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

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
Contributor

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

CLAassistant commented May 23, 2026

CLA assistant check
All committers have signed the CLA.

@AjdinDev AjdinDev marked this pull request as ready for review May 23, 2026 12:57
@ericwang401 ericwang401 self-assigned this May 27, 2026
@ericwang401
Copy link
Copy Markdown
Collaborator

Thanks for the pr! I will look at this as soon as possible, but in the meantime, please sign the contributor license agreement!

@AjdinDev
Copy link
Copy Markdown
Contributor Author

@ericwang401 The commits are created by my corporate email which is not linked to my Github meaning I can't sign the CLA :(

I will close this PR and create a new one soon with fresh commits using my right email.

@AjdinDev
Copy link
Copy Markdown
Contributor Author

@ericwang401 should be fixed now

@ericwang401
Copy link
Copy Markdown
Collaborator

merged in #154

pull Bot pushed a commit to KornaLaravel/laravel-convoy-panel that referenced this pull request May 29, 2026
Adds /api/admin/overview returning cached aggregate metrics for servers,
nodes, capacity, addresses, backups, and ISOs, plus a refreshed admin
dashboard UI consuming it via SWR.

Refactored from ConvoyPanel#153:
- Split OverviewService into focused per-section methods over a single
  orchestrator, dropping the monolithic freshMetrics()
- Dropped the recent-activity panel and supporting index migration —
  ActivityLog has no writers in the codebase, so the panel always
  rendered empty
- Removed the 999.99 percent cap; overallocation is a legitimate state
  and the frontend already clamps bar width
- Added capacity byte-conversion and restoring-bucket test cases

Co-Authored-By: Ajdin <AjdinDev@users.noreply.github.com>
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.

3 participants