mirror of
https://github.com/coollabsio/coolify.git
synced 2026-09-28 02:06:37 -04:00
feat(ui): show S3 backup status and move domain action
Eager-load S3 on volume backup lists and add an S3 status column with Configured/Unavailable/Not set badges. Surface Local vs S3 on the persistent storages backup column. Move service resource domain links to a globe action in the card footer, and update related tests and grid CSS.
This commit is contained in:
@@ -66,8 +66,8 @@ it('styles icon buttons with a visible hover state', function () {
|
||||
->toContain('dark:hover:bg-white/[0.07]');
|
||||
|
||||
expect($resourceCard)
|
||||
->toContain('class="icon-button shrink-0"')
|
||||
->toContain('title="Edit domains"');
|
||||
->toContain('class="icon-button"')
|
||||
->toContain('title="Manage domains"');
|
||||
});
|
||||
|
||||
it('exposes enable and disable public access methods on service index', function () {
|
||||
|
||||
@@ -107,11 +107,12 @@ it('renders volume rows without nesting Livewire Show components', function () {
|
||||
it('batches volume backup meta and exposes forms for every volume', function () {
|
||||
[$application, , $team] = createPerfApplicationWithVolumes(5);
|
||||
|
||||
foreach ($application->persistentStorages as $storage) {
|
||||
foreach ($application->persistentStorages as $index => $storage) {
|
||||
$storage->scheduledBackups()->create([
|
||||
'team_id' => $team->id,
|
||||
'frequency' => 'daily',
|
||||
'enabled' => true,
|
||||
'save_s3' => $index === 0,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -120,7 +121,10 @@ it('batches volume backup meta and exposes forms for every volume', function ()
|
||||
expect($component->get('volumeBackupMeta'))->toHaveCount(5)
|
||||
->and($component->get('forms'))->toHaveCount(5)
|
||||
->and($component->html())->toContain('volumes-col-backup')
|
||||
->not->toContain('table-badge table-badge-success');
|
||||
->toContain('Backups are saved to S3')
|
||||
->toContain('Backups are stored locally only');
|
||||
|
||||
expect($component->get("volumeBackupMeta.{$application->persistentStorages->first()->id}.s3"))->toBeTrue();
|
||||
|
||||
foreach ($component->get('volumeBackupMeta') as $meta) {
|
||||
expect($meta['enabled'])->toBeTrue()
|
||||
|
||||
@@ -44,3 +44,13 @@ it('aligns compose resource columns and uses icon actions', function () {
|
||||
->not->toContain('>Settings</a>')
|
||||
->not->toContain('>Backups</a>');
|
||||
});
|
||||
|
||||
it('distinguishes domain management from resource settings', function () {
|
||||
$resourceCard = file_get_contents(resource_path('views/livewire/project/service/resource-card.blade.php'));
|
||||
|
||||
expect($resourceCard)
|
||||
->toContain('title="Manage domains" aria-label="Manage domains"')
|
||||
->toContain('<x-reicon name="globe" class="size-4" />')
|
||||
->toContain('title="Resource settings" aria-label="Resource settings"')
|
||||
->not->toContain('title="Edit domains" aria-label="Edit domains"');
|
||||
});
|
||||
|
||||
@@ -56,6 +56,21 @@ it('keeps the volume backup script inside the Livewire root element', function (
|
||||
expect(strrpos($view, '@endscript'))->toBeLessThan(strrpos($view, '</div>'));
|
||||
});
|
||||
|
||||
it('shows the S3 configuration state in application and service backup tables', function () {
|
||||
$views = [
|
||||
resource_path('views/livewire/project/application/backup/index.blade.php'),
|
||||
resource_path('views/livewire/project/service/volume-backup/index.blade.php'),
|
||||
];
|
||||
|
||||
foreach ($views as $view) {
|
||||
expect(file_get_contents($view))
|
||||
->toContain('<span>S3</span>')
|
||||
->toContain("'Configured'")
|
||||
->toContain("'Unavailable'")
|
||||
->toContain("'Not set'");
|
||||
}
|
||||
});
|
||||
|
||||
it('targets named volumes and application directory mounts through one backup relation', function () {
|
||||
$team = Team::factory()->create();
|
||||
[$application, $volume] = createVolumeBackupApplication($team);
|
||||
|
||||
Reference in New Issue
Block a user