|
3 | 3 | import { translate } from '$lib/i18n/translate';
|
4 | 4 | import type { EventLink } from '$lib/types/events';
|
5 | 5 | import {
|
| 6 | + routeForEventHistory, |
6 | 7 | routeForEventHistoryEvent,
|
7 |
| - routeForEventHistoryEventType, |
8 | 8 | } from '$lib/utilities/route-for';
|
9 | 9 |
|
10 | 10 | export let link: EventLink;
|
|
21 | 21 | eventId: link.workflowEvent.eventRef.eventId,
|
22 | 22 | });
|
23 | 23 | value = `${link.workflowEvent.workflowId}/history/events/${link.workflowEvent.eventRef.eventId}`;
|
| 24 | + } else if ( |
| 25 | + link.workflowEvent?.eventRef?.eventType === |
| 26 | + 'EVENT_TYPE_WORKFLOW_EXECUTION_STARTED' |
| 27 | + ) { |
| 28 | + href = routeForEventHistoryEvent({ |
| 29 | + namespace: link.workflowEvent.namespace, |
| 30 | + workflow: link.workflowEvent.workflowId, |
| 31 | + run: link.workflowEvent.runId, |
| 32 | + eventId: '1', |
| 33 | + }); |
| 34 | + value = `${link.workflowEvent.workflowId}/history/events/1`; |
24 | 35 | } else {
|
25 |
| - href = routeForEventHistoryEventType({ |
| 36 | + href = routeForEventHistory({ |
26 | 37 | namespace: link.workflowEvent.namespace,
|
27 | 38 | workflow: link.workflowEvent.workflowId,
|
28 | 39 | run: link.workflowEvent.runId,
|
29 |
| - eventType: link.workflowEvent.eventRef.eventType, |
30 | 40 | });
|
31 |
| - value = `${link.workflowEvent.workflowId}/history/events/type/${link.workflowEvent.eventRef.eventType}`; |
| 41 | + value = `${link.workflowEvent.workflowId}/history`; |
32 | 42 | }
|
33 | 43 | }
|
34 | 44 | </script>
|
|
0 commit comments