+
+ 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
-