diff --git a/frontend/src/lib/components/flows/content/BranchPredicateEditor.svelte b/frontend/src/lib/components/flows/content/BranchPredicateEditor.svelte index f965fc41ee..dc583c6388 100644 --- a/frontend/src/lib/components/flows/content/BranchPredicateEditor.svelte +++ b/frontend/src/lib/components/flows/content/BranchPredicateEditor.svelte @@ -39,12 +39,14 @@ editor?.insertAtCursor(detail) }} > - +
+ +
diff --git a/frontend/src/lib/components/flows/content/FlowInputs.svelte b/frontend/src/lib/components/flows/content/FlowInputs.svelte index 7358839990..b7b7755dd1 100644 --- a/frontend/src/lib/components/flows/content/FlowInputs.svelte +++ b/frontend/src/lib/components/flows/content/FlowInputs.svelte @@ -27,133 +27,143 @@
- {#if !failureModule} -
-
- - - Action   - An action script is simply a script that is neither a trigger nor an approval script. - Those are the majority of the scripts. - - - {#if !shouldDisableTriggerScripts} - - Trigger   - Used as a first step most commonly with a state and a schedule to watch for changes - on an external system, compute the diff since last time, set the new state. The - diffs are then treated one by one with a for-loop. + {#if summary == 'Terminate flow'} + This is an identity step with an early stop that has 'true' for expression + {:else}{#if !failureModule} +
+
+ + + Action   + An action script is simply a script that is neither a trigger nor an approval + script. Those are the majority of the scripts. - {/if} - - Approval   - An approval step will suspend the execution of a flow until it has been approved - through the resume endpoints or the approval page by and solely by the recipients of - those secret urls. Use `wmill.getResumeUrls()` in Typescript or - `wmill.get_resume_urls()` in Python from the wmill client to generate those URLs. - - - + {#if !shouldDisableTriggerScripts} + + Trigger   + Used as a first step most commonly with a state and a schedule to watch for + changes on an external system, compute the diff since last time, set the new + state. The diffs are then treated one by one with a for-loop. + + + {/if} + + Approval   + An approval step will suspend the execution of a flow until it has been approved + through the resume endpoints or the approval page by and solely by the recipients of + those secret urls. Use `wmill.getResumeUrls()` in Typescript or + `wmill.get_resume_urls()` in Python from the wmill client to generate those URLs. + + + +
-
- {/if} - {#if kind == 'trigger'} -
- - A schedule will be automatically attached to this flow to run every 15 minutes. Adjust - frequency in 'Settings -> Schedule' - {/if} -

- Inline new {kind == 'script' ? 'action' : kind} script - - Embed a script directly inside a flow instead of saving the script into your workspace for - reuse. You can always save an inline script to your workspace later. - -

-
-
- { - dispatch('new', { - language: RawScript.language.DENO, - kind, - subkind: 'flow' - }) - }} - /> - - { - dispatch('new', { - language: RawScript.language.PYTHON3, - kind, - subkind: 'flow' - }) - }} - /> - - {#if kind != 'approval'} + {/if} + {#if kind == 'trigger'} +
+ + A schedule will be automatically attached to this flow to run every 15 minutes. Adjust + frequency in 'Settings -> Schedule' + {/if} +

+ Inline new {kind == 'script' ? 'action' : kind} script + + Embed a script directly inside a flow instead of saving the script into your workspace for + reuse. You can always save an inline script to your workspace later. + +

+
+
{ dispatch('new', { - language: RawScript.language.GO, - kind, - subkind: 'flow' - }) - }} - /> - {/if} - - {#if kind == 'script'} - { - dispatch('new', { - language: RawScript.language.BASH, + language: RawScript.language.DENO, kind, subkind: 'flow' }) }} /> - {#if !failureModule} - - dispatch('new', { language: RawScript.language.DENO, kind, subkind: 'pgsql' })} - /> + { + dispatch('new', { + language: RawScript.language.PYTHON3, + kind, + subkind: 'flow' + }) + }} + /> + {#if kind != 'approval'} - dispatch('new', { language: RawScript.language.DENO, kind, subkind: 'mysql' })} + label="Go" + lang={Script.language.GO} + on:click={() => { + dispatch('new', { + language: RawScript.language.GO, + kind, + subkind: 'flow' + }) + }} /> {/if} - {/if} -
-
-

Use pre-made {kind == 'script' ? 'action' : kind} script

- {#if pick_existing == 'hub'} - - - - {:else} - - - + {#if kind == 'script'} + { + dispatch('new', { + language: RawScript.language.BASH, + kind, + subkind: 'flow' + }) + }} + /> + + {#if !failureModule} + + dispatch('new', { language: RawScript.language.DENO, kind, subkind: 'pgsql' })} + /> + + + dispatch('new', { language: RawScript.language.DENO, kind, subkind: 'mysql' })} + /> + {/if} + {/if} +
+
+ +

Use pre-made {kind == 'script' ? 'action' : kind} script

+ {#if pick_existing == 'hub'} + + + + {:else} + + + + {/if} {/if}
diff --git a/frontend/src/lib/components/flows/content/FlowSettings.svelte b/frontend/src/lib/components/flows/content/FlowSettings.svelte index d3ca544de8..b596ed6320 100644 --- a/frontend/src/lib/components/flows/content/FlowSettings.svelte +++ b/frontend/src/lib/components/flows/content/FlowSettings.svelte @@ -14,12 +14,20 @@ import { getContext } from 'svelte' import type { FlowEditorContext } from '../types' import autosize from 'svelte-autosize' + import Slider from '$lib/components/Slider.svelte' + import { page } from '$app/stores' + import { workspaceStore } from '$lib/stores' + import { copyToClipboard } from '$lib/utils' + import { Icon } from 'svelte-awesome' + import { faClipboard } from '@fortawesome/free-solid-svg-icons' const { selectedId } = getContext('FlowEditorContext') export let initialPath: string let topHeight = 0 + + $: url = `${$page.url.hostname}/api/w/${$workspaceStore}/jobs/run/f/${$flowStore?.path}`
@@ -32,34 +40,78 @@ Graph - - - -