diff --git a/resources/views/livewire/project/application/deployment/index.blade.php b/resources/views/livewire/project/application/deployment/index.blade.php index 444dfc2d4..cc097e99a 100644 --- a/resources/views/livewire/project/application/deployment/index.blade.php +++ b/resources/views/livewire/project/application/deployment/index.blade.php @@ -9,7 +9,7 @@ @if ($skip == 0) wire:poll.5000ms='reload_deployments' @endif>

Deployments ({{ $deployments_count }})

- @if ($deployments_count > 0 && $deployments_count > $default_take) + @if ($deployments_count > 0) data_get($deployment, 'status') === 'in_progress', 'border-purple-500/50 border-dashed' => data_get($deployment, 'status') === 'queued', 'border-white border-dashed' => data_get($deployment, 'status') === 'cancelled-by-user', 'border-error' => data_get($deployment, 'status') === 'failed', 'border-success' => data_get($deployment, 'status') === 'finished', - ]) wire:navigate - href="{{ $current_url . '/' . data_get($deployment, 'deployment_uuid') }}"> -
-
- data_get($deployment, 'status') === 'in_progress', - 'bg-purple-100/80 text-purple-700 dark:bg-purple-500/20 dark:text-purple-300 dark:shadow-purple-900/5' => data_get($deployment, 'status') === 'queued', - 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-200 dark:shadow-red-900/5' => data_get($deployment, 'status') === 'failed', - 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-200 dark:shadow-green-900/5' => data_get($deployment, 'status') === 'finished', - 'bg-gray-100 text-gray-700 dark:bg-gray-600/30 dark:text-gray-300 dark:shadow-gray-900/5' => data_get($deployment, 'status') === 'cancelled-by-user', - ])> - @php - $statusText = match(data_get($deployment, 'status')) { - 'finished' => 'Success', - 'in_progress' => 'In Progress', - 'cancelled-by-user' => 'Cancelled', - 'queued' => 'Queued', - default => ucfirst(data_get($deployment, 'status')) - }; - @endphp - {{ $statusText }} - -
- @if(data_get($deployment, 'status') !== 'queued') -
- Started: {{ formatDateInServerTimezone(data_get($deployment, 'created_at'), data_get($application, 'destination.server')) }} - @if($deployment->status !== 'in_progress') -
Ended: {{ formatDateInServerTimezone(data_get($deployment, 'updated_at'), data_get($application, 'destination.server')) }} -
Duration: {{ calculateDuration(data_get($deployment, 'created_at'), data_get($deployment, 'updated_at')) }} - @else -
Running for: {{ calculateDuration(data_get($deployment, 'created_at'), now()) }} - @endif -
- @endif - -
-
- @if (data_get($deployment, 'commit')) - - Commit: - @if ($deployment->commitMessage()) - {{ data_get_str($deployment, 'commit')->limit(7) }} - {{ $deployment->commitMessage() }} - @else - {{ data_get_str($deployment, 'commit')->limit(7) }} - @endif - - - @endif - - @if (data_get($deployment, 'is_webhook')) - Webhook - @if (data_get($deployment, 'pull_request_id')) - | Pull Request #{{ data_get($deployment, 'pull_request_id') }} - @endif - @elseif (data_get($deployment, 'pull_request_id')) - Pull Request #{{ data_get($deployment, 'pull_request_id') }} - @elseif (data_get($deployment, 'rollback') === true) - Rollback - @elseif (data_get($deployment, 'is_api')) - API - @else - Manual - @endif + ])> + +
+
+ data_get($deployment, 'status') === 'in_progress', + 'bg-purple-100/80 text-purple-700 dark:bg-purple-500/20 dark:text-purple-300 dark:shadow-purple-900/5' => data_get($deployment, 'status') === 'queued', + 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-200 dark:shadow-red-900/5' => data_get($deployment, 'status') === 'failed', + 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-200 dark:shadow-green-900/5' => data_get($deployment, 'status') === 'finished', + 'bg-gray-100 text-gray-700 dark:bg-gray-600/30 dark:text-gray-300 dark:shadow-gray-900/5' => data_get($deployment, 'status') === 'cancelled-by-user', + ])> + @php + $statusText = match(data_get($deployment, 'status')) { + 'finished' => 'Success', + 'in_progress' => 'In Progress', + 'cancelled-by-user' => 'Cancelled', + 'queued' => 'Queued', + default => ucfirst(data_get($deployment, 'status')) + }; + @endphp + {{ $statusText }}
-
+ @if(data_get($deployment, 'status') !== 'queued') +
+ Started: {{ formatDateInServerTimezone(data_get($deployment, 'created_at'), data_get($application, 'destination.server')) }} + @if($deployment->status !== 'in_progress') +
Ended: {{ formatDateInServerTimezone(data_get($deployment, 'updated_at'), data_get($application, 'destination.server')) }} +
Duration: {{ calculateDuration(data_get($deployment, 'created_at'), data_get($deployment, 'updated_at')) }} + @else +
Running for: {{ calculateDuration(data_get($deployment, 'created_at'), now()) }} + @endif +
+ @endif - @if (data_get($deployment, 'server_name') && $application->additional_servers->count() > 0)
- Server: {{ data_get($deployment, 'server_name') }} +
+ @if (data_get($deployment, 'commit')) +
+
+ Commit: + + {{ substr(data_get($deployment, 'commit'), 0, 7) }} + + @if (!$deployment->commitMessage()) + + @if (data_get($deployment, 'is_webhook')) + Webhook + @if (data_get($deployment, 'pull_request_id')) + | Pull Request #{{ data_get($deployment, 'pull_request_id') }} + @endif + @elseif (data_get($deployment, 'pull_request_id')) + Pull Request #{{ data_get($deployment, 'pull_request_id') }} + @elseif (data_get($deployment, 'rollback') === true) + Rollback + @elseif (data_get($deployment, 'is_api')) + API + @else + Manual + @endif + + @endif + @if ($deployment->commitMessage()) + - + + {{ Str::before($deployment->commitMessage(), "\n") }} + + + + @if (data_get($deployment, 'is_webhook')) + Webhook + @if (data_get($deployment, 'pull_request_id')) + | Pull Request #{{ data_get($deployment, 'pull_request_id') }} + @endif + @elseif (data_get($deployment, 'pull_request_id')) + Pull Request #{{ data_get($deployment, 'pull_request_id') }} + @elseif (data_get($deployment, 'rollback') === true) + Rollback + @elseif (data_get($deployment, 'is_api')) + API + @else + Manual + @endif + + @endif +
+ @if ($deployment->commitMessage()) +
+ {{ Str::after($deployment->commitMessage(), "\n") }} +
+ @endif +
+ @endif +
- @endif -
+ + @if (data_get($deployment, 'server_name') && $application->additional_servers->count() > 0) +
+ Server: {{ data_get($deployment, 'server_name') }} +
+ @endif +
+
@empty
No deployments found