2023-05-16 15:53:48 +00:00
< div x - init = " $wire .loadImages " >
2023-06-02 10:34:45 +00:00
< div class = " flex items-center gap-2 " >
< h2 > Rollback </ h2 >
2025-08-26 08:27:31 +00:00
@ can ( 'view' , $application )
< x - forms . button wire : click = 'loadImages(true)' > Reload Available Images </ x - forms . button >
@ endcan
2023-05-16 16:23:29 +00:00
</ div >
2025-12-05 10:02:07 +00:00
< div class = " pb-4 " > You can easily rollback to a previously built ( local ) images quickly .</ div >
< div class = " pb-4 " >
< form wire : submit = " saveSettings " class = " flex items-end gap-2 w-96 " >
< x - forms . input id = " dockerImagesToKeep " type = " number " min = " 0 " max = " 100 " label = " Images to keep for rollback "
helper = " Number of Docker images to keep for rollback during cleanup. Set to 0 to only keep the currently running image. PR images are always deleted during cleanup. "
canGate = " update " : canResource = " $application " />
< x - forms . button canGate = " update " : canResource = " $application " type = " submit " > Save </ x - forms . button >
</ form >
</ div >
2025-06-25 08:56:35 +00:00
< div wire : target = 'loadImages' wire : loading . remove >
2023-05-16 15:53:48 +00:00
< div class = " flex flex-wrap " >
2023-11-20 12:49:10 +00:00
@ forelse ( $images as $image )
2023-05-22 08:34:00 +00:00
< div class = " w-2/4 p-2 " >
2025-12-05 10:02:07 +00:00
< div
class = " bg-white border rounded-sm dark:border-coolgray-300 dark:bg-coolgray-100 border-neutral-200 " >
2023-05-16 15:53:48 +00:00
< div class = " p-2 " >
2023-06-16 10:35:40 +00:00
< div class = " " >
2023-05-16 16:20:24 +00:00
@ if ( data_get ( $image , 'is_current' ))
2024-03-25 09:41:44 +00:00
< span class = " font-bold dark: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 >
2024-07-11 02:56:31 +00:00
@ php
$date = data_get ( $image , 'created_at' );
$interval = \Illuminate\Support\Carbon :: parse ( $date );
@ endphp
< div class = " text-xs " > {{ $interval -> diffForHumans () }} </ div >
< div class = " text-xs " > {{ $date }} </ div >
2023-05-16 15:53:48 +00:00
</ div >
< div class = " flex justify-end p-2 " >
2025-08-26 08:27:31 +00:00
@ can ( 'deploy' , $application )
@ if ( data_get ( $image , 'is_current' ))
< x - forms . button disabled tooltip = " This image is currently running. " >
Rollback
</ x - forms . button >
@ else
< x - forms . button class = " dark:bg-coolgray-100 "
wire : click = " rollbackImage(' { { data_get( $image , 'tag') }}') " >
Rollback
</ x - forms . button >
@ endif
@ endcan
2023-05-16 15:53:48 +00:00
</ div >
</ div >
</ div >
2023-11-20 12:49:10 +00:00
@ empty
< div > No images found locally .</ div >
@ endforelse
2023-05-16 15:53:48 +00:00
</ div >
</ div >
2025-06-25 08:56:35 +00:00
< div wire : target = 'loadImages' wire : loading > Loading available docker images ...</ div >
2025-12-05 10:02:07 +00:00
</ div >