diff --git a/src/lib/components/event/event-card.svelte b/src/lib/components/event/event-card.svelte index d183f3fc4a..75d5961018 100644 --- a/src/lib/components/event/event-card.svelte +++ b/src/lib/components/event/event-card.svelte @@ -125,7 +125,7 @@ {@const href = getEventLinkHref(link)} {@const value = href.split('workflows/')?.[1] || href}
-

+

{translate('nexus.link')}

-

+

{translate('nexus.link-namespace')}

-

Summary

+

Summary

-

+

{format(key)}

{#if value?.payloads} @@ -225,7 +225,7 @@
{#if stackTrace}
-

+

{translate('workflows.call-stack-tab')}

-

+

{format(key)}

-

+

{format(key)}

diff --git a/src/lib/components/event/event-details-full.svelte b/src/lib/components/event/event-details-full.svelte index b638f7ed94..142539581e 100644 --- a/src/lib/components/event/event-details-full.svelte +++ b/src/lib/components/event/event-details-full.svelte @@ -1,11 +1,17 @@ {#if showEventGroup} -

+
{#if group?.pendingActivity} {:else if group?.pendingNexusOperation} {/if} - {#each group.eventList as groupEvent} - - {/each} + + {#if hasAnyPayloads} +
+
+ {#each processedEvents as processed, i (processed.event.id)} +
+
+ +
+
+ {/each} +
+
+ +
+
+ {:else} + {#each processedEvents as processed (processed.event.id)} +
+
+ +
+
+ {/each} + {/if}
{:else if event} diff --git a/src/lib/components/event/event-details-section.svelte b/src/lib/components/event/event-details-section.svelte new file mode 100644 index 0000000000..73d30d39df --- /dev/null +++ b/src/lib/components/event/event-details-section.svelte @@ -0,0 +1,171 @@ + + +
+
+ {event.id} +

+ {displayName} +

+
+
+ + {#if durationSinceLastEvent} +

+{durationSinceLastEvent}

+ {/if} +
+
+ +{#if event?.links?.length} + {#each event.links as link} + {@const href = getEventLinkHref(link)} + {@const value = href.split('workflows/')?.[1] || href} +
+

+ {translate('nexus.link')} +

+ + {value} + +
+ {@const nsHref = routeForNamespace({ + namespace: link.workflowEvent.namespace, + })} +
+

+ {translate('nexus.link-namespace')} +

+ + {link.workflowEvent.namespace} + +
+ {/each} +{/if} + +{#if event?.userMetadata?.summary} +
+

Summary

+

+ + {decodedValue} + +

+
+{/if} + +{#each detailFields as [key, value] (key)} +
+

+ {format(key)} +

+

+ {#if shouldDisplayAsTime(key)} + + {:else} + {value} + {/if} +

+
+{/each} + +{#each linkFields as [key, value] (key)} +
+

+ {format(key)} +

+ + + +
+{/each} diff --git a/src/lib/components/event/event-payloads.svelte b/src/lib/components/event/event-payloads.svelte new file mode 100644 index 0000000000..c217c93a7d --- /dev/null +++ b/src/lib/components/event/event-payloads.svelte @@ -0,0 +1,75 @@ + + +{#each payloadFields as [key, value] (key)} + {@const codeBlockValue = getCodeBlockValue(value)} + {@const stackTrace = getStackTrace(codeBlockValue)} +
+

+ {format(key)} +

+ {#if value?.payloads} + + {#snippet children(decodedValue)} + + {/snippet} + + {:else if key === 'searchAttributes'} + + {#snippet children(decodedValue)} + + {/snippet} + + {:else} + + {#snippet children(decodedValue)} + + {/snippet} + + {/if} +
+ {#if stackTrace} +
+

+ {translate('workflows.call-stack-tab')} +

+ +
+ {/if} +{/each} diff --git a/src/lib/components/event/event-summary-row.svelte b/src/lib/components/event/event-summary-row.svelte index 9c9417b833..fa3763dd4e 100644 --- a/src/lib/components/event/event-summary-row.svelte +++ b/src/lib/components/event/event-summary-row.svelte @@ -380,7 +380,7 @@ {#if expanded} diff --git a/src/lib/components/workflow/pending-activity/pending-activity-card.svelte b/src/lib/components/workflow/pending-activity/pending-activity-card.svelte index ee1075e49f..a0728c4d4b 100644 --- a/src/lib/components/workflow/pending-activity/pending-activity-card.svelte +++ b/src/lib/components/workflow/pending-activity/pending-activity-card.svelte @@ -6,7 +6,6 @@ import ActivityCommands from '$lib/components/activity/activity-commands.svelte'; import PayloadDecoder from '$lib/components/event/payload-decoder.svelte'; import { timestamp } from '$lib/components/timestamp.svelte'; - import WorkflowStatus from '$lib/components/workflow-status.svelte'; import Accordion from '$lib/holocene/accordion/accordion.svelte'; import Badge from '$lib/holocene/badge.svelte'; import CodeBlock from '$lib/holocene/code-block.svelte'; @@ -45,19 +44,10 @@
-
-
- -

{activity.activityType}

-
- {#if showActivityCommands} - - {/if} -
-
-
+
+
{@render detail(translate('workflows.activity-id'), activity.activityId)} {#if activity.paused && activity.pauseInfo} {@render detail( @@ -135,8 +125,13 @@ )} {/if} {/if} + {#if showActivityCommands} +
+ +
+ {/if}
-
+
{#if failed} {#if totalPending > 20} {@render failuresAccordion()} @@ -153,7 +148,7 @@ {#snippet detail(label: string, value: string | number | Snippet)}
-

+

{label}

@@ -168,7 +163,7 @@ {#snippet heartbeat()}

-

+

{translate('workflows.heartbeat-details')}

{#key activity.attempt} @@ -190,7 +185,7 @@
{#if activity.lastFailure} -

+

{translate('workflows.last-failure')}

{#key activity.attempt} @@ -211,7 +206,7 @@
{#if activity.lastFailure?.stackTrace}
-

+

{translate('common.stack-trace')}

-

+

{translate('workflows.next-retry')}

diff --git a/src/lib/components/workflow/pending-nexus-operation/pending-nexus-operation-card.svelte b/src/lib/components/workflow/pending-nexus-operation/pending-nexus-operation-card.svelte index 40207607bd..99fc83596f 100644 --- a/src/lib/components/workflow/pending-nexus-operation/pending-nexus-operation-card.svelte +++ b/src/lib/components/workflow/pending-nexus-operation/pending-nexus-operation-card.svelte @@ -19,13 +19,6 @@

-
-
- {operation.state} -

{translate('workflows.pending-nexus-operation')}

-
-
-
{#if operation.endpoint} @@ -80,7 +73,7 @@ {#if operation.scheduleToStartTimeout} {@render detail( translate('workflows.schedule-to-start-timeout'), - operation.scheduleToCloseTimeout as string, + operation.scheduleToStartTimeout as string, )} {/if} {#if operation.startToCloseTimeout} @@ -96,7 +89,7 @@ {/if} {#if operation.blockedReason}
-

+

{translate('nexus.blocked-reason')}

0}
-

+

{translate('nexus.cancellation-info')}

-

+

{translate('workflows.next-retry')}

@@ -138,7 +131,7 @@ {#snippet detail(label: string, value: string | number | Snippet)}

-

+

{label}

@@ -162,7 +155,7 @@

{#if operation.lastAttemptFailure} -

+

{translate('workflows.last-failure')}

{#if operation.lastAttemptFailure?.stackTrace} -

+

{translate('common.stack-trace')}

- import PendingActivityCard from '$lib/components/workflow/pending-activity/pending-activity-card.svelte'; + import EventDetailsFull from '$lib/components/event/event-details-full.svelte'; import EmptyState from '$lib/holocene/empty-state.svelte'; import { translate } from '$lib/i18n/translate'; + import { groupEvents } from '$lib/models/event-groups'; + import { fullEventHistory } from '$lib/stores/events'; import { workflowRun } from '$lib/stores/workflow-run'; - const pendingActivities = $derived( - $workflowRun.workflow?.pendingActivities?.sort((a, b) => { - if (isNaN(parseInt(a.activityId)) || isNaN(parseInt(b.activityId))) { - return a.activityId.localeCompare(b.activityId); - } - return parseInt(a.activityId) - parseInt(b.activityId); - }) || [], - ); + const { workflow } = $derived($workflowRun); + const pendingActivities = $derived(workflow?.pendingActivities ?? []); + + const pendingGroups = $derived.by(() => { + const groups = groupEvents( + $fullEventHistory, + 'ascending', + pendingActivities, + ); + return groups.filter((g) => g.pendingActivity); + });
- {#if pendingActivities.length} + {#if pendingGroups.length}
- {#each pendingActivities as activity (activity.id)} - + {#each pendingGroups as group (group.id)} + {/each}
{:else}