diff --git a/src/routes/console/project-[project]/functions/function-[function]/+page.svelte b/src/routes/console/project-[project]/functions/function-[function]/+page.svelte index 4bf39c8279..119a813a4b 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/+page.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/+page.svelte @@ -32,6 +32,7 @@ import type { PageData } from './$types'; import Delete from './delete.svelte'; import Create from './create.svelte'; + import Rebuild from './rebuild.svelte'; import Activate from './activate.svelte'; import { browser } from '$app/environment'; import { sdk } from '$lib/stores/sdk'; @@ -44,6 +45,7 @@ let showDropdown = []; let showDelete = false; let showActivate = false; + let showRebuild = false; let selectedDeployment: Models.Deployment = null; @@ -51,6 +53,10 @@ invalidate(Dependencies.DEPLOYMENTS); } + function handleRebuild() { + invalidate(Dependencies.DEPLOYMENTS); + } + $: activeDeployment = data.deployments.deployments.find((d) => d.$id === $func?.deployment); if (browser) { @@ -215,6 +221,17 @@ }}> Activate + {#if 'failed' === deployment.status} + { + selectedDeployment = deployment; + showRebuild = true; + showDropdown = []; + }}> + Retry Build + + {/if} { @@ -281,4 +298,5 @@ {#if selectedDeployment} + {/if} diff --git a/src/routes/console/project-[project]/functions/function-[function]/rebuild.svelte b/src/routes/console/project-[project]/functions/function-[function]/rebuild.svelte new file mode 100644 index 0000000000..a3d1b4e1d6 --- /dev/null +++ b/src/routes/console/project-[project]/functions/function-[function]/rebuild.svelte @@ -0,0 +1,46 @@ + + + + Retry build + Are you sure you want to retry building this deployment? + + (showRebuild = false)}>Cancel + Retry build + +
Are you sure you want to retry building this deployment?