From 99246382eeef3c69b6cfca6c50647bb263d05f7f Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Wed, 18 Jan 2023 17:50:30 +0100 Subject: [PATCH] minor UI fixes --- .../(logged)/flows/get/[...path]/+page.svelte | 218 ++++++++++-------- .../(logged)/flows/run/[...path]/+page.svelte | 4 +- .../(root)/(logged)/folders/+page.svelte | 2 +- .../scripts/get/[...hash]/+page.svelte | 81 ++++--- 4 files changed, 178 insertions(+), 127 deletions(-) diff --git a/frontend/src/routes/(root)/(logged)/flows/get/[...path]/+page.svelte b/frontend/src/routes/(root)/(logged)/flows/get/[...path]/+page.svelte index dcf1bdae41..a99ef34c68 100644 --- a/frontend/src/routes/(root)/(logged)/flows/get/[...path]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/flows/get/[...path]/+page.svelte @@ -39,6 +39,7 @@ import { goto } from '$app/navigation' import ScheduleEditor from '$lib/components/ScheduleEditor.svelte' import { slide } from 'svelte/transition' + import MoveDrawer from '$lib/components/MoveDrawer.svelte' let userSettings: UserSettings @@ -129,6 +130,9 @@ )}' ${$page.url.protocol}//${$page.url.hostname}/api/w/${$workspaceStore}/jobs/run/f/${ flow?.path }` + + let webhook: HTMLHeadElement + let moveDrawer: MoveDrawer loadSchedule()} bind:this={scheduleEditor} /> @@ -140,114 +144,138 @@ loading={!flow} layout={[0.75, [2, 0, 2], 2.25, [{ h: 1.5, w: 40 }], 0.2, [{ h: 1, w: 30 }]]} /> -{#if flow} - - - - - - - - - {#if !$userStore?.operator} - - - {/if} - - - -{/if} + + { + await goto('/flows/get/' + e.detail) + loadFlow() + loadSchedule() + }} +/> {#if flow} -

- {defaultIfEmptyString(flow.summary, flow.path)} -

- {#if !emptyString(flow.summary)} -

{flow.path}

- {/if} +
+
+

+ {defaultIfEmptyString(flow.summary, flow.path)} +

+
+ + {#if !$userStore?.operator} + + + {/if} + +
+
+ {#if !emptyString(flow.summary)} + {flow.path} + {/if} +
{/if} -
+
{#if flow} -

Edited {displayDaysAgo(flow.edited_at ?? '')} by {flow.edited_by} - - Webhook - - {#if schedule} - - Primary schedule - {/if}

+
+ + Edited {displayDaysAgo(flow.edited_at ?? '')} by {flow.edited_by} - {#if flow.archived} -
-
+
-

Webhook Pass the input as a json payload, the token as a Bearer token or as query arg `?token=XXX` and pass as header: 'Content-Type: application/json
- {script.path} + {#if !emptyString(script.summary)} + {script.path} + {/if} -
-

+

+ Edited {displayDaysAgo(script.created_at || '')} by {script.created_by || 'unknown'} -

-
- - {truncateHash(script?.hash ?? '')} + + + {truncateHash(script?.hash ?? '')} + + {#if script?.is_template} + Template + {/if} + {#if script && script.kind !== 'script'} + + {script?.kind} - - Webhooks - - {#if script?.is_template} - Template - {/if} - {#if script && script.kind !== 'script'} - - {script?.kind} - - {/if} - {#if deploymentInProgress} - - - Deployment in progress - - {/if} - -
+ {/if} + {#if deploymentInProgress} + + + Deployment in progress + + {/if} +
-
+
+ + {#if Array.isArray(script.parent_hashes) && script.parent_hashes.length > 0} -
+
-

+

Webhooks Pass the input as a json payload, the token as a Bearer token or as query arg