From 99b767a14235dcef389ccf8f0e4294893d556aeb Mon Sep 17 00:00:00 2001 From: Arman Date: Thu, 10 Nov 2022 18:09:44 +0100 Subject: [PATCH] feat: add output copy to function and logs --- src/lib/components/index.ts | 1 + src/lib/components/output.svelte | 17 +++++++++++++++++ src/lib/layout/logs.svelte | 16 +++++++++++++--- .../function-[function]/[[page]]/+page.svelte | 14 ++++++++++++-- 4 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 src/lib/components/output.svelte diff --git a/src/lib/components/index.ts b/src/lib/components/index.ts index 1752e1a21..c07033361 100644 --- a/src/lib/components/index.ts +++ b/src/lib/components/index.ts @@ -42,3 +42,4 @@ export { default as Tab } from './tab.svelte'; export { default as EventModal } from './eventModal.svelte'; export { default as Status } from './status.svelte'; export { default as Heading } from './heading.svelte'; +export { default as Output } from './output.svelte'; diff --git a/src/lib/components/output.svelte b/src/lib/components/output.svelte new file mode 100644 index 000000000..1430ef409 --- /dev/null +++ b/src/lib/components/output.svelte @@ -0,0 +1,17 @@ + + + +
+ + +
+ +
+
+
diff --git a/src/lib/layout/logs.svelte b/src/lib/layout/logs.svelte index 7b9c14fa5..6ec59687d 100644 --- a/src/lib/layout/logs.svelte +++ b/src/lib/layout/logs.svelte @@ -2,7 +2,7 @@ import { toLocaleDateTime } from '$lib/helpers/date'; import { humanFileSize } from '$lib/helpers/sizeConvertion'; import { log } from '$lib/stores/logs'; - import { Status, Tab, Tabs } from '../components'; + import { Output, Status, Tab, Tabs } from '../components'; import { Button } from '$lib/elements/forms'; import { base } from '$app/paths'; import { app } from '$lib/stores/app'; @@ -68,7 +68,12 @@ alt="technology" />
-

Deployment ID: {$log.data.$id}

+
+

Deployment ID:

+ + {$log.data.$id} + +
Size: {size.value} {size.unit}
@@ -131,7 +136,12 @@ alt="technology" />
-

Execution ID: {$log.data.$id}

+
+

Execution ID:

+ + {$log.data.$id} + +
diff --git a/src/routes/console/project-[project]/functions/function-[function]/[[page]]/+page.svelte b/src/routes/console/project-[project]/functions/function-[function]/[[page]]/+page.svelte index fa4083cdf..44b48650a 100644 --- a/src/routes/console/project-[project]/functions/function-[function]/[[page]]/+page.svelte +++ b/src/routes/console/project-[project]/functions/function-[function]/[[page]]/+page.svelte @@ -37,6 +37,7 @@ import { browser } from '$app/environment'; import { sdkForConsole } from '$lib/stores/sdk'; import { page } from '$app/stores'; + import Output from '$lib/components/output.svelte'; export let data: PageData; @@ -98,8 +99,17 @@ alt="technology" />
-

Function ID: {$func.$id}

-

Deployment ID: {$func.deployment}

+
+

Function ID:

+ {$func.$id} +
+ +
+

Deployment ID:

+ + {$func.deployment} + +