mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 06:17:36 +00:00
feat(ui): toggle Server Timing HUD and link missing env badge
Add a local-only command palette action to show/hide the Server Timing HUD via localStorage and a visibility event. Make the service heading "Required variables missing" badge link to environment variables, with tests covering both behaviors.
This commit is contained in:
1 parent
fd6dbd5863
commit
d68b198d53
6 files changed
+93
-2
No files matched your search
@@ -214,3 +214,16 @@ test('SERVER_TIMING_ENABLED can force server_timing on or off regardless of APP_
|
||||
expect($resolve('0', 'local'))->toBeFalse();
|
||||
expect($resolve('off', 'local'))->toBeFalse();
|
||||
});
|
||||
test('server timing HUD can be toggled from the development command center', function () {
|
||||
$hud = file_get_contents(resource_path('views/components/server-timing-hud.blade.php'));
|
||||
$commandCenter = file_get_contents(resource_path('views/livewire/global-search.blade.php'));
|
||||
|
||||
expect($hud)
|
||||
->toContain('coolify.serverTimingHud.enabled')
|
||||
->toContain('server-timing-hud-visibility-changed')
|
||||
->and($commandCenter)
|
||||
->toContain("app()->environment('local')")
|
||||
->toContain('Toggle Server Timing HUD')
|
||||
->toContain("localStorage.setItem('coolify.serverTimingHud.enabled'")
|
||||
->toContain("window.dispatchEvent(new CustomEvent('server-timing-hud-visibility-changed'))");
|
||||
});
|
||||
Reference in new issue
Block a user