coolify/app/Jobs
Andras Bacsai 7dfe33d1c9 refactor(proxy): implement centralized caching for versions.json and improve UX
This commit introduces several improvements to the Traefik version tracking
feature and proxy configuration UI:

## Caching Improvements

1. **New centralized helper functions** (bootstrap/helpers/versions.php):
   - `get_versions_data()`: Redis-cached access to versions.json (1 hour TTL)
   - `get_traefik_versions()`: Extract Traefik versions from cached data
   - `invalidate_versions_cache()`: Clear cache when file is updated

2. **Performance optimization**:
   - Single Redis cache key: `coolify:versions:all`
   - Eliminates 2-4 file reads per page load
   - 95-97.5% reduction in disk I/O time
   - Shared cache across all servers in distributed setup

3. **Updated all consumers to use cached helpers**:
   - CheckTraefikVersionJob: Use get_traefik_versions()
   - Server/Proxy: Two-level caching (Redis + in-memory per-request)
   - CheckForUpdatesJob: Auto-invalidate cache after updating file
   - bootstrap/helpers/shared.php: Use cached data for Coolify version

## UI/UX Improvements

1. **Navbar warning indicator**:
   - Added yellow warning triangle icon next to "Proxy" menu item
   - Appears when server has outdated Traefik version
   - Uses existing traefik_outdated_info data for instant checks
   - Provides at-a-glance visibility of version issues

2. **Proxy sidebar persistence**:
   - Fixed sidebar disappearing when clicking "Switch Proxy"
   - Configuration link now always visible (needed for proxy selection)
   - Dynamic Configurations and Logs only show when proxy is configured
   - Better navigation context during proxy switching workflow

## Code Quality

- Added comprehensive PHPDoc for Server::$traefik_outdated_info property
- Improved code organization with centralized helper approach
- All changes formatted with Laravel Pint
- Maintains backward compatibility

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 14:53:49 +01:00
..
ApplicationDeploymentJob.php fix(deployment): improve error logging with exception types and hidden technical details 2025-11-17 14:44:39 +01:00
ApplicationPullRequestUpdateJob.php Merge branch 'next' into feat/update-applicationpullrequestupdatejob-documentation 2025-10-15 00:59:02 +02:00
CheckAndStartSentinelJob.php fix: add timeout to sentinel process checks for improved reliability 2025-01-10 13:03:47 +01:00
CheckForUpdatesJob.php refactor(proxy): implement centralized caching for versions.json and improve UX 2025-11-18 14:53:49 +01:00
CheckHelperImageJob.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
CheckTraefikVersionForServerJob.php feat(proxy): enhance Traefik version notifications to show patch and minor upgrades 2025-11-18 14:53:49 +01:00
CheckTraefikVersionJob.php refactor(proxy): implement centralized caching for versions.json and improve UX 2025-11-18 14:53:49 +01:00
CleanupHelperContainersJob.php fix(deployment): prevent base deployments from being killed when PRs close (#7113) 2025-11-09 14:41:35 +01:00
CleanupInstanceStuffsJob.php feat(email): implement email change request and verification process 2025-08-18 14:54:08 +02:00
CleanupStaleMultiplexedConnections.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
CoolifyTask.php feat: streamline S3 restore with single-step flow and improved UI consistency 2025-11-17 10:05:18 +01:00
DatabaseBackupJob.php fix: improve robustness and security in database restore flows 2025-11-17 14:13:10 +01:00
DeleteResourceJob.php Update app/Jobs/DeleteResourceJob.php 2025-11-11 11:35:30 +01:00
DockerCleanupJob.php fix(docker): volumes get delete when stopping a service if Delete Unused Volumes is activated (#6317) 2025-08-04 21:15:56 +02:00
GithubAppPermissionJob.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
NotifyOutdatedTraefikServersJob.php feat(proxy): enhance Traefik version notifications to show patch and minor upgrades 2025-11-18 14:53:49 +01:00
PullChangelog.php refactor(jobs): pull github changelogs from cdn instead of github 2025-09-01 16:13:55 +02:00
PullTemplatesFromCDN.php refactor(templates): update service template file handling to use dynamic file name from constants 2025-08-12 10:06:19 +02:00
PushServerUpdateJob.php fix(docker): enhance container status aggregation for multi-container applications, including exclusion handling based on docker-compose configuration 2025-09-13 20:32:15 +02:00
RegenerateSslCertJob.php refactor: replace direct SslCertificate queries with server relationship methods for consistency 2025-10-09 17:00:05 +02:00
RestartProxyJob.php feat(proxy): add Traefik version tracking with notifications and dismissible UI warnings 2025-11-18 14:53:49 +01:00
ScheduledJobManager.php feat(jobs): improve scheduled tasks with retry logic and queue cleanup 2025-11-10 11:11:18 +01:00
ScheduledTaskJob.php fix(ScheduledTaskJob): make server property nullable and update logging to handle null values 2025-11-11 15:38:55 +01:00
SendMessageToDiscordJob.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
SendMessageToPushoverJob.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
SendMessageToSlackJob.php feat(slack): Show message title in notification previews (#5063) 2025-02-11 16:31:37 +01:00
SendMessageToTelegramJob.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
SendWebhookJob.php feat: implement actual webhook delivery with Ray debugging 2025-10-10 18:07:04 +02:00
ServerCheckJob.php fix(jobs): update middleware to use expireAfter for WithoutOverlapping in multiple job classes 2025-07-01 10:50:27 +02:00
ServerCleanupMux.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
ServerConnectionCheckJob.php fix: improve error logging and handling in ServerConnectionCheckJob for Hetzner server status 2025-10-10 10:12:59 +02:00
ServerFilesFromServerJob.php fix: make sure important jobs/actions are running on high prio queue 2024-11-22 11:16:01 +01:00
ServerLimitCheckJob.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
ServerManagerJob.php fix(deployment): improve error logging with exception types and hidden technical details 2025-11-17 14:44:39 +01:00
ServerPatchCheckJob.php fix(jobs): update middleware to use expireAfter for WithoutOverlapping in multiple job classes 2025-07-01 10:50:27 +02:00
ServerStorageCheckJob.php fix(horizon): add silenced jobs 2025-07-12 14:44:32 +02:00
ServerStorageSaveJob.php fix: make sure important jobs/actions are running on high prio queue 2024-11-22 11:16:01 +01:00
StripeProcessJob.php feat(stripe): enhance subscription handling and verification process 2025-09-23 11:00:38 +02:00
SubscriptionInvoiceFailedJob.php refactor(stripe-jobs): comment out internal notification calls and add subscription status verification before sending failure notifications 2025-09-13 19:35:32 +02:00
UpdateCoolifyJob.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
UpdateStripeCustomerEmailJob.php feat(email): implement email change request and verification process 2025-08-18 14:54:08 +02:00
ValidateAndInstallServerJob.php work work on hetzner integration 2025-10-09 16:54:13 +02:00
VerifyStripeSubscriptionStatusJob.php fix(subscription-job): enhance retry logic for VerifyStripeSubscriptionStatusJob 2025-09-23 18:17:52 +02:00
VolumeCloneJob.php feat: remote server volume cloning 2025-01-13 11:13:15 +01:00