diff --git a/frontend/src/lib/components/DisplayResult.svelte b/frontend/src/lib/components/DisplayResult.svelte index 5c886d1622..aea7e4993d 100644 --- a/frontend/src/lib/components/DisplayResult.svelte +++ b/frontend/src/lib/components/DisplayResult.svelte @@ -11,6 +11,7 @@ export let result: any export let requireHtmlApproval = false export let filename: string | undefined = undefined + export let disableExpand = false let resultKind: | 'json' @@ -101,10 +102,12 @@ >{/if}{#if typeof result == 'object' && Object.keys(result).length > 0}
The result keys are: {truncate(Object.keys(result).join(', '), 50)} -
- -
{/if}{#if !forceJson && resultKind == 'table-col'}
+ +
+ {/if} + {/if}{#if !forceJson && resultKind == 'table-col'}
{#each Object.keys(result) as col} @@ -245,19 +248,21 @@ {/if}
- - - - - - - - - - +{#if !disableExpand} + + + + + + + + + + +{/if} diff --git a/frontend/src/lib/components/JobArgs.svelte b/frontend/src/lib/components/JobArgs.svelte index 9cbfe2e141..b95db179b5 100644 --- a/frontend/src/lib/components/JobArgs.svelte +++ b/frontend/src/lib/components/JobArgs.svelte @@ -4,9 +4,10 @@ import TableCustom from './TableCustom.svelte' export let args: any + export let tableClass = '' - + Argument Value diff --git a/frontend/src/lib/components/LogViewer.svelte b/frontend/src/lib/components/LogViewer.svelte index 3dcd441b32..529993678c 100644 --- a/frontend/src/lib/components/LogViewer.svelte +++ b/frontend/src/lib/components/LogViewer.svelte @@ -6,6 +6,7 @@ export let isLoading: boolean export let duration: number | undefined = undefined export let mem: number | undefined = undefined + export let wrapperClass = '' let scroll = true let div: HTMLElement | null = null @@ -33,7 +34,7 @@ -
+
+ + diff --git a/frontend/src/lib/components/common/drawer/Drawer.svelte b/frontend/src/lib/components/common/drawer/Drawer.svelte index 2bafe6b143..2e24484321 100644 --- a/frontend/src/lib/components/common/drawer/Drawer.svelte +++ b/frontend/src/lib/components/common/drawer/Drawer.svelte @@ -100,6 +100,7 @@ z-index: -1; transition: z-index var(--duration) step-end; overflow: clip; + pointer-events: none; } .drawer.open { @@ -107,6 +108,7 @@ width: 100%; z-index: 1002; transition: z-index var(--duration) step-start; + pointer-events: auto; } .overlay { diff --git a/frontend/src/lib/components/jobs/JobDetail.svelte b/frontend/src/lib/components/jobs/JobDetail.svelte index b2852411db..78b15d34b0 100644 --- a/frontend/src/lib/components/jobs/JobDetail.svelte +++ b/frontend/src/lib/components/jobs/JobDetail.svelte @@ -28,6 +28,7 @@ import { check } from 'svelte-awesome/icons' import { Badge } from '../common' import ScheduleEditor from '../ScheduleEditor.svelte' + import JobPreview from './JobPreview.svelte' const SMALL_ICON_SCALE = 0.7 @@ -65,182 +66,187 @@ goto('/schedules')} bind:this={scheduleEditor} /> -
-
-
-
- {#if job === undefined} - No job found - {:else} -
- {#if 'success' in job && job.success} - {#if job.is_skipped} + +
+
+
+
+ {#if job === undefined} + No job found + {:else} +
+ {#if 'success' in job && job.success} + {#if job.is_skipped} + + {:else} + + {/if} + {:else if 'success' in job} + {:else if 'running' in job && job.running} + + {:else if job && 'running' in job && job.scheduled_for && forLater(job.scheduled_for)} + {:else} {/if} - {:else if 'success' in job} - - {:else if 'running' in job && job.running} - - {:else if job && 'running' in job && job.scheduled_for && forLater(job.scheduled_for)} - - {:else} - - {/if} -
+
-
-
- {#if job.script_path} - {job.script_path} - {:else if 'job_kind' in job && job.job_kind == 'preview'} - Preview without path - {:else if 'job_kind' in job && job.job_kind == 'dependencies'} - lock deps of {truncateHash(job.script_hash ?? '')} +
+ {#if job.script_path} + {job.script_path} + {:else if 'job_kind' in job && job.job_kind == 'preview'} + Preview without path + {:else if 'job_kind' in job && job.job_kind == 'dependencies'} + lock deps of {truncateHash(job.script_hash ?? '')} + {:else if 'job_kind' in job && job.job_kind == 'identity'} + no op + {/if} + - {:else if 'job_kind' in job && job.job_kind == 'identity'} - no op - {/if} - +
+
+ {#if 'job_kind' in job}{job.job_kind} + {/if} + {#if job.is_flow_step && (job.job_kind == 'script' || job.job_kind == 'preview')} + flow step + {/if} +
-
- {#if 'job_kind' in job}{job.job_kind} - {/if} - {#if job.is_flow_step && (job.job_kind == 'script' || job.job_kind == 'preview')} - flow step - {/if} -
-
- {/if} -
-
{truncateRev(job.id, 8, '')}
-
-
-
-
- - By {job.created_by} + {/if}
- {#if job && 'duration_ms' in job && job.duration_ms != undefined} -
- - Ran in {msToSec(job.duration_ms)}s -
- {/if} +
{truncateRev(job.id, 8, '')}
-
- {#if 'started_at' in job && job.started_at} +
+
- + By {job.created_by} - - {#if job?.['duration_ms']} - Ended {#key time} - {endedDate(job.started_at, job?.['duration_ms'])}{/key} - {:else} - Started {#key time} - {displayDaysAgo(job.started_at ?? '')}{/key} - {/if} -
- {/if} - {#if 'scheduled_for' in job && !job.running && job.scheduled_for && forLater(job.scheduled_for)} -
- - - Scheduled - for {displayDate(job.scheduled_for ?? '')} -
- {:else if 'scheduled_for' in job && !job.running} -
- - Waiting for an executor + - -
- {/if} -
- {#if job && job.parent_job} - {#if job.is_flow_step} - - Step of flow {truncateRev(job.parent_job, 6)} + {/if} +
+
+ {#if 'started_at' in job && job.started_at} +
+ - {:else} - - Parent {job.parent_job} - {/if} - {:else if job && job.schedule_path} - - Schedule + {#if job?.['duration_ms']} + Ended {#key time} + {endedDate(job.started_at, job?.['duration_ms'])}{/key} + {:else} + Started {#key time} + {displayDaysAgo(job.started_at ?? '')}{/key} + {/if} +
{/if} + {#if 'scheduled_for' in job && !job.running && job.scheduled_for && forLater(job.scheduled_for)} +
+ + + Scheduled + for {displayDate(job.scheduled_for ?? '')} + +
+ {:else if 'scheduled_for' in job && !job.running} +
+ + Waiting for an executor + +
+ {/if} +
+ {#if job && job.parent_job} + {#if job.is_flow_step} + + Step of flow {truncateRev(job.parent_job, 6)} + {:else} + + Parent {job.parent_job} + {/if} + {:else if job && job.schedule_path} + + Schedule + {/if} +
-
+ diff --git a/frontend/src/lib/components/jobs/JobPreview.svelte b/frontend/src/lib/components/jobs/JobPreview.svelte new file mode 100644 index 0000000000..f93b6d3355 --- /dev/null +++ b/frontend/src/lib/components/jobs/JobPreview.svelte @@ -0,0 +1,101 @@ + + + + + ['Escape', 'Esc'].includes(key) && close()} /> + + +
+ + {#if open} +
+
+ +
+
+ {#if completed} + + {:else} +
Job is still running
+ + {/if} +
+
+ {/if} +