diff --git a/frontend/src/lib/components/RunChart.svelte b/frontend/src/lib/components/RunChart.svelte index a06a976186..fe1ac4a536 100644 --- a/frontend/src/lib/components/RunChart.svelte +++ b/frontend/src/lib/components/RunChart.svelte @@ -45,15 +45,24 @@ backgroundColor: '#f87171', label: 'Failed', data: - failed?.map((job) => ({ x: job.created_at as any, y: job.duration_ms, id: job.id })) ?? [] + failed?.map((job) => ({ + x: job.created_at as any, + y: job.duration_ms, + id: job.id, + path: job.script_path + })) ?? [] }, { // borderColor: 'rgba(99,0,125, .2)', backgroundColor: '#4ade80', label: 'Successful', data: - success?.map((job) => ({ x: job.created_at as any, y: job.duration_ms, id: job.id })) ?? - [] + success?.map((job) => ({ + x: job.created_at as any, + y: job.duration_ms, + id: job.id, + path: job.script_path + })) ?? [] } ] } @@ -76,6 +85,10 @@ } } } + + function getPath(x: any): string { + return x.path + } { $previewArgs = captureInput $flowStore.schema = jsonSchema + sendUserToast('Copied as flow inputs and test args') }}>Copy as flow inputs and test args diff --git a/frontend/src/lib/components/flows/flowStore.ts b/frontend/src/lib/components/flows/flowStore.ts index 27f03d1eda..071e267275 100644 --- a/frontend/src/lib/components/flows/flowStore.ts +++ b/frontend/src/lib/components/flows/flowStore.ts @@ -1,4 +1,5 @@ import type { Flow, FlowModule, ForloopFlow, InputTransform } from '$lib/gen' +import { sendUserToast } from '$lib/utils' import { get, writable, derived } from 'svelte/store' import { flowStateStore, initFlowState, type FlowState } from './flowState' import { numberToChars } from './utils' @@ -124,4 +125,5 @@ export async function copyFirstStepSchema() { } return flow }) + sendUserToast('Copied first step schema as flow input schema') } diff --git a/frontend/src/routes/flows/get/[...path].svelte b/frontend/src/routes/flows/get/[...path].svelte index dbf8bb467a..765676addc 100644 --- a/frontend/src/routes/flows/get/[...path].svelte +++ b/frontend/src/routes/flows/get/[...path].svelte @@ -43,6 +43,7 @@ import UserSettings from '$lib/components/UserSettings.svelte' import JobArgs from '$lib/components/JobArgs.svelte' import CronInput from '$lib/components/CronInput.svelte' + import Icon from 'svelte-awesome' let userSettings: UserSettings @@ -194,7 +195,6 @@

{flow.path}

{/if} {/if} -
@@ -204,7 +204,10 @@ /> {#if flow}

Edited {displayDaysAgo(flow.edited_at ?? '')} by {flow.edited_by}

Edited {displayDaysAgo(flow.edited_at ?? '')} by {flow.edited_by} + + Webhook +

{#if flow.archived} @@ -213,13 +216,13 @@

This version was archived

{/if} -
+
-
+
-

WebhookTo trigger this script with a webhook, do a POST request to the endpoint below. Flows are not public and can only be run by users with at least view rights on them. You @@ -232,25 +235,24 @@
{ + e.preventDefault() + copyToClipboard(url) + }} href={$page.url.protocol + '//' + url} class="whitespace-nowrap text-ellipsis overflow-hidden mr-1" > {url} + + + - +
{#if schedule} -
+

Primary Schedule
{schedule.schedule} diff --git a/frontend/src/routes/run/[...run].svelte b/frontend/src/routes/run/[...run].svelte index 04b5037291..377266b463 100644 --- a/frontend/src/routes/run/[...run].svelte +++ b/frontend/src/routes/run/[...run].svelte @@ -264,19 +264,6 @@
- - {#if job?.job_kind == 'flow' || job?.job_kind == 'flowpreview'} -
- -
- { - job = detail - }} - /> -
- {/if}
@@ -320,6 +307,17 @@
{/if}
+ {:else} +
+ +
+ { + job = detail + }} + /> +
{/if} {/if} diff --git a/frontend/src/routes/scripts/get/[...hash].svelte b/frontend/src/routes/scripts/get/[...hash].svelte index 9e75e3b4da..0309bf3ccf 100644 --- a/frontend/src/routes/scripts/get/[...hash].svelte +++ b/frontend/src/routes/scripts/get/[...hash].svelte @@ -45,6 +45,7 @@ import { Badge, Tabs, Tab, TabContent, Button, ActionRow } from '$lib/components/common' import Skeleton from '../../../lib/components/common/skeleton/Skeleton.svelte' import UserSettings from '$lib/components/UserSettings.svelte' + import Icon from 'svelte-awesome' let userSettings: UserSettings let script: Script | undefined @@ -257,6 +258,9 @@ {truncateHash(script?.hash ?? '')} + + Webhooks + {#if script?.is_template} Template {/if} @@ -286,7 +290,7 @@ {#if script} -
+

Description

@@ -359,7 +363,7 @@ {/if} {/if} -
+

Arguments JSON schema @@ -377,7 +381,7 @@ {/if}

-

Code

+

Code

{#if script} @@ -385,7 +389,7 @@
-

WebhooksTo trigger this script with a webhook, do a POST request to the endpoints below. Scripts are not public and can only be run by users with at least view rights on them. You will need @@ -409,25 +413,21 @@ {@const url = webhooks[key][type]}
  • { + e.preventDefault() + copyToClipboard(url) + }} href={$page.url.protocol + '//' + url} class="whitespace-nowrap text-ellipsis overflow-hidden mr-1" > {url} + + + -
    - - {type} - - -
    + + {type} +
  • {/each}