diff --git a/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte b/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte
index 7d0b1ad2dd..a77a6dbb57 100644
--- a/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte
+++ b/frontend/src/lib/components/flows/content/FlowModuleComponent.svelte
@@ -341,7 +341,11 @@
{#if !noEditor}
{#key forceReload}
-
+
{/key}
{/if}
diff --git a/frontend/src/lib/components/flows/content/FlowModuleScript.svelte b/frontend/src/lib/components/flows/content/FlowModuleScript.svelte
index 9ef8344bf0..225a6f8340 100644
--- a/frontend/src/lib/components/flows/content/FlowModuleScript.svelte
+++ b/frontend/src/lib/components/flows/content/FlowModuleScript.svelte
@@ -8,14 +8,15 @@
export let path: string
export let hash: string | undefined = undefined
-
export let showDate = false
+ export let showAllCode: boolean = true
+
let code: string
let language: SupportedLanguage
let lock: string | undefined = undefined
let date: string | undefined = undefined
-
let notFound = false
+
async function loadCode(path: string, hash: string | undefined) {
try {
notFound = false
@@ -33,6 +34,10 @@
}
$: path && loadCode(path, hash)
+
+ function toggleShowAll() {
+ showAllCode = !showAllCode
+ }
@@ -41,8 +46,13 @@
{/if}
{#if notFound}
script not found at {path} in workspace {$workspaceStore}
- {:else}
+ {:else if showAllCode}
+ {:else}
+
+
+
+
{/if}
{#if lock}
@@ -50,3 +60,20 @@
{lock}
{/if}
+
+
diff --git a/frontend/src/lib/components/flows/content/FlowModuleSuspend.svelte b/frontend/src/lib/components/flows/content/FlowModuleSuspend.svelte
index e78aa52aaf..20283b5681 100644
--- a/frontend/src/lib/components/flows/content/FlowModuleSuspend.svelte
+++ b/frontend/src/lib/components/flows/content/FlowModuleSuspend.svelte
@@ -3,7 +3,7 @@
import Tooltip from '$lib/components/Tooltip.svelte'
import InputTransformForm from '$lib/components/InputTransformForm.svelte'
import type SimpleEditor from '$lib/components/SimpleEditor.svelte'
- import { getContext } from 'svelte'
+ import { getContext, tick } from 'svelte'
import { Alert, Tab, Tabs } from '$lib/components/common'
import { GroupService, type FlowModule } from '$lib/gen'
@@ -16,6 +16,7 @@
import Label from '$lib/components/Label.svelte'
import SuspendDrawer from './SuspendDrawer.svelte'
import EditableSchemaDrawer from '$lib/components/schema/EditableSchemaDrawer.svelte'
+ import AddProperty from '$lib/components/schema/AddProperty.svelte'
const { selectedId, flowStateStore } = getContext('FlowEditorContext')
const result = $flowStateStore[$selectedId]?.previewResult ?? {}
@@ -47,6 +48,8 @@
loadGroups()
}
}
+
+ let jsonView: boolean = false
@@ -190,33 +193,68 @@
{/if}
{:else}
-
-
+
+
+ {#if flowModule?.suspend?.resume_form}
+
{
+ const schema = e.detail
+
+ // If the schema is empty, remove the form
+ if (Object.keys(schema?.properties ?? {}).length === 0) {
+ tick().then(() => {
+ if (!flowModule.suspend) return
+ flowModule.suspend.resume_form = undefined
+ })
+ }
+ }}
+ {jsonView}
+ />
+ {:else if emptyString($enterpriseLicense)}
+
+ {:else}
+
+ {
+ if (flowModule.suspend) {
+ flowModule.suspend.resume_form = {
+ schema: emptySchema()
+ }
+ }
+ jsonView = true
+ }}
+ />
+
+ {
+ jsonView = false
+ if (flowModule.suspend) {
+ flowModule.suspend.resume_form = {
+ schema: e.detail
+ }
+ }
+ }}
+ schema={{}}
+ />
+ {/if}
+
+
{#if flowModule.suspend}
{#if emptyString($enterpriseLicense)}
{/if}
-
{
- if (flowModule.suspend) {
- if (e.detail) {
- flowModule.suspend.resume_form = {
- schema: emptySchema()
- }
- } else {
- flowModule.suspend.resume_form = undefined
- }
- }
- }}
- />
@@ -233,17 +271,6 @@
/>
{/if}
-
- {#if flowModule?.suspend?.resume_form}
-
- {:else}
-
- No form
-
- {/if}
-
{/if}
diff --git a/frontend/src/lib/components/schema/AddProperty.svelte b/frontend/src/lib/components/schema/AddProperty.svelte
index 83ff7518b0..5920d209fe 100644
--- a/frontend/src/lib/components/schema/AddProperty.svelte
+++ b/frontend/src/lib/components/schema/AddProperty.svelte
@@ -149,6 +149,7 @@
throw Error('Argument not found!')
}
syncOrders()
+ dispatch('change', schema)
} catch (err) {
sendUserToast(`Could not delete argument: ${err}`, true)
}
diff --git a/frontend/src/lib/components/schema/EditableSchemaDrawer.svelte b/frontend/src/lib/components/schema/EditableSchemaDrawer.svelte
index 1b46803e9a..31a73c0f7d 100644
--- a/frontend/src/lib/components/schema/EditableSchemaDrawer.svelte
+++ b/frontend/src/lib/components/schema/EditableSchemaDrawer.svelte
@@ -1,6 +1,6 @@