Stu Mason · Folkestone, Kent
One entryMerged PR· StuMason/laravel-coolify· PHP

PR #50 merged: fix: dashboard not showing resources and environment

additions
+261
deletions
-252
files changed
13

Summary

  • Fixes dashboard showing "Unknown" for database and cache resources
  • Fixes sidebar showing "No environment" instead of "production"

Changes

  • DashboardStatsController now fetches databases from environment endpoint (/projects/{uuid}/production) instead of global /databases endpoint which was incomplete
  • Added fallback to check global databases filtered by environment_id to catch Dragonfly/KeyDB not included in environment response (Coolify API quirk)
  • Simplified EnvironmentSwitcher to use stats.environment data instead of making separate API call

Test plan

  • All tests pass (230 tests)
  • Lint passes
  • Tested with devtrends app - dashboard now shows:
    • Environment: production
    • Primary DB: devtrends-db (PostgreSQL)
    • Redis/Cache: devtrends-cache (Dragonfly)