coolify/app/Models
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
..
Application.php refactor: simplify environment variable deletion logic in booted method 2025-11-18 14:53:48 +01:00
ApplicationDeploymentQueue.php refactor(deployment): enhance deployment data retrieval and relationships 2025-10-04 18:02:20 +02:00
ApplicationPreview.php fix(previews): simplify FQDN generation logic by removing unnecessary empty check 2025-08-28 10:11:56 +02:00
ApplicationSetting.php feat: Update ApplicationSetting model to include additional boolean casts 2025-11-04 08:43:33 +01:00
BaseModel.php refactor: rename name method to sanitizedName in BaseModel for clarity 2024-12-10 08:50:07 +01:00
CloudInitScript.php refactor: improve cloud-init script UX and remove description field 2025-10-11 11:16:28 +02:00
CloudProviderToken.php improved hetzner features 2025-10-09 12:53:57 +02:00
DiscordNotificationSettings.php feat(proxy): add Traefik version tracking with notifications and dismissible UI warnings 2025-11-18 14:53:49 +01:00
DockerCleanupExecution.php feat: DB and Model for docker cleanup executions 2025-01-15 17:11:15 +01:00
EmailNotificationSettings.php feat(proxy): add Traefik version tracking with notifications and dismissible UI warnings 2025-11-18 14:53:49 +01:00
Environment.php refactor(global-search, environment): streamline environment retrieval with new query method 2025-10-08 19:58:36 +02:00
EnvironmentVariable.php feat(environment): replace is_buildtime_only with is_runtime and is_buildtime flags for environment variables, updating related logic and views 2025-09-18 18:14:54 +02:00
GithubApp.php fixed github app deleting private key when it is used by other resources 2025-10-30 01:16:59 +05:30
GitlabApp.php fix: access team's github apps only 2024-10-24 13:28:31 +02:00
InstanceSettings.php fix: remove PullHelperImageJob and mass server scheduling 2025-11-14 11:31:08 +01:00
LocalFileVolume.php feat(storage): add read-only volume handling and UI notifications 2025-10-03 20:05:43 +02:00
LocalPersistentVolume.php feat(storage): add read-only volume handling and UI notifications 2025-10-03 20:05:43 +02:00
OauthSetting.php feat(auth): Add Clerk OAuth Provider (#5553) 2025-06-18 14:29:46 +02:00
PersonalAccessToken.php Fix styling 2024-06-10 20:43:34 +00:00
PrivateKey.php Improve SSH key filtering and datalist component 2025-10-23 16:18:20 +02:00
Project.php feat(global-search): integrate projects and environments into global search functionality 2025-09-30 13:37:03 +02:00
ProjectSetting.php feat: initial api endpoints 2024-02-16 21:56:38 +01:00
PushoverNotificationSettings.php feat(proxy): add Traefik version tracking with notifications and dismissible UI warnings 2025-11-18 14:53:49 +01:00
S3Storage.php feat(validation): centralize validation patterns for names and descriptions 2025-08-19 12:14:48 +02:00
ScheduledDatabaseBackup.php fix(models): update sorting of scheduled database backups to order by creation date instead of name 2025-09-26 08:24:38 +02:00
ScheduledDatabaseBackupExecution.php feat(backup): enhance backup job with S3 upload handling and notifications 2025-10-07 15:02:23 +02:00
ScheduledTask.php feat(jobs): improve scheduled tasks with retry logic and queue cleanup 2025-11-10 11:11:18 +01:00
ScheduledTaskExecution.php feat(jobs): improve scheduled tasks with retry logic and queue cleanup 2025-11-10 11:11:18 +01:00
Server.php refactor(proxy): implement centralized caching for versions.json and improve UX 2025-11-18 14:53:49 +01:00
ServerSetting.php Changes auto-committed by Conductor 2025-10-16 09:51:37 +02:00
Service.php fix: guard against null or empty docker compose in saveComposeConfigs method 2025-11-07 14:14:43 +01:00
ServiceApplication.php refactor: streamline required port retrieval in EditDomain and ServiceApplicationView; add environment_variables method in ServiceApplication 2025-11-10 14:15:53 +01:00
ServiceDatabase.php feat(ServiceDatabase): add support for TimescaleDB detection and database type identification 2025-11-12 00:36:38 +01:00
SharedEnvironmentVariable.php feat(acl): Change views/backend code to able to use proper ACL's later on. Currently it is not enabled. 2025-08-26 10:27:38 +02:00
SlackNotificationSettings.php feat(proxy): add Traefik version tracking with notifications and dismissible UI warnings 2025-11-18 14:53:49 +01:00
SslCertificate.php fix(ssl): when regenerating SSL certs the cert is not singed with the new CN 2025-02-07 19:36:52 +01:00
StandaloneClickhouse.php fix(database): prevent malformed URLs when server IP is empty 2025-10-27 11:46:24 +01:00
StandaloneDocker.php feat(validation): centralize validation patterns for names and descriptions 2025-08-19 12:14:48 +02:00
StandaloneDragonfly.php fix(database): prevent malformed URLs when server IP is empty 2025-10-27 11:46:24 +01:00
StandaloneKeydb.php fix(database): prevent malformed URLs when server IP is empty 2025-10-27 11:46:24 +01:00
StandaloneMariadb.php fix(database): prevent malformed URLs when server IP is empty 2025-10-27 11:46:24 +01:00
StandaloneMongodb.php fix(database): prevent malformed URLs when server IP is empty 2025-10-27 11:46:24 +01:00
StandaloneMysql.php fix(database): prevent malformed URLs when server IP is empty 2025-10-27 11:46:24 +01:00
StandalonePostgresql.php fix(database): prevent malformed URLs when server IP is empty 2025-10-27 11:46:24 +01:00
StandaloneRedis.php fix(database): prevent malformed URLs when server IP is empty 2025-10-27 11:46:24 +01:00
Subscription.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
SwarmDocker.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
Tag.php feat(validation): centralize validation patterns for names and descriptions 2025-08-19 12:14:48 +02:00
Team.php feat(proxy): add Traefik version tracking with notifications and dismissible UI warnings 2025-11-18 14:53:49 +01:00
TeamInvitation.php Update app/Models/TeamInvitation.php 2025-09-25 11:33:32 +02:00
TelegramNotificationSettings.php feat(proxy): add Traefik version tracking with notifications and dismissible UI warnings 2025-11-18 14:53:49 +01:00
User.php Changes auto-committed by Conductor 2025-10-17 23:04:24 +02:00
UserChangelogRead.php feat(changelog): implement automated changelog fetching from GitHub and enhance changelog read tracking 2025-08-12 10:07:11 +02:00
WebhookNotificationSettings.php feat(proxy): add Traefik version tracking with notifications and dismissible UI warnings 2025-11-18 14:53:49 +01:00