Files
coolify/app/Livewire/Project/Service/VolumeBackup/Show.php
T
Andras Bacsai fa1895c99a feat(dashboard): add canvas view with active deployment overlay
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
2026-10-14 23:55:28 +02:00

55 lines
1.8 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(): mixed
{
$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.executions' => 'executions',
'project.service.volume-backups.danger' => 'danger',
default => 'general',
};
$routeParameters = collect($this->parameters)->except('backup_uuid')->all();
return redirect()->route('project.service.volume-backups.index', $routeParameters);
}
public function render(): View
{
return view('livewire.project.service.volume-backup.show');
}
}