lasthourcloud/resources/views/livewire/project/application/deployments.blade.php

56 lines
2.2 KiB
PHP
Raw Normal View History

2023-05-24 12:26:50 +00:00
<div class="flex flex-col gap-2 pt-2" wire:init='loadDeployments' wire:poll.5000ms='reloadDeployments'>
<div wire:loading wire:target='loadDeployments'>
<x-loading />
</div>
@foreach ($deployments as $deployment)
<a @class([
'bg-coolgray-200 p-2 border-l border-dashed transition-colors hover:no-underline',
'cursor-not-allowed hover:bg-coolgray-200' =>
2023-05-30 13:52:17 +00:00
data_get($deployment, 'status') === 'queued' ||
data_get($deployment, 'status') === 'cancelled by system',
2023-05-24 12:26:50 +00:00
'border-warning hover:bg-warning hover:text-black' =>
2023-05-30 13:52:17 +00:00
data_get($deployment, 'status') === 'in_progress',
'border-error hover:bg-error' =>
data_get($deployment, 'status') === 'error',
'border-success hover:bg-success' =>
data_get($deployment, 'status') === 'finished',
]) @if (data_get($deployment, 'status') !== 'cancelled by system' && data_get($deployment, 'status') !== 'queued')
href="{{ $current_url . '/' . data_get($deployment, 'deployment_uuid') }}"
2023-05-24 12:26:50 +00:00
@endif
class="hover:no-underline">
<div class="flex flex-col justify-start">
2023-05-30 13:52:17 +00:00
@if (data_get($deployment, 'pull_request_id'))
2023-05-31 09:24:02 +00:00
<div>
Pull Request #{{ data_get($deployment, 'pull_request_id') }}
@if (data_get($deployment, 'is_webhook'))
(Webhook)
@endif
</div>
@elseif (data_get($deployment, 'is_webhook'))
<div>Webhook (commit
@if (data_get($deployment, 'commit'))
{{ data_get($deployment, 'commit') }})
@else
HEAD)
@endif
</div>
2023-05-30 13:52:17 +00:00
@else
<div>Commit:
@if (data_get($deployment, 'commit'))
{{ data_get($deployment, 'commit') }}
@else
HEAD
@endif
</div>
@endif
2023-05-24 12:26:50 +00:00
<div>
{{ $deployment->status }}
</div>
<div>
{{ $deployment->created_at }}
</div>
</div>
</a>
@endforeach
</div>