From 5238c83f3fcb83692a5e1f494cf39d871b1f310c Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 29 Sep 2022 13:23:38 +0200 Subject: [PATCH] fix: initial deploy status --- .../routes/applications/[id]/__layout.svelte | 54 ++++++++++--------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/apps/ui/src/routes/applications/[id]/__layout.svelte b/apps/ui/src/routes/applications/[id]/__layout.svelte index e36018d1f..31aebdf5c 100644 --- a/apps/ui/src/routes/applications/[id]/__layout.svelte +++ b/apps/ui/src/routes/applications/[id]/__layout.svelte @@ -91,12 +91,17 @@ forceDelete = true; } return errorNotification(error); - } + } } } async function handleDeploySubmit(forceRebuild = false) { if (!$isDeploymentEnabled) return; + if (!statusInterval) { + statusInterval = setInterval(async () => { + await getStatus(); + }, 2000); + } try { const { buildId } = await post(`/applications/${id}/deploy`, { ...application, @@ -212,30 +217,29 @@ {/if} {#if $page.url.pathname.startsWith(`/applications/${id}/configuration/`)} -
- {#if forceDelete} - - {:else} - - {/if} -
- +
+ {#if forceDelete} + + {:else} + + {/if} +
{/if}