mirror of
https://github.com/coollabsio/coolify.git
synced 2026-10-28 09:34: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
54 lines
1.6 KiB
PHP
54 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Livewire\Project\Application\Backup;
|
|
|
|
use App\Models\Application;
|
|
use App\Models\ScheduledVolumeBackup;
|
|
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
|
use Livewire\Component;
|
|
|
|
class Show extends Component
|
|
{
|
|
use AuthorizesRequests;
|
|
|
|
public Application $application;
|
|
|
|
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->application = $environment->applications()
|
|
->with('destination.server')
|
|
->where('uuid', request()->route('application_uuid'))
|
|
->firstOrFail();
|
|
$this->authorize('view', $this->application);
|
|
|
|
$this->backup = ScheduledVolumeBackup::query()
|
|
->with('backupable')
|
|
->where('uuid', request()->route('backup_uuid'))
|
|
->forApplication($this->application)
|
|
->firstOrFail();
|
|
$this->parameters = get_route_parameters();
|
|
$this->section = match (request()->route()?->getName()) {
|
|
'project.application.backup.executions' => 'executions',
|
|
'project.application.backup.danger' => 'danger',
|
|
default => 'general',
|
|
};
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return view('livewire.project.application.backup.show');
|
|
}
|
|
}
|