diff --git a/apps/ui/src/lib/components/Usage.svelte b/apps/ui/src/lib/components/Usage.svelte index 08e63e455..715946952 100644 --- a/apps/ui/src/lib/components/Usage.svelte +++ b/apps/ui/src/lib/components/Usage.svelte @@ -26,7 +26,7 @@ import { addToast, appSession } from '$lib/store'; import { onDestroy, onMount } from 'svelte'; import { get, post } from '$lib/api'; - import { errorNotification } from '$lib/common'; + import { asyncSleep, errorNotification } from '$lib/common'; async function getStatus() { if (loading.usage) return; loading.usage = true; @@ -42,6 +42,25 @@ loading.restart = true; try { await post(`/internal/restart`, {}); + let reachable = false; + let tries = 0; + do { + await asyncSleep(4000); + try { + await get(`/undead`); + reachable = true; + } catch (error) { + reachable = false; + } + if (reachable) break; + tries++; + } while (!reachable || tries < 120); + addToast({ + message: 'New version reachable. Reloading...', + type: 'success' + }); + await asyncSleep(3000); + return window.location.reload(); addToast({ type: 'success', message: 'Coolify restarted successfully. It will take a moment.' @@ -89,10 +108,8 @@

Hardware Details

{#if $appSession.teamId === '0'} - Cleanup Storage + + Configurations + Secrets + Persistent Storages {#if !application.settings.isBot} + Previews {/if}
+ Application Logs + Build Logs
{#if forceDelete} + Force Delete {:else} + Delete {/if} - -Configurations -Secrets -Persistent Storages -Previews -Application Logs -Build Logs -Delete