{{ data_get_str($application, 'name')->limit(10) }} > Deployments | Coolify @php $lastPage = max(1, (int) ceil($deployments_count / $defaultTake)); $firstVisibleRow = $deployments_count === 0 ? 0 : $skip + 1; $lastVisibleRow = min($skip + $deployments->count(), $deployments_count); $hasActiveFilter = $deploymentFilter !== 'all' || filled($pull_request_id); $hasActiveQuery = trim($search) !== '' || $hasActiveFilter; @endphp
@if (count($statusFilterOptions) > 0) Status @foreach ($statusFilterOptions as $option) @endforeach @endif @if (count($sourceFilterOptions) > 1) Source @foreach ($sourceFilterOptions as $option) @endforeach @endif @if (count($pullRequestOptions) > 1) Pull request @foreach (array_slice($pullRequestOptions, 1) as $option) @endforeach @endif
@foreach ([ 'newest' => 'Newest first', 'oldest' => 'Oldest first', ] as $sortValue => $sortLabel) @endforeach
@if ($deployments->isNotEmpty())
Status Source Commit Started Duration Server
@foreach ($deployments as $deployment) @php $deploymentStatus = data_get($deployment, 'status'); $statusLabel = match ($deploymentStatus) { 'finished' => 'Success', 'in_progress' => 'In progress', 'cancelled-by-user' => 'Cancelled', 'queued' => 'Queued', default => str($deploymentStatus)->headline()->toString(), }; $statusType = match ($deploymentStatus) { 'finished' => 'success', 'in_progress', 'queued' => 'warning', 'failed' => 'error', default => 'neutral', }; $pullRequestId = (int) data_get($deployment, 'pull_request_id', 0); $sourceLabel = match (true) { (bool) data_get($deployment, 'is_webhook') && $pullRequestId > 0 => 'Webhook ยท PR #' . $pullRequestId, (bool) data_get($deployment, 'is_webhook') => 'Webhook', $pullRequestId > 0 => 'Pull request #' . $pullRequestId, (bool) data_get($deployment, 'rollback') => 'Rollback', (bool) data_get($deployment, 'is_api') => 'API', default => 'Manual', }; $duration = match ($deploymentStatus) { 'queued' => 'Waiting', 'in_progress' => calculateDuration(data_get($deployment, 'created_at'), now()), default => data_get($deployment, 'finished_at') ? calculateDuration(data_get($deployment, 'created_at'), data_get($deployment, 'finished_at')) : '-', }; $commitMessage = $deployment->commitMessage() ? Str::before($deployment->commitMessage(), "\n") : null; @endphp {{ $sourceLabel }} @if (data_get($deployment, 'commit')) {{ substr(data_get($deployment, 'commit'), 0, 7) }} @if ($commitMessage) {{ $commitMessage }} @endif @else - @endif {{ \Carbon\Carbon::parse(data_get($deployment, 'created_at'))->diffForHumans() }} {{ $duration }} {{ data_get($deployment, 'server_name') ?: data_get($application, 'destination.server.name', '-') }} @endforeach
@else @endif