updates
This commit is contained in:
parent
5305bc1ceb
commit
b24a5d9aca
@ -26,7 +26,7 @@
|
|||||||
import { addToast, appSession } from '$lib/store';
|
import { addToast, appSession } from '$lib/store';
|
||||||
import { onDestroy, onMount } from 'svelte';
|
import { onDestroy, onMount } from 'svelte';
|
||||||
import { get, post } from '$lib/api';
|
import { get, post } from '$lib/api';
|
||||||
import { errorNotification } from '$lib/common';
|
import { asyncSleep, errorNotification } from '$lib/common';
|
||||||
async function getStatus() {
|
async function getStatus() {
|
||||||
if (loading.usage) return;
|
if (loading.usage) return;
|
||||||
loading.usage = true;
|
loading.usage = true;
|
||||||
@ -42,6 +42,25 @@
|
|||||||
loading.restart = true;
|
loading.restart = true;
|
||||||
try {
|
try {
|
||||||
await post(`/internal/restart`, {});
|
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({
|
addToast({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: 'Coolify restarted successfully. It will take a moment.'
|
message: 'Coolify restarted successfully. It will take a moment.'
|
||||||
@ -89,10 +108,8 @@
|
|||||||
<h1 class="title lg:text-3xl">Hardware Details</h1>
|
<h1 class="title lg:text-3xl">Hardware Details</h1>
|
||||||
<div class="flex lg:flex-row flex-col space-x-0 lg:space-x-2 space-y-2 lg:space-y-0">
|
<div class="flex lg:flex-row flex-col space-x-0 lg:space-x-2 space-y-2 lg:space-y-0">
|
||||||
{#if $appSession.teamId === '0'}
|
{#if $appSession.teamId === '0'}
|
||||||
<button
|
<button on:click={manuallyCleanupStorage} class:loading={loading.cleanup} class="btn btn-sm"
|
||||||
on:click={manuallyCleanupStorage}
|
>Cleanup Storage</button
|
||||||
class:loading={loading.cleanup}
|
|
||||||
class="btn btn-sm">Cleanup Storage</button
|
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
on:click={restartCoolify}
|
on:click={restartCoolify}
|
||||||
|
@ -402,6 +402,8 @@
|
|||||||
</svg></button
|
</svg></button
|
||||||
></a
|
></a
|
||||||
>
|
>
|
||||||
|
|
||||||
|
<Tooltip triggeredBy="#configurations">Configurations</Tooltip>
|
||||||
<a
|
<a
|
||||||
href={$isDeploymentEnabled ? `/applications/${id}/secrets` : null}
|
href={$isDeploymentEnabled ? `/applications/${id}/secrets` : null}
|
||||||
sveltekit:prefetch
|
sveltekit:prefetch
|
||||||
@ -429,6 +431,7 @@
|
|||||||
</svg></button
|
</svg></button
|
||||||
></a
|
></a
|
||||||
>
|
>
|
||||||
|
<Tooltip triggeredBy="#secrets">Secrets</Tooltip>
|
||||||
<a
|
<a
|
||||||
href={$isDeploymentEnabled ? `/applications/${id}/storages` : null}
|
href={$isDeploymentEnabled ? `/applications/${id}/storages` : null}
|
||||||
sveltekit:prefetch
|
sveltekit:prefetch
|
||||||
@ -458,6 +461,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</button></a
|
</button></a
|
||||||
>
|
>
|
||||||
|
<Tooltip triggeredBy="#persistentstorages">Persistent Storages</Tooltip>
|
||||||
{#if !application.settings.isBot}
|
{#if !application.settings.isBot}
|
||||||
<a
|
<a
|
||||||
href={$isDeploymentEnabled ? `/applications/${id}/previews` : null}
|
href={$isDeploymentEnabled ? `/applications/${id}/previews` : null}
|
||||||
@ -486,6 +490,7 @@
|
|||||||
</svg></button
|
</svg></button
|
||||||
></a
|
></a
|
||||||
>
|
>
|
||||||
|
<Tooltip triggeredBy="#previews">Previews</Tooltip>
|
||||||
{/if}
|
{/if}
|
||||||
<div class="border border-coolgray-500 h-8" />
|
<div class="border border-coolgray-500 h-8" />
|
||||||
<a
|
<a
|
||||||
@ -519,6 +524,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</button></a
|
</button></a
|
||||||
>
|
>
|
||||||
|
<Tooltip triggeredBy="#applicationlogs">Application Logs</Tooltip>
|
||||||
<a
|
<a
|
||||||
href={$isDeploymentEnabled ? `/applications/${id}/logs/build` : null}
|
href={$isDeploymentEnabled ? `/applications/${id}/logs/build` : null}
|
||||||
sveltekit:prefetch
|
sveltekit:prefetch
|
||||||
@ -549,10 +555,12 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</button></a
|
</button></a
|
||||||
>
|
>
|
||||||
|
<Tooltip triggeredBy="#buildlogs">Build Logs</Tooltip>
|
||||||
<div class="border border-coolgray-500 h-8" />
|
<div class="border border-coolgray-500 h-8" />
|
||||||
|
|
||||||
{#if forceDelete}
|
{#if forceDelete}
|
||||||
<button
|
<button
|
||||||
|
id="forcedelete"
|
||||||
on:click={() => deleteApplication(application.name, true)}
|
on:click={() => deleteApplication(application.name, true)}
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={!$appSession.isAdmin}
|
disabled={!$appSession.isAdmin}
|
||||||
@ -562,6 +570,7 @@
|
|||||||
>
|
>
|
||||||
Force Delete
|
Force Delete
|
||||||
</button>
|
</button>
|
||||||
|
<Tooltip triggeredBy="#forcedelete">Force Delete</Tooltip>
|
||||||
{:else}
|
{:else}
|
||||||
<button
|
<button
|
||||||
id="delete"
|
id="delete"
|
||||||
@ -573,14 +582,7 @@
|
|||||||
>
|
>
|
||||||
<DeleteIcon />
|
<DeleteIcon />
|
||||||
</button>
|
</button>
|
||||||
|
<Tooltip triggeredBy="#delete">Delete</Tooltip>
|
||||||
{/if}
|
{/if}
|
||||||
</nav>
|
</nav>
|
||||||
<slot />
|
<slot />
|
||||||
|
|
||||||
<Tooltip triggeredBy="#configurations">Configurations</Tooltip>
|
|
||||||
<Tooltip triggeredBy="#secrets">Secrets</Tooltip>
|
|
||||||
<Tooltip triggeredBy="#persistentstorages">Persistent Storages</Tooltip>
|
|
||||||
<Tooltip triggeredBy="#previews">Previews</Tooltip>
|
|
||||||
<Tooltip triggeredBy="#applicationlogs">Application Logs</Tooltip>
|
|
||||||
<Tooltip triggeredBy="#buildlogs">Build Logs</Tooltip>
|
|
||||||
<Tooltip triggeredBy="#delete">Delete</Tooltip>
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user