diff --git a/frontend/src/lib/components/FlowMetadata.svelte b/frontend/src/lib/components/FlowMetadata.svelte index e6d0d2b874..fe91ae7ae6 100644 --- a/frontend/src/lib/components/FlowMetadata.svelte +++ b/frontend/src/lib/components/FlowMetadata.svelte @@ -3,7 +3,14 @@ import JobStatus from '$lib/components/JobStatus.svelte' import Icon from 'svelte-awesome' import { displayDaysAgo } from '$lib/utils' - import { faCalendar, faClock, faRobot, faUser, faWind } from '@fortawesome/free-solid-svg-icons' + import { + faCalendar, + faClock, + faRobot, + faScroll, + faUser, + faWind + } from '@fortawesome/free-solid-svg-icons' export let job: Job const SMALL_ICON_SCALE = 0.7 @@ -43,6 +50,19 @@ > {/if} + + {#if (job && job.job_kind == 'flow') || job?.job_kind == 'script'} + {@const stem = `/${job?.job_kind}s`} + {@const isScript = job?.job_kind === 'script'} + {@const viewHref = `${stem}/get/${isScript ? job?.script_hash : job?.script_path}`} +
+ + {job?.job_kind}: + {isScript ? job?.script_hash : job?.script_path} + +
+ {/if} +
By {job.created_by} diff --git a/frontend/src/routes/run/[...run].svelte b/frontend/src/routes/run/[...run].svelte index e289e26ab4..1d87d93a0d 100644 --- a/frontend/src/routes/run/[...run].svelte +++ b/frontend/src/routes/run/[...run].svelte @@ -37,7 +37,6 @@ import FlowMetadata from '$lib/components/FlowMetadata.svelte' import JobArgs from '$lib/components/JobArgs.svelte' import FlowProgressBar from '$lib/components/flows/FlowProgressBar.svelte' - import { flowStateStore, initFlowState } from '$lib/components/flows/flowState' let workspace_id_query: string | undefined = $page.url.searchParams.get('workspace') ?? undefined let workspace_id: string | undefined @@ -113,6 +112,8 @@ }`} {@const editHref = `${stem}/edit/${route}${isScript ? '?step=2' : ''}`} {@const isRunning = job && 'running' in job && job.running} + {@const runsHref = `/runs/${job?.script_path}${!isScript ? '?jobKind=flow' : ''}`} + {@const viewHref = `${stem}/get/${isScript ? job?.script_hash : job?.script_path}`} {#if isRunning} {/if} + + - {@const stem = `/${job?.job_kind}s`} - {@const isScript = job?.job_kind === 'script'} - {@const runsHref = `/runs/${job?.script_path}${!isScript ? '?jobKind=flow' : ''}`} - {@const viewHref = `${stem}/get/${isScript ? job?.script_hash : job?.script_path}`} {#if job && 'deleted' in job && !job?.deleted && ($userStore?.is_admin ?? false)} - {/if} -
-

-
- {#if job} - {#if 'success' in job && job.success} - {#if job.is_skipped} - - {:else} - - {/if} - {:else if job && 'success' in job} +

+
+ {#if job} + {#if 'success' in job && job.success} + {#if job.is_skipped} - {:else if job && 'running' in job && job.running} + {:else} - {:else if job && 'running' in job && job.scheduled_for && forLater(job.scheduled_for)} - - {:else if job && 'running' in job && job.scheduled_for} - {/if} - {job.script_path ?? (job.job_kind == 'dependencies' ? 'lock dependencies' : 'No path')} - {#if job.script_hash} - {truncateHash(job.script_hash)} - {:else if job && 'job_kind' in job}{job.job_kind} - {/if} + {:else if job && 'success' in job} + + {:else if job && 'running' in job && job.running} + + {:else if job && 'running' in job && job.scheduled_for && forLater(job.scheduled_for)} + + {:else if job && 'running' in job && job.scheduled_for} + {/if} -
-

-
+ {job.script_path ?? (job.job_kind == 'dependencies' ? 'lock dependencies' : 'No path')} + {#if job.script_hash} + {truncateHash(job.script_hash)} + {/if} + {#if job && 'job_kind' in job}{job.job_kind} + {/if} + {/if} +

+ {#if job && 'deleted' in job && job?.deleted}