mirror of
https://github.com/tiennm99/coolify.git
synced 2026-08-20 12:23:48 +00:00
Add dedicated service volume-backup Livewire pages and routes, wire shared storage backups for services, and pass S3 trusted hosts into MinIO resolve options. Also refine breadcrumbs, sticky sidebars, destination/GitHub layouts, resource filters, and login recovery link.
53 lines
1.7 KiB
PHP
53 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Livewire\Project\Service\VolumeBackup;
|
|
|
|
use App\Models\ScheduledVolumeBackup;
|
|
use App\Models\Service;
|
|
use Illuminate\Contracts\View\View;
|
|
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
|
use Livewire\Component;
|
|
|
|
class Show extends Component
|
|
{
|
|
use AuthorizesRequests;
|
|
|
|
public Service $service;
|
|
|
|
public ScheduledVolumeBackup $backup;
|
|
|
|
public array $parameters;
|
|
|
|
public string $section = 'general';
|
|
|
|
public function mount(): void
|
|
{
|
|
$project = currentTeam()->projects()->where('uuid', request()->route('project_uuid'))->firstOrFail();
|
|
$environment = $project->environments()->where('uuid', request()->route('environment_uuid'))->firstOrFail();
|
|
$this->service = $environment->services()
|
|
->with(['server.settings', 'environment.project'])
|
|
->where('uuid', request()->route('service_uuid'))
|
|
->firstOrFail();
|
|
$this->authorize('view', $this->service);
|
|
|
|
$this->backup = ScheduledVolumeBackup::query()
|
|
->with('backupable.resource')
|
|
->where('uuid', request()->route('backup_uuid'))
|
|
->forService($this->service)
|
|
->firstOrFail();
|
|
$this->parameters = get_route_parameters();
|
|
$this->section = match (request()->route()?->getName()) {
|
|
'project.service.volume-backups.s3' => 's3',
|
|
'project.service.volume-backups.retention' => 'retention',
|
|
'project.service.volume-backups.executions' => 'executions',
|
|
'project.service.volume-backups.danger' => 'danger',
|
|
default => 'general',
|
|
};
|
|
}
|
|
|
|
public function render(): View
|
|
{
|
|
return view('livewire.project.service.volume-backup.show');
|
|
}
|
|
}
|