Feat: Use the new confirmation flow

This commit is contained in:
peaklabs-dev
2024-09-24 13:06:03 +02:00
parent 164a213ab1
commit f9dbc30812

View File

@@ -188,7 +188,7 @@
<div class="flex flex-wrap items-center gap-4"> <div class="flex flex-wrap items-center gap-4">
<div class="w-64"> <div class="w-64">
<x-forms.checkbox <x-forms.checkbox
helper="Enabling force Docker Cleanup will perform the following actions: helper="Enabling Force Docker Cleanup or manually triggering a cleanup will perform the following actions:
<ul class='list-disc pl-4 mt-2'> <ul class='list-disc pl-4 mt-2'>
<li>Removes stopped containers manged by Coolify (as containers are none persistent, no data will be lost).</li> <li>Removes stopped containers manged by Coolify (as containers are none persistent, no data will be lost).</li>
<li>Deletes unused images.</li> <li>Deletes unused images.</li>
@@ -199,9 +199,22 @@
</ul>" </ul>"
instantSave id="server.settings.force_docker_cleanup" label="Force Docker Cleanup" /> instantSave id="server.settings.force_docker_cleanup" label="Force Docker Cleanup" />
</div> </div>
<x-forms.button wire:click="manualCleanup"> <x-modal-confirmation
Manually Trigger Cleanup title="Confirm Docker Cleanup?"
</x-forms.button> buttonTitle="Trigger Docker Cleanup"
submitAction="manualCleanup"
:actions="[
'Permanently deletes all stopped containers managed by Coolify (as containers are non-persistent, no data will be lost)',
'Permanently deletes all unused images',
'Clears build cache',
'Removes old versions of the Coolify helper image',
'Optionally permanently deletes all unused volumes (if enabled in advanced options).',
'Optionally permanently deletes all unused networks (if enabled in advanced options).'
]"
:confirmWithText="false"
:confirmWithPassword="false"
step2ButtonText="Trigger Docker Cleanup"
/>
</div> </div>
@if ($server->settings->force_docker_cleanup) @if ($server->settings->force_docker_cleanup)
<x-forms.input placeholder="*/10 * * * *" id="server.settings.docker_cleanup_frequency" <x-forms.input placeholder="*/10 * * * *" id="server.settings.docker_cleanup_frequency"