diff --git a/frontend/src/lib/components/Section.svelte b/frontend/src/lib/components/Section.svelte index eeb00bcce0..0dfbfaface 100644 --- a/frontend/src/lib/components/Section.svelte +++ b/frontend/src/lib/components/Section.svelte @@ -5,7 +5,7 @@ export let tooltip: string | undefined = undefined -
+

{label} diff --git a/frontend/src/lib/components/flows/content/FlowModuleCache.svelte b/frontend/src/lib/components/flows/content/FlowModuleCache.svelte index 8c9ab08182..e19cf2b1ab 100644 --- a/frontend/src/lib/components/flows/content/FlowModuleCache.svelte +++ b/frontend/src/lib/components/flows/content/FlowModuleCache.svelte @@ -1,4 +1,6 @@ -

- Cache - - If defined, the result of the step will be cached for the number of seconds defined such that if - this step were to be re-triggered with the same input it would retrieve and return its cached - value instead of recomputing it. - -

-{#if flowModule.value.type != 'rawscript'} -

The cache settings need to be set in the referenced script/flow settings directly. Cache for - hub scripts is not available yet.

-{:else} - { - if (isCacheEnabled && flowModule.cache_ttl != undefined) { - flowModule.cache_ttl = undefined - } else { - flowModule.cache_ttl = 600 - } - }} - options={{ - right: 'Cache the results for each possible inputs' - }} - /> -
- How long to keep cache valid +
+ + + If defined, the result of the step will be cached for the number of seconds defined such that + if this step were to be re-triggered with the same input it would retrieve and return its + cached value instead of recomputing it. + + - {#if flowModule.cache_ttl} - - {:else} - - {/if} -
-{/if} + {#if flowModule.value.type != 'rawscript'} +

The cache settings need to be set in the referenced script/flow settings directly. Cache for + hub scripts is not available yet.

+ {:else} + { + if (isCacheEnabled && flowModule.cache_ttl != undefined) { + flowModule.cache_ttl = undefined + } else { + flowModule.cache_ttl = 600 + } + }} + options={{ + right: 'Cache the results for each possible inputs' + }} + /> + + {/if} + diff --git a/frontend/src/lib/components/flows/content/FlowModuleEarlyStop.svelte b/frontend/src/lib/components/flows/content/FlowModuleEarlyStop.svelte index 0b259c7a28..ae859591c8 100644 --- a/frontend/src/lib/components/flows/content/FlowModuleEarlyStop.svelte +++ b/frontend/src/lib/components/flows/content/FlowModuleEarlyStop.svelte @@ -7,6 +7,7 @@ import type { FlowEditorContext } from '../types' import { getContext } from 'svelte' import { NEVER_TESTED_THIS_FAR } from '../models' + import Section from '$lib/components/Section.svelte' const { flowStateStore } = getContext('FlowEditorContext') @@ -15,72 +16,75 @@ let editor: SimpleEditor | undefined = undefined $: isStopAfterIfEnabled = Boolean(flowModule.stop_after_if) - $: result = $flowStateStore[flowModule.id]?.previewResult ?? NEVER_TESTED_THIS_FAR
-

- Early stop/Break - - If defined, at the end of the step, the predicate expression will be evaluated to decide if - the flow should stop early. - -

- { - if (isStopAfterIfEnabled && flowModule.stop_after_if) { - flowModule.stop_after_if = undefined - } else { - flowModule.stop_after_if = { - expr: 'result == undefined', - skip_if_stopped: false - } - } - }} - options={{ - right: 'Early stop or Break if condition met' - }} - /> +
+ + + If defined, at the end of the step, the predicate expression will be evaluated to decide if + the flow should stop early. + + -
- {#if flowModule.stop_after_if} - - Stop condition expression -
- { - editor?.insertAtCursor(detail) - editor?.focus() + { + if (isStopAfterIfEnabled && flowModule.stop_after_if) { + flowModule.stop_after_if = undefined + } else { + flowModule.stop_after_if = { + expr: 'result == undefined', + skip_if_stopped: false + } + } + }} + options={{ + right: 'Early stop or Break if condition met' + }} + /> + +
+ {#if flowModule.stop_after_if} + - - -
- {:else} - Stop condition expression -