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

44 lines
1.8 KiB
PHP
Raw Normal View History

2023-05-16 15:53:48 +00:00
<div x-init="$wire.loadImages">
2023-05-18 11:26:35 +00:00
<div class="flex gap-2">
<h2>Rollback</h2>
2023-05-25 12:05:44 +00:00
<x-forms.button isHighlighted wire:click='loadImages'>Refresh</x-forms.button>
2023-05-16 16:23:29 +00:00
</div>
2023-05-16 15:53:48 +00:00
<div wire:loading wire:target='loadImages'>
<x-loading />
</div>
2023-05-16 16:20:24 +00:00
<div wire:loading.remove wire:target='loadImages'>
2023-05-16 15:53:48 +00:00
<div class="flex flex-wrap">
@forelse ($images as $image)
2023-05-22 08:34:00 +00:00
<div class="w-2/4 p-2">
2023-05-16 16:20:24 +00:00
<div class="rounded-lg shadow-lg bg-coolgray-200">
2023-05-16 15:53:48 +00:00
<div class="p-2">
2023-05-16 16:20:24 +00:00
<div class="text-sm">
@if (data_get($image, 'is_current'))
2023-05-22 08:34:00 +00:00
<span class="font-bold text-warning">LIVE</span>
2023-05-16 19:49:29 +00:00
|
2023-05-16 16:20:24 +00:00
@endif
2023-05-22 08:34:00 +00:00
SHA: {{ data_get($image, 'tag') }}
2023-05-16 16:20:24 +00:00
</div>
<div class="text-xs">{{ data_get($image, 'created_at') }}</div>
2023-05-16 15:53:48 +00:00
</div>
<div class="flex justify-end p-2">
2023-05-22 08:34:00 +00:00
@if (data_get($image, 'is_current'))
2023-05-25 12:05:44 +00:00
<x-forms.button disabled tooltip="This image is currently running.">
2023-05-22 08:34:00 +00:00
Rollback
2023-05-25 12:05:44 +00:00
</x-forms.button>
2023-05-22 08:34:00 +00:00
@else
2023-05-25 12:05:44 +00:00
<x-forms.button wire:click="rollbackImage('{{ data_get($image, 'tag') }}')">
2023-05-22 08:34:00 +00:00
Rollback
2023-05-25 12:05:44 +00:00
</x-forms.button>
2023-05-22 08:34:00 +00:00
@endif
2023-05-16 15:53:48 +00:00
</div>
</div>
</div>
@empty
2023-05-18 13:12:26 +00:00
<div>No images found
</div>
2023-05-16 15:53:48 +00:00
@endforelse
</div>
</div>
</div>