+{/if}
diff --git a/frontend/src/lib/components/ScriptBuilder.svelte b/frontend/src/lib/components/ScriptBuilder.svelte
index bf4dac6971..fd175d16d7 100644
--- a/frontend/src/lib/components/ScriptBuilder.svelte
+++ b/frontend/src/lib/components/ScriptBuilder.svelte
@@ -85,7 +85,7 @@
})
sendUserToast(`Success! New script version created with hash ${newHash}`)
await goto(`/scripts/edit/${newHash}?step=2`)
- goto(`/scripts/get/${newHash}`)
+ goto(`/scripts/get/${newHash}?workspace_id=${$workspaceStore}`)
} catch (error) {
sendUserToast(`Impossible to save the script: ${error.body}`, true)
}
diff --git a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte
index af7eca9e7b..3b0feb3f02 100644
--- a/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte
+++ b/frontend/src/lib/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte
@@ -4,6 +4,7 @@
import FlowModuleScript from '$lib/components/flows/content/FlowModuleScript.svelte'
import FlowPathViewer from '$lib/components/flows/content/FlowPathViewer.svelte'
import { inferArgs } from '$lib/infer'
+ import { workspaceStore } from '$lib/stores'
import { emptySchema, getScriptByPath } from '$lib/utils'
import { faCodeBranch, faExternalLinkAlt, faEye, faPen } from '@fortawesome/free-solid-svg-icons'
import type { AppInput, ResultAppInput } from '../../inputType'
@@ -120,7 +121,8 @@
startIcon={{ icon: faEye }}
endIcon={{ icon: faExternalLinkAlt }}
target="_blank"
- href="/flows/get/{componentInput?.['runnable']?.path}">Details pageDetails page
diff --git a/frontend/src/lib/components/common/table/FlowRow.svelte b/frontend/src/lib/components/common/table/FlowRow.svelte
index 75030d73f9..40743a14dd 100644
--- a/frontend/src/lib/components/common/table/FlowRow.svelte
+++ b/frontend/src/lib/components/common/table/FlowRow.svelte
@@ -91,7 +91,7 @@
{/if}
View flow
diff --git a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte
index 5c86ced7ac..56dc5e9a5f 100644
--- a/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte
+++ b/frontend/src/routes/(root)/(logged)/run/[...run]/+page.svelte
@@ -277,7 +277,7 @@
{/if}
{job.script_path ?? (job.job_kind == 'dependencies' ? 'lock dependencies' : 'No path')}
{#if job.script_hash}
- {truncateHash(job.script_hash)}
{/if}
diff --git a/frontend/src/routes/(root)/(logged)/scripts/get/[...hash]/+page.svelte b/frontend/src/routes/(root)/(logged)/scripts/get/[...hash]/+page.svelte
index 145076340b..382734bdd1 100644
--- a/frontend/src/routes/(root)/(logged)/scripts/get/[...hash]/+page.svelte
+++ b/frontend/src/routes/(root)/(logged)/scripts/get/[...hash]/+page.svelte
@@ -65,6 +65,11 @@
let shareModal: ShareModal
+ let queryId = $page.url.searchParams.get('workspace_id')
+ if (queryId && queryId != $workspaceStore) {
+ $workspaceStore = $page.url.searchParams.get('workspace_id')!
+ }
+
$: loading = !script
$: if ($workspaceStore) {
loadScript($page.params.hash)
@@ -182,7 +187,7 @@
{
- await goto('/scripts/get/' + e.detail)
+ await goto('/scripts/get/' + e.detail + `?workspace_id=${$workspaceStore}`)
loadScript($page.params.hash)
}}
/>
@@ -327,14 +332,17 @@
variant="contained"
size="xs"
startIcon={{ icon: faArrowLeft }}
- href="/scripts/get/{script.parent_hashes[0]}"
+ href="/scripts/get/{script.parent_hashes[0]}?workspace_id={$workspaceStore}"
>
Previous version ({script.parent_hashes.length})
{#each script.parent_hashes as hash}
-
+
{hash}
{/each}
@@ -354,7 +362,9 @@
{#if topHash}
This hash is not HEAD (latest non-archived version at this path) :
- Go to the HEAD of this path
+ Go to the HEAD of this path
{/if}
{#if script.archived && !topHash}
diff --git a/frontend/src/routes/(root)/(logged)/scripts/run/[...hash]/+page.svelte b/frontend/src/routes/(root)/(logged)/scripts/run/[...hash]/+page.svelte
index 786f19d222..a32932933b 100644
--- a/frontend/src/routes/(root)/(logged)/scripts/run/[...hash]/+page.svelte
+++ b/frontend/src/routes/(root)/(logged)/scripts/run/[...hash]/+page.svelte
@@ -31,7 +31,7 @@
script = await ScriptService.getScriptByHash({ workspace: $workspaceStore!, hash })
if (script.schema == undefined) {
script.schema = emptySchema()
- inferArgs(script.language, script.content, script.schema)
+ await inferArgs(script.language, script.content, script.schema)
script = script
}
if (script.path && script.archived) {
@@ -119,7 +119,8 @@
disabled={script == undefined}
btnClasses="mr-4"
variant="border"
- href="/scripts/get/{script?.hash}">View scriptView script
diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte
index 9fba26925b..b104359eb5 100644
--- a/frontend/src/routes/+layout.svelte
+++ b/frontend/src/routes/+layout.svelte
@@ -11,7 +11,7 @@
// Default toast options
const toastOptions = {
- duration: 10000, // duration of progress bar tween to the `next` value
+ duration: 5000, // duration of progress bar tween to the `next` value
initial: 1, // initial progress bar value
next: 0, // next progress value
pausable: true, // pause progress bar tween on mouse hover