diff --git a/frontend/src/lib/components/flows/content/FlowConstants.svelte b/frontend/src/lib/components/flows/content/FlowConstants.svelte index 4b8185531a661..df0688f177581 100644 --- a/frontend/src/lib/components/flows/content/FlowConstants.svelte +++ b/frontend/src/lib/components/flows/content/FlowConstants.svelte @@ -121,7 +121,7 @@ {/if} {/if} - {#each steps as [args, filter, m] (m.id)} + {#each steps as [args, filter, m], index (m.id + index)} {#if filter.length > 0}

diff --git a/frontend/src/lib/components/graph/FlowGraphV2.svelte b/frontend/src/lib/components/graph/FlowGraphV2.svelte index 680fadd534a6b..4a990b4ec6e68 100644 --- a/frontend/src/lib/components/graph/FlowGraphV2.svelte +++ b/frontend/src/lib/components/graph/FlowGraphV2.svelte @@ -32,6 +32,9 @@ import { encodeState } from '$lib/utils' import BranchOneStart from './renderers/nodes/BranchOneStart.svelte' import NoBranchNode from './renderers/nodes/NoBranchNode.svelte' + import { Alert, Drawer } from '../common' + import Button from '../common/button/Button.svelte' + import FlowYamlEditor from '../flows/header/FlowYamlEditor.svelte' export let success: boolean | undefined = undefined export let modules: FlowModule[] | undefined = [] @@ -178,6 +181,10 @@ let height = 0 function updateStores() { + if (graph.error) { + return + } + $nodes = layoutNodes(graph?.nodes) $edges = graph.edges @@ -236,69 +243,87 @@ onMount(() => { centerViewport(width) }) + let yamlEditorDrawer: Drawer | undefined = undefined + +
- -
- - {#if download} - { - try { - localStorage.setItem( - 'svelvet', - encodeState({ modules, failureModule, preprocessorModule }) - ) - } catch (e) { - console.error('error interacting with local storage', e) - } - window.open('/view_graph', '_blank') - }} - class="!bg-surface" + {#if graph?.error} +
+ + {graph.error} + + - - - {/if} - - - +
+ {:else} + - {#if showDataflow} - { - $useDataflow = !$useDataflow - }} - size="xs" - options={{ - right: 'Dataflow' - }} - /> - {/if} -
- +
+ + {#if download} + { + try { + localStorage.setItem( + 'svelvet', + encodeState({ modules, failureModule, preprocessorModule }) + ) + } catch (e) { + console.error('error interacting with local storage', e) + } + window.open('/view_graph', '_blank') + }} + class="!bg-surface" + > + + + {/if} + + + + {#if showDataflow} + { + $useDataflow = !$useDataflow + }} + size="xs" + options={{ + right: 'Dataflow' + }} + /> + {/if} + + + {/if}