mirror of
https://github.com/coollabsio/coolify.git
synced 2026-10-29 10:04:36 +08:00
Add a /dashboard/canvas page that renders every team server with its resources and their running or queued deployments, backed by a new ServerCanvasController::dashboard endpoint and a per-server usage endpoint for zone headers. The dashboard remembers the list/canvas choice and each section (projects, servers) its own table/grid view. - Show Deploying/Queued pills on canvas cards and a foldable recent deployments panel; add shared CanvasControls component - Allow backup downloads from the server host via the S3 download storage (PrepareFileDownloadJob accepts a null container) - Extract backup toggle/run actions into ManagesDatabaseBackup and surface them in backup execution headers; merge S3 and retention sections into the general backup settings - Move deployments indicator to the top bar and add a main nav resource menu with submenus; simplify breadcrumbs and settings layouts - Add shared variables overview canvas and scheduled task modals - Add feature tests for dashboard canvas, view modes, navbar submenus, backup S3 downloads and scheduled task modals
48 lines
2.1 KiB
PHP
48 lines
2.1 KiB
PHP
<?php
|
|
|
|
it('does not key nested Livewire components by mutable list positions', function () {
|
|
$postgresView = file_get_contents(resource_path('views/livewire/project/database/postgresql/general.blade.php'));
|
|
$proxyView = file_get_contents(resource_path('views/livewire/server/proxy/dynamic-configurations.blade.php'));
|
|
|
|
expect($postgresView)
|
|
->toContain(':wire:key="\'init-script-\'.md5($script[\'filename\'])"')
|
|
->not->toContain(':wire:key="$script[\'index\']"');
|
|
|
|
expect($proxyView)
|
|
->toContain('wire:key="proxy-navbar-{{ $fileName }}"')
|
|
->not->toContain('wire:key="{{ $fileName }}-{{ $loop->index }}"');
|
|
});
|
|
|
|
it('keeps editable and refreshed list row keys independent of their positions', function () {
|
|
$applicationDomains = file_get_contents(resource_path('views/livewire/project/application/partials/domain-row.blade.php'));
|
|
$serviceDomains = file_get_contents(resource_path('views/livewire/project/service/partials/domain-table.blade.php'));
|
|
|
|
expect($applicationDomains)
|
|
->not->toContain('wire:key="domain-row-{{ $index }}-')
|
|
->toContain('wire:key="domain-row-{{ md5(');
|
|
|
|
expect($serviceDomains)
|
|
->not->toContain('-{{ $index }}-')
|
|
->toContain('wire:key="svc-domain-{{ $row[\'service_application_id\'] ?? \'x\' }}-{{ md5(');
|
|
});
|
|
|
|
it('keys nested Livewire status components rendered inside navigation loops', function () {
|
|
$sidebar = file_get_contents(resource_path('views/components/application/configuration-sidebar.blade.php'));
|
|
|
|
expect($sidebar)
|
|
->toContain(':key="$placement.\'-application-server-status-\'.$application->uuid"');
|
|
});
|
|
|
|
it('keys virtual log rows by stable line identity instead of list position', function () {
|
|
$view = file_get_contents(resource_path('views/livewire/project/shared/get-logs.blade.php'));
|
|
$script = file_get_contents(resource_path('js/runtime-logs.js'));
|
|
|
|
expect($view)
|
|
->toContain(':key="row.key"')
|
|
->not->toContain(':key="row.index"');
|
|
|
|
expect($script)
|
|
->toContain('getItemKey: (index) => filtered[index]?.id ?? index')
|
|
->toContain('id: nextId()');
|
|
});
|