fix: initial deploy status
This commit is contained in:
@@ -91,12 +91,17 @@
|
|||||||
forceDelete = true;
|
forceDelete = true;
|
||||||
}
|
}
|
||||||
return errorNotification(error);
|
return errorNotification(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function handleDeploySubmit(forceRebuild = false) {
|
async function handleDeploySubmit(forceRebuild = false) {
|
||||||
if (!$isDeploymentEnabled) return;
|
if (!$isDeploymentEnabled) return;
|
||||||
|
if (!statusInterval) {
|
||||||
|
statusInterval = setInterval(async () => {
|
||||||
|
await getStatus();
|
||||||
|
}, 2000);
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
const { buildId } = await post(`/applications/${id}/deploy`, {
|
const { buildId } = await post(`/applications/${id}/deploy`, {
|
||||||
...application,
|
...application,
|
||||||
@@ -212,30 +217,29 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if $page.url.pathname.startsWith(`/applications/${id}/configuration/`)}
|
{#if $page.url.pathname.startsWith(`/applications/${id}/configuration/`)}
|
||||||
<div class="px-2">
|
<div class="px-2">
|
||||||
{#if forceDelete}
|
{#if forceDelete}
|
||||||
<button
|
<button
|
||||||
on:click={() => deleteApplication(application.name, true)}
|
on:click={() => deleteApplication(application.name, true)}
|
||||||
disabled={!$appSession.isAdmin}
|
disabled={!$appSession.isAdmin}
|
||||||
class:bg-red-600={$appSession.isAdmin}
|
class:bg-red-600={$appSession.isAdmin}
|
||||||
class:hover:bg-red-500={$appSession.isAdmin}
|
class:hover:bg-red-500={$appSession.isAdmin}
|
||||||
class="btn btn-sm btn-error text-sm"
|
class="btn btn-sm btn-error text-sm"
|
||||||
>
|
>
|
||||||
Force Delete Application
|
Force Delete Application
|
||||||
</button>
|
</button>
|
||||||
{:else}
|
{:else}
|
||||||
<button
|
<button
|
||||||
on:click={() => deleteApplication(application.name, false)}
|
on:click={() => deleteApplication(application.name, false)}
|
||||||
disabled={!$appSession.isAdmin}
|
disabled={!$appSession.isAdmin}
|
||||||
class:bg-red-600={$appSession.isAdmin}
|
class:bg-red-600={$appSession.isAdmin}
|
||||||
class:hover:bg-red-500={$appSession.isAdmin}
|
class:hover:bg-red-500={$appSession.isAdmin}
|
||||||
class="btn btn-sm btn-error text-sm"
|
class="btn btn-sm btn-error text-sm"
|
||||||
>
|
>
|
||||||
Delete Application
|
Delete Application
|
||||||
</button>
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/if}
|
{/if}
|
||||||
</nav>
|
</nav>
|
||||||
<div
|
<div
|
||||||
|
Reference in New Issue
Block a user