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 93e18725d7..91ef9eeedf 100644 --- a/frontend/src/routes/(root)/(logged)/flows/get/[...path]/+page.svelte +++ b/frontend/src/routes/(root)/(logged)/flows/get/[...path]/+page.svelte @@ -15,7 +15,7 @@ import DetailPageLayout from '$lib/components/details/DetailPageLayout.svelte' import { goto } from '$lib/navigation' import { base } from '$lib/base' - import { Alert, Badge as HeaderBadge, Skeleton } from '$lib/components/common' + import { Alert, Badge as HeaderBadge } from '$lib/components/common' import MoveDrawer from '$lib/components/MoveDrawer.svelte' import RunForm from '$lib/components/RunForm.svelte' import ShareModal from '$lib/components/ShareModal.svelte' @@ -409,11 +409,6 @@ let mainButtons = $derived(getMainButtons(flow, args)) - @@ -428,234 +423,235 @@ {/if} -{#if flow} - - {#snippet header()} - {#if flow} - { + + {#snippet header()} + { + rightPaneSelected = 'triggers' + }} + {mainButtons} + menuItems={getMenuItems(flow, deployUiSettings)} + title={defaultIfEmptyString(flow?.summary, flow?.path ?? '')} + bind:errorHandlerMuted={ + () => flow?.ws_error_handler_muted ?? false, + (v) => { + if (flow?.ws_error_handler_muted) { + flow.ws_error_handler_muted = v + } + } + } + scriptOrFlowPath={flow?.path ?? ''} + errorHandlerKind="flow" + tag={flow?.tag ?? ''} + > + + {#snippet trigger_badges()} + { rightPaneSelected = 'triggers' + await tick() + triggersState.selectedTriggerIndex = triggerIndex }} - {mainButtons} - menuItems={getMenuItems(flow, deployUiSettings)} - title={defaultIfEmptyString(flow.summary, flow.path)} - bind:errorHandlerMuted={flow.ws_error_handler_muted} - scriptOrFlowPath={flow.path} - errorHandlerKind="flow" - tag={flow.tag} - > - - {#snippet trigger_badges()} - { - rightPaneSelected = 'triggers' - await tick() - triggersState.selectedTriggerIndex = triggerIndex - }} - small={false} - /> - {/snippet} - {#if $workspaceStore} - { - starred = !starred - }} - /> - {/if} - {#if flow?.value?.priority != undefined} - - {/if} - {#if flow?.value?.concurrent_limit != undefined && flow?.value?.concurrency_time_window_s != undefined} - - {/if} - + small={false} + /> + {/snippet} + {#if $workspaceStore && flow} + { + starred = !starred + }} + /> {/if} - {/snippet} - {#snippet form()} - {#if flow} -
-
-
- {#if !emptyString(flow?.description)} - - {/if} + {#if flow?.value?.priority != undefined} + + {/if} + {#if flow?.value?.concurrent_limit != undefined && flow?.value?.concurrency_time_window_s != undefined} + + {/if} + + {/snippet} + {#snippet form()} + {#if flow} +
+
+
+ {#if !emptyString(flow?.description)} + + {/if} +
+ + {#if deploymentInProgress} + + + Deployment in progress + + {/if} + {#if flow.lock_error_logs && flow.lock_error_logs != ''} + + {/if} - {#if deploymentInProgress} - - - Deployment in progress - - {/if} - {#if flow.lock_error_logs && flow.lock_error_logs != ''} - - {/if} - -
-
- { - savedInputsV2?.resetSelected() - }} - {inputSelected} - /> - { - runForm?.setCode(JSON.stringify(args ?? {}, null, '\t')) - }} - /> -
- - {#if flow.schema?.prompt_for_ai !== undefined} - { - goto(`/flows/edit/${flow?.path}`) - }} - runnableType="flow" - /> - {/if} - - +
+ { + savedInputsV2?.resetSelected() + }} + {inputSelected} + /> + { + runForm?.setCode(JSON.stringify(args ?? {}, null, '\t')) + }} />
-
- - {#if !emptyString(flow.summary)} -
- {flow.path} -
+ {#if flow.schema?.prompt_for_ai !== undefined} + { + goto(`/flows/edit/${flow?.path}`) + }} + runnableType="flow" + /> {/if} -
- - Edited by {flow.edited_by} - - {#if flow.archived} -
- This flow was archived - {/if} -
-
-
- { - if (e.detail) { - stepDetail = e.detail - rightPaneSelected = 'flow_step' - } else { - stepDetail = undefined - rightPaneSelected = 'saved_inputs' - } - }} - on:triggerDetail={(e) => { - rightPaneSelected = 'triggers' - }} +
-
- {/if} - {/snippet} - {#snippet save_inputs()} - { - const nargs = JSON.parse(JSON.stringify(e.detail)) - args = nargs - }} - /> - {/snippet} - {#snippet flow_step()} - {#if flow} - {#if stepDetail} - - {/if} +
+ + {#if !emptyString(flow.summary)} +
+ {flow.path} +
+ {/if} +
+ + Edited by {flow.edited_by} + + + {#if flow.archived} +
+ This flow was archived + {/if} +
+
+
+ { + if (e.detail) { + stepDetail = e.detail + rightPaneSelected = 'flow_step' + } else { + stepDetail = undefined + rightPaneSelected = 'saved_inputs' + } + }} + on:triggerDetail={(e) => { + rightPaneSelected = 'triggers' + }} + /> +
+
+ {/if} + {/snippet} + {#snippet save_inputs()} + { + const nargs = JSON.parse(JSON.stringify(e.detail)) + args = nargs + }} + /> + {/snippet} + + {#snippet flow_step()} + {#if flow} + {#if stepDetail} + {/if} - {/snippet} - {#snippet triggers()} - {#if flow} - - {/if} - {/snippet} - -{/if} + {/if} + {/snippet} + {#snippet triggers()} + {#if flow} + + {/if} + {/snippet} + -{#if script} - - (versionsDrawerOpen = false)} noPadding> + + (versionsDrawerOpen = false)} noPadding> + {#if script} - - - {#key script.hash} - - {#snippet header()} - {#if script} - { - rightPaneSelected = 'triggers' - }} - > - {#snippet trigger_badges()} - { - if (rightPaneSelected !== 'triggers') { - rightPaneSelected = 'triggers' - } - await tick() - triggersState.selectedTriggerIndex = triggerIndex - }} - /> - {/snippet} - {#if $workspaceStore} - { - starred = !starred - }} - /> - {/if} - {#if script.codebase} - bundleThis script is deployed as a bundle and can only be deployed from the CLI for now - {/if} - {#if script?.priority != undefined} - - {/if} - {#if script?.restart_unless_cancelled ?? false} - - {/if} - {#if script?.concurrent_limit != undefined && script.concurrency_time_window_s != undefined} - - {/if} - - {/if} - {/snippet} - {#snippet form()} - {#if script} -
-
- {#if script.lock_error_logs || topHash || script.archived || script.deleted} -
- {#if script.lock_error_logs} - - {/if} - {#if topHash} -
- - This hash is not HEAD (latest non-archived version at this path) : - Go to the HEAD of this path - - {/if} - {#if script.archived && !topHash} - This path was archived - {/if} - {#if script.deleted} - - {/if} -
- {/if} - - {#if !emptyString(script.description)} - - {/if} -
- - {#if deploymentInProgress} - - - Deployment in progress - - {/if} - -
-
- { - savedInputsV2?.resetSelected() - }} - {inputSelected} - /> - { - runForm?.setCode(JSON.stringify(args ?? {}, null, '\t')) - }} - /> -
- - {#if script?.schema?.prompt_for_ai !== undefined} - { - goto(`/scripts/edit/${script?.path}?metadata_open=true`) - }} - runnableType="script" - /> - {/if} - - -
- -
- {#if !emptyString(script.summary)} -
- {script.path} -
- {/if} -
- - Edited by {script.created_by || - 'unknown'} - - - {truncateHash(script?.hash ?? '')} - - {#if script?.is_template} - Template - {/if} - {#if script && script.kind !== 'script'} - - {script?.kind} - - {/if} - - -
-
- {/if} - {/snippet} - {#snippet save_inputs()} - {#if args} - { - const nargs = JSON.parse(JSON.stringify(e.detail)) - args = nargs - }} - /> - {/if} - {/snippet} - {#snippet triggers()} - {#if script} - +
+{#key script?.hash} + + {#snippet header()} + script?.ws_error_handler_muted ?? false, + (v) => { + if (script?.ws_error_handler_muted) { + script.ws_error_handler_muted = v + } + } + } + errorHandlerKind="script" + scriptOrFlowPath={script?.path ?? ''} + tag={script?.tag ?? ''} + on:seeTriggers={() => { + rightPaneSelected = 'triggers' + }} + > + {#snippet trigger_badges()} + { + if (rightPaneSelected !== 'triggers') { + rightPaneSelected = 'triggers' + } + await tick() + triggersState.selectedTriggerIndex = triggerIndex + }} + /> + {/snippet} + {#if $workspaceStore && script} + { + starred = !starred + }} /> {/if} - {/snippet} - {#snippet scriptRender()} - {#if script} -
- - - - Code - Lockfile - Schema - {#snippet content()} - {#if script} - -
- -
-
- -
- {#if script?.lock} -
-
- {:else} -

- There is no lock file for this script -

- {/if} -
-
- -
- - -
-
+ {#if script?.codebase} + bundleThis script is deployed as a bundle and can only be deployed from the CLI for now + {/if} + {#if script?.priority != undefined} + + {/if} + {#if script?.restart_unless_cancelled ?? false} + + {/if} + {#if script?.concurrent_limit != undefined && script.concurrency_time_window_s != undefined} + + {/if} + + {/snippet} + {#snippet form()} + {#if script} +
+
+ {#if script.lock_error_logs || topHash || script.archived || script.deleted} +
+ {#if script.lock_error_logs} + {/if} - {/snippet} - + {#if topHash} +
+ + This hash is not HEAD (latest non-archived version at this path) : + Go to the HEAD of this path + + {/if} + {#if script.archived && !topHash} + This path was archived + {/if} + {#if script.deleted} + + {/if} +
+ {/if} + + {#if !emptyString(script.description)} + + {/if}
- {#if script.envs && script.envs.length > 0} -

Static Env Variables

-
    - {#each script.envs as e} -
  • {e}
  • - {/each} -
+ {#if deploymentInProgress} + + + Deployment in progress + {/if} - {/if} - {/snippet} - - {/key} -{/if} + +
+
+ { + savedInputsV2?.resetSelected() + }} + {inputSelected} + /> + { + runForm?.setCode(JSON.stringify(args ?? {}, null, '\t')) + }} + /> +
+ + {#if script?.schema?.prompt_for_ai !== undefined} + { + goto(`/scripts/edit/${script?.path}?metadata_open=true`) + }} + runnableType="script" + /> + {/if} + + +
+ +
+ {#if !emptyString(script.summary)} +
+ {script.path} +
+ {/if} +
+ + Edited by {script.created_by || 'unknown'} + + + {truncateHash(script?.hash ?? '')} + + {#if script?.is_template} + Template + {/if} + {#if script && script.kind !== 'script'} + + {script?.kind} + + {/if} + + +
+
+ {/if} + {/snippet} + {#snippet save_inputs()} + {#if args} + { + const nargs = JSON.parse(JSON.stringify(e.detail)) + args = nargs + }} + /> + {/if} + {/snippet} + {#snippet triggers()} + {#if script} + + {/if} + {/snippet} + {#snippet scriptRender()} +
+ + + + Code + Lockfile + Schema + {#snippet content()} + {#if script} + +
+ +
+
+ +
+ {#if script?.lock} +
+
+ {:else} +

+ There is no lock file for this script +

+ {/if} +
+
+ +
+ + +
+
+ {/if} + {/snippet} +
+
+ + {#if script?.envs && script.envs.length > 0} +

Static Env Variables

+
    + {#each script?.envs as e} +
  • {e}
  • + {/each} +
+ {/if} + {/snippet} + +{/key}