coolify/app/Livewire
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
..
Admin Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
Boarding feat(proxy): add Traefik version tracking with notifications and dismissible UI warnings 2025-11-18 14:53:49 +01:00
Destination 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
Notifications feat(proxy): add Traefik version tracking with notifications and dismissible UI warnings 2025-11-18 14:53:49 +01:00
Profile fix(user): ensure email attributes are stored in lowercase for consistency and prevent case-related issues 2025-09-05 17:44:34 +02:00
Project fix: remove unused variable in updatedBuildPack method 2025-11-18 14:53:48 +01:00
Security feat: add token validation functionality for Hetzner and DigitalOcean providers 2025-10-29 23:21:38 +01:00
Server refactor(proxy): implement centralized caching for versions.json and improve UX 2025-11-18 14:53:49 +01:00
Settings fix: correct event class names in callEventOnFinish 2025-11-14 10:43:20 +01:00
SharedVariables 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
Source/Github fix: change app_id and installation_id to integer values in createGithubAppManually method 2025-10-26 09:27:21 +01:00
Storage feat: streamline S3 restore with single-step flow and improved UI consistency 2025-11-17 10:05:18 +01:00
Subscription feat(changelog): implement automated changelog fetching from GitHub and enhance changelog read tracking 2025-08-12 10:07:11 +02:00
Tags Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
Team Merge branch 'next' into andrasbacsai/livewire-model-binding 2025-10-16 11:05:29 +02:00
Terminal feat: replace terminal dropdown with searchable datalist component 2025-10-12 14:57:45 +02:00
ActivityMonitor.php fix: revert to original dispatch approach with unique wire:key per monitor 2025-11-14 10:43:20 +01:00
Dashboard.php ui(core): update projects property type and enhance UI styling 2025-10-01 08:23:35 +02:00
DeploymentsIndicator.php refactor(deployment): enhance deployment data retrieval and relationships 2025-10-04 18:02:20 +02:00
ForcePasswordReset.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
GlobalSearch.php fix: 'new image' quick action not progressing to resource selection 2025-10-15 10:49:07 +02:00
Help.php fix(feedback): update feedback email address to improve communication with users 2025-09-11 20:23:07 +02:00
LayoutPopups.php Fix styling 2024-06-10 20:43:34 +00:00
MonacoEditor.php Merge branch 'next' into andrasbacsai/livewire-model-binding 2025-10-16 11:05:29 +02:00
NavbarDeleteTeam.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
SettingsBackup.php fix validation on a few views 2025-10-06 21:25:24 +02:00
SettingsDropdown.php feat(ui): display current version in settings dropdown and update UI accordingly 2025-09-01 16:23:14 +02:00
SettingsEmail.php fix(email-notifications): change notify method to notifyNow for immediate test email delivery 2025-06-04 17:10:06 +02:00
SettingsOauth.php fix: add null checks and validation to OAuth bulk update method 2025-10-27 17:04:33 +01:00
SwitchTeam.php fix(ui): always redirect to dashboard after team switch 2025-02-03 21:38:40 +01:00
Upgrade.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00
VerifyEmail.php Revert "rector: arrrrr" 2025-01-07 15:31:43 +01:00