|
5 | 5 | import EventHistoryLegend from '$lib/components/lines-and-dots/event-history-legend.svelte'; |
6 | 6 | import EventTypeFilter from '$lib/components/lines-and-dots/event-type-filter.svelte'; |
7 | 7 | import TimelineGraph from '$lib/components/lines-and-dots/svg/timeline-graph.svelte'; |
| 8 | + import WorkflowError from '$lib/components/lines-and-dots/workflow-error.svelte'; |
8 | 9 | import DownloadEventHistoryModal from '$lib/components/workflow/download-event-history-modal.svelte'; |
9 | 10 | import InputAndResults from '$lib/components/workflow/input-and-results.svelte'; |
| 11 | + import WorkflowCallbacks from '$lib/components/workflow/workflow-callbacks.svelte'; |
10 | 12 | import ToggleButton from '$lib/holocene/toggle-button/toggle-button.svelte'; |
11 | 13 | import ToggleButtons from '$lib/holocene/toggle-button/toggle-buttons.svelte'; |
12 | 14 | import { translate } from '$lib/i18n/translate'; |
13 | 15 | import { groupEvents } from '$lib/models/event-groups'; |
14 | 16 | import { clearActives } from '$lib/stores/active-events'; |
15 | 17 | import { eventFilterSort } from '$lib/stores/event-view'; |
16 | | - import { filteredEventHistory, pauseLiveUpdates } from '$lib/stores/events'; |
| 18 | + import { |
| 19 | + currentEventHistory, |
| 20 | + filteredEventHistory, |
| 21 | + pauseLiveUpdates, |
| 22 | + } from '$lib/stores/events'; |
17 | 23 | import { workflowRun } from '$lib/stores/workflow-run'; |
18 | 24 | import { |
19 | 25 | parseEventFilterParams, |
20 | 26 | updateEventFilterParams, |
21 | 27 | } from '$lib/utilities/event-filter-params'; |
| 28 | + import { getWorkflowTaskFailedEvent } from '$lib/utilities/get-workflow-task-failed-event'; |
22 | 29 |
|
23 | 30 | $: ({ namespace } = $page.params); |
24 | 31 | $: ({ workflow } = $workflowRun); |
|
42 | 49 |
|
43 | 50 | $: groups = reverseSort ? [...ascendingGroups].reverse() : ascendingGroups; |
44 | 51 |
|
| 52 | + $: workflowTaskFailedError = getWorkflowTaskFailedEvent( |
| 53 | + $currentEventHistory, |
| 54 | + 'ascending', |
| 55 | + ); |
| 56 | +
|
45 | 57 | beforeNavigate(() => { |
46 | 58 | clearActives(); |
47 | 59 | }); |
|
69 | 81 | </script> |
70 | 82 |
|
71 | 83 | <InputAndResults /> |
| 84 | +<div class="flex flex-col gap-2"> |
| 85 | + {#if workflowTaskFailedError} |
| 86 | + <WorkflowError |
| 87 | + error={workflowTaskFailedError} |
| 88 | + pendingTask={workflow?.pendingWorkflowTask} |
| 89 | + /> |
| 90 | + {/if} |
| 91 | + {#if workflow?.callbacks?.length} |
| 92 | + <WorkflowCallbacks callbacks={workflow.callbacks} /> |
| 93 | + {/if} |
| 94 | +</div> |
72 | 95 | <div class="relative pb-24"> |
73 | 96 | <div |
74 | | - class="surface-background sticky top-0 z-30 flex flex-wrap items-center justify-between gap-2 border-b border-subtle pb-2 md:top-12 xl:gap-8" |
| 97 | + class="surface-background sticky top-0 z-[11] flex flex-wrap items-center justify-between gap-2 border-b border-subtle pb-2 md:top-12 md:pt-2 xl:gap-8" |
75 | 98 | > |
76 | 99 | <div class="flex items-center gap-2"> |
77 | 100 | <h2> |
|
117 | 140 | </div> |
118 | 141 | </div> |
119 | 142 | <div class="flex w-full flex-col"> |
120 | | - <TimelineGraph {workflow} {groups} viewportHeight={undefined} /> |
| 143 | + <TimelineGraph |
| 144 | + {workflow} |
| 145 | + {groups} |
| 146 | + viewportHeight={undefined} |
| 147 | + error={Boolean(workflowTaskFailedError)} |
| 148 | + /> |
121 | 149 | </div> |
122 | 150 | </div> |
123 | 151 | <DownloadEventHistoryModal |
|
0 commit comments