diff --git a/src/routes/(console)/project-[project]/functions/function-[function]/(components)/downloadActionMenuItem.svelte b/src/routes/(console)/project-[project]/functions/function-[function]/(components)/downloadActionMenuItem.svelte
index 40e381531..a347e8ad1 100644
--- a/src/routes/(console)/project-[project]/functions/function-[function]/(components)/downloadActionMenuItem.svelte
+++ b/src/routes/(console)/project-[project]/functions/function-[function]/(components)/downloadActionMenuItem.svelte
@@ -1,31 +1,13 @@
{#if deployment?.status === 'ready' || deployment?.status === 'failed' || deployment?.status === 'building'}
@@ -37,7 +19,7 @@
Download source
@@ -45,7 +27,7 @@
Download output
diff --git a/src/routes/(console)/project-[project]/functions/function-[function]/deployment-[deployment]/+page.svelte b/src/routes/(console)/project-[project]/functions/function-[function]/deployment-[deployment]/+page.svelte
index e6d26d0a9..88b9f5469 100644
--- a/src/routes/(console)/project-[project]/functions/function-[function]/deployment-[deployment]/+page.svelte
+++ b/src/routes/(console)/project-[project]/functions/function-[function]/deployment-[deployment]/+page.svelte
@@ -3,7 +3,7 @@
import { Container } from '$lib/layout';
import { sdk } from '$lib/stores/sdk';
import { onMount } from 'svelte';
- import { DeploymentDownloadType, type Models } from '@appwrite.io/console';
+ import { type Models } from '@appwrite.io/console';
import { page } from '$app/stores';
import { invalidate } from '$app/navigation';
import { Dependencies } from '$lib/constants';
@@ -11,11 +11,21 @@
import Cancel from '../(modals)/cancel.svelte';
import DeploymentCard from '../(components)/deploymentCard.svelte';
import Delete from '../(modals)/deleteModal.svelte';
- import { Accordion, Card, Layout, Logs, Spinner, Typography } from '@appwrite.io/pink-svelte';
+ import {
+ Accordion,
+ ActionMenu,
+ Card,
+ Layout,
+ Logs,
+ Popover,
+ Spinner,
+ Typography
+ } from '@appwrite.io/pink-svelte';
import { capitalize } from '$lib/helpers/string';
import { formatTimeDetailed } from '$lib/helpers/timeConversion';
import { timer } from '$lib/actions/timer';
import { app } from '$lib/stores/app';
+ import { getOutputDownload, getSourceDownload } from '../store';
export let data;
@@ -24,19 +34,6 @@
let showCancel = false;
let showActivate = false;
- function handleActivate() {
- invalidate(Dependencies.DEPLOYMENTS);
- }
-
- //TODO: implement output download
- function getDownload(deploymentId: string) {
- return (
- sdk.forProject.functions.getDeploymentDownload(data.func.$id, deploymentId).toString() +
- '&mode=admin',
- DeploymentDownloadType.Source
- );
- }
-
onMount(() => {
logs = data.deployment.buildLogs;
@@ -75,9 +72,6 @@
return undefined;
}
}
-
- $: console.log(logs);
- $: console.log(data.deployment);
@@ -92,8 +86,34 @@
}}>Cancel
{/if}
- {#if data.deployment.sourceSize > 0}
-
+ {#if !!data.deployment?.sourceSize || !!data.deployment?.sourceSize}
+
+
+
+
+
+ Download source
+
+
+
+ Download output
+
+
+
+
{/if}
{#if data.func.deploymentId !== data.deployment.$id && data.deployment.status === 'ready'}
@@ -111,7 +131,7 @@
@@ -145,4 +165,7 @@
-
+ invalidate(Dependencies.DEPLOYMENTS)} />
diff --git a/src/routes/(console)/project-[project]/functions/function-[function]/settings/executeFunction.svelte b/src/routes/(console)/project-[project]/functions/function-[function]/settings/executeFunction.svelte
index 3feb55e48..cbedc4de8 100644
--- a/src/routes/(console)/project-[project]/functions/function-[function]/settings/executeFunction.svelte
+++ b/src/routes/(console)/project-[project]/functions/function-[function]/settings/executeFunction.svelte
@@ -16,7 +16,7 @@
Runtime
-
+
{capitalize($func.runtime)}
@@ -25,7 +25,7 @@
Updated
-
+
{capitalize(timeFromNow($func.$updatedAt))}
@@ -36,7 +36,7 @@
Created
-
+
{toLocaleDateTime($func.$createdAt)}
diff --git a/src/routes/(console)/project-[project]/functions/function-[function]/settings/updateLogging.svelte b/src/routes/(console)/project-[project]/functions/function-[function]/settings/updateLogging.svelte
index a5a92f00a..8959cdc47 100644
--- a/src/routes/(console)/project-[project]/functions/function-[function]/settings/updateLogging.svelte
+++ b/src/routes/(console)/project-[project]/functions/function-[function]/settings/updateLogging.svelte
@@ -58,7 +58,7 @@