@@ -154,10 +162,23 @@
>
Schedule to run later
+ {#if runnable?.path?.startsWith(`u/${$userStore?.username}`) != true && (runnable?.path?.split('/')?.length ?? 0) > 2}
+
+
+ By default, runs are visible to the owner of the script or flow being triggered
+
+ {/if}
runAction(scheduledForStr, args)}
+ on:click={() => runAction(scheduledForStr, args, invisible_to_owner)}
>
{scheduledForStr ? 'Schedule run to a later time' : buttonText}
@@ -166,7 +187,7 @@
runAction(undefined, args)}
+ on:click={() => runAction(undefined, args, invisible_to_owner)}
>
{buttonText}
diff --git a/frontend/src/lib/components/flows/content/FlowSettings.svelte b/frontend/src/lib/components/flows/content/FlowSettings.svelte
index 39e503750c..a0e508457c 100644
--- a/frontend/src/lib/components/flows/content/FlowSettings.svelte
+++ b/frontend/src/lib/components/flows/content/FlowSettings.svelte
@@ -55,22 +55,11 @@
class="text-sm"
id="inp"
bind:value={$flowStore.description}
- placeholder="A description to help users understand what this flow does and how to use it. Markdown accepted."
+ placeholder="A description to help users understand what this flow does and how to use it."
rows="3"
/>
-
-
-
Description preview
- {#if $flowStore.description}
-
- {$flowStore.description}
-
- {:else}
-
Enter a description to see the preview
- {/if}
-
diff --git a/frontend/src/lib/utils.ts b/frontend/src/lib/utils.ts
index 1d992f381b..a359e552fa 100644
--- a/frontend/src/lib/utils.ts
+++ b/frontend/src/lib/utils.ts
@@ -60,13 +60,12 @@ export function displayDate(dateString: string | undefined, displaySecond = fals
if (date.toString() === 'Invalid Date') {
return ''
} else {
- return `${date.getFullYear()}/${
- date.getMonth() + 1
- }/${date.getDate()} at ${date.toLocaleTimeString([], {
- hour: '2-digit',
- minute: '2-digit',
- second: displaySecond ? '2-digit' : undefined
- })}`
+ return `${date.getFullYear()}/${date.getMonth() + 1
+ }/${date.getDate()} at ${date.toLocaleTimeString([], {
+ hour: '2-digit',
+ minute: '2-digit',
+ second: displaySecond ? '2-digit' : undefined
+ })}`
}
}
diff --git a/frontend/src/routes/flows/get/[...path].svelte b/frontend/src/routes/flows/get/[...path].svelte
index 5ab391cbed..33430749eb 100644
--- a/frontend/src/routes/flows/get/[...path].svelte
+++ b/frontend/src/routes/flows/get/[...path].svelte
@@ -101,11 +101,16 @@
let runForm: RunForm | undefined
let isValid = true
- async function runFlow(scheduledForStr: string | undefined, args: Record) {
+ async function runFlow(
+ scheduledForStr: string | undefined,
+ args: Record,
+ invisibleToOwner?: boolean
+ ) {
const scheduledFor = scheduledForStr ? new Date(scheduledForStr).toISOString() : undefined
let run = await JobService.runFlowByPath({
workspace: $workspaceStore!,
path,
+ invisibleToOwner,
requestBody: args,
scheduledFor
})
diff --git a/frontend/src/routes/flows/run/[...path].svelte b/frontend/src/routes/flows/run/[...path].svelte
index f59aad2511..f6aa2b7022 100644
--- a/frontend/src/routes/flows/run/[...path].svelte
+++ b/frontend/src/routes/flows/run/[...path].svelte
@@ -45,11 +45,16 @@
}
}
- async function runFlow(scheduledForStr: string | undefined, args: Record) {
+ async function runFlow(
+ scheduledForStr: string | undefined,
+ args: Record,
+ invisibleToOwner?: boolean
+ ) {
const scheduledFor = scheduledForStr ? new Date(scheduledForStr).toISOString() : undefined
let run = await JobService.runFlowByPath({
workspace: $workspaceStore!,
path,
+ invisibleToOwner,
requestBody: args,
scheduledFor
})
diff --git a/frontend/src/routes/run/[...run].svelte b/frontend/src/routes/run/[...run].svelte
index 3b14165f6e..1ea9112f1e 100644
--- a/frontend/src/routes/run/[...run].svelte
+++ b/frontend/src/routes/run/[...run].svelte
@@ -38,6 +38,7 @@
import FlowProgressBar from '$lib/components/flows/FlowProgressBar.svelte'
import Tabs from '$lib/components/common/tabs/Tabs.svelte'
import Badge from '$lib/components/common/badge/Badge.svelte'
+ import Tooltip from '$lib/components/Tooltip.svelte'
$: workspace_id = $page.url.searchParams.get('workspace') ?? $workspaceStore
$: not_same_workspace = workspace_id !== $workspaceStore
@@ -134,7 +135,7 @@
disabled={not_same_workspace}
variant="border"
color="red"
- size="xs"
+ size="md"
startIcon={{ icon: faTrash }}
on:click={() => job?.id && deleteCompletedJob(job.id)}
>
@@ -145,7 +146,7 @@
href={runsHref}
variant="border"
color="blue"
- size="xs"
+ size="md"
startIcon={{ icon: faList }}
>
View runs
@@ -170,7 +171,7 @@
{
if (job?.id) {
@@ -190,7 +191,7 @@
href={runHref}
disabled={isRunning || not_same_workspace}
color="blue"
- size="xs"
+ size="md"
startIcon={{ icon: faRefresh }}>Run again
{#if !$userStore?.operator}
@@ -199,7 +200,7 @@
disabled={not_same_workspace}
href={editHref}
color="blue"
- size="xs"
+ size="md"
startIcon={{ icon: faEdit }}>Edit
{/if}
@@ -208,7 +209,7 @@
disabled={not_same_workspace}
href={viewHref}
color="blue"
- size="xs"
+ size="md"
startIcon={{ icon: faScroll }}
>
View {job?.job_kind}
@@ -273,6 +274,12 @@
{/if}
{#if job && 'job_kind' in job}{job.job_kind}
{/if}
+ {#if !job.visible_to_owner}only visible to you The option to hide this run from the owner of this script or flow was activated
+ {/if}
{/if}
diff --git a/frontend/src/routes/scripts/get/[...hash].svelte b/frontend/src/routes/scripts/get/[...hash].svelte
index 3ad57775a3..8f3b8fb6f7 100644
--- a/frontend/src/routes/scripts/get/[...hash].svelte
+++ b/frontend/src/routes/scripts/get/[...hash].svelte
@@ -143,14 +143,19 @@
let isValid = true
let runForm: RunForm | undefined
- async function runScript(scheduledForStr: string | undefined, args: Record