diff --git a/src/lib/components/event/event-details-full.svelte b/src/lib/components/event/event-details-full.svelte index 68e4a9cb5..f2b27e90b 100644 --- a/src/lib/components/event/event-details-full.svelte +++ b/src/lib/components/event/event-details-full.svelte @@ -25,8 +25,12 @@ {#each group.eventList as groupEvent} {@const attributes = formatAttributes(groupEvent)} {@const details = Object.entries(attributes)} -
-
+
+
{groupEvent.id} {spaceBetweenCapitalLetters(groupEvent.name)} diff --git a/src/lib/components/event/event-details-link.svelte b/src/lib/components/event/event-details-link.svelte new file mode 100644 index 000000000..c8331d1e7 --- /dev/null +++ b/src/lib/components/event/event-details-link.svelte @@ -0,0 +1,45 @@ + + + + {value} + diff --git a/src/lib/components/event/event-details-row-expanded.svelte b/src/lib/components/event/event-details-row-expanded.svelte index c44d277d1..e24634465 100644 --- a/src/lib/components/event/event-details-row-expanded.svelte +++ b/src/lib/components/event/event-details-row-expanded.svelte @@ -1,27 +1,20 @@
@@ -88,49 +81,27 @@
{/if}
- {:else if shouldDisplayAsExecutionLink(key)} -
-

{format(key)}

- - - {value} - - -
- {:else if shouldDisplayChildWorkflowLink(key, attributes)} + {:else if linkType !== 'none'}

{format(key)}

- - - {value} - - -
- {:else if shouldDisplayAsTaskQueueLink(key)} -
-

{format(key)}

- - - {value} - - + + + + +
{:else}

{format(key)}

- + {shouldDisplayAsTime(key) ? formatDate(value, $timeFormat) : value}
@@ -147,6 +118,6 @@ } .detail-row { - @apply flex w-full items-center gap-4 py-1 text-left xl:flex; + @apply flex w-full items-center gap-2 py-1 text-left; } diff --git a/src/lib/components/event/event-details-row.svelte b/src/lib/components/event/event-details-row.svelte index 70d285172..1c0bccbe7 100644 --- a/src/lib/components/event/event-details-row.svelte +++ b/src/lib/components/event/event-details-row.svelte @@ -1,23 +1,13 @@ {#if key}
{#if showKey} -

+

{format(key)}

{/if} {#if typeof value === 'object'}
@@ -47,81 +37,20 @@
- {:else if shouldDisplayAsExecutionLink(key)} -
-
- - - - {value} - - - -
-
- {:else if shouldDisplayChildWorkflowLink(key, attributes)} -
-
- - - - {value} - - - -
-
- {:else if shouldDisplayAsTaskQueueLink(key)} -
-
- - - - {value} - - - -
-
- {:else} -
-

- - {value} - + {:else if linkType !== 'none'} + +

+

-
+ + {:else} + + {value} + {/if}
{/if} diff --git a/src/lib/components/event/event-link.svelte b/src/lib/components/event/event-link.svelte index a1bb8f7c0..b79ccceed 100644 --- a/src/lib/components/event/event-link.svelte +++ b/src/lib/components/event/event-link.svelte @@ -8,7 +8,7 @@

Link

diff --git a/src/lib/components/event/event-summary-row.svelte b/src/lib/components/event/event-summary-row.svelte index 6c47cd80f..cc082fd51 100644 --- a/src/lib/components/event/event-summary-row.svelte +++ b/src/lib/components/event/event-summary-row.svelte @@ -136,57 +136,42 @@ {/if} -
+

- -

+ {#if pendingAttempt} +

- {displayName} -

-
- {#if pendingAttempt} -
- - {pendingAttempt} - {#if hasPendingActivity} - / {hasPendingActivity.maximumAttempts || '∞'} - {/if} -
- {/if} - {#if currentEvent?.links?.length} - - {/if} - {#if primaryAttribute?.key} -
-
+ {/if} + {#if currentEvent?.links?.length} + + {/if} + {#if primaryAttribute?.key} + + {/if} + {#if nonPendingActivityAttempt} + + {/if} + {#if compact && secondaryAttribute?.key} + + {/if} {#if isEventGroup(event)} diff --git a/src/lib/components/event/event-summary-table.svelte b/src/lib/components/event/event-summary-table.svelte index 1537d10ef..120c87375 100644 --- a/src/lib/components/event/event-summary-table.svelte +++ b/src/lib/components/event/event-summary-table.svelte @@ -52,6 +52,7 @@ let:visibleItems variant="split" maxHeight="calc(100vh - 200px)" + fixed > {#if !compact} diff --git a/src/lib/components/event/pending-activity-summary-row.svelte b/src/lib/components/event/pending-activity-summary-row.svelte index fe72a36b3..4a507ba2d 100644 --- a/src/lib/components/event/pending-activity-summary-row.svelte +++ b/src/lib/components/event/pending-activity-summary-row.svelte @@ -68,7 +68,6 @@ value={event.activityType} showKey attributes={event} - class="invisible h-0 w-0 md:visible md:h-auto md:w-auto" />
diff --git a/src/lib/components/lines-and-dots/svg/group-details-text.svelte b/src/lib/components/lines-and-dots/svg/group-details-text.svelte index afe82e2cc..56b88e6fe 100644 --- a/src/lib/components/lines-and-dots/svg/group-details-text.svelte +++ b/src/lib/components/lines-and-dots/svg/group-details-text.svelte @@ -1,26 +1,15 @@ {#if typeof value === 'object'} @@ -48,9 +38,6 @@ maxHeight={staticCodeBlockHeight - fontSizeRatio} /> - {/key} {:else if key === 'searchAttributes'} @@ -71,10 +58,6 @@ maxHeight={staticCodeBlockHeight - fontSizeRatio} /> - - {/key} {:else} @@ -91,37 +74,11 @@ maxHeight={staticCodeBlockHeight - fontSizeRatio} /> - {/key} {/if} - -{:else if shouldDisplayAsExecutionLink(key)} - {value} -{:else if shouldDisplayChildWorkflowLink(key, attributes)} - {value} -{:else if shouldDisplayAsTaskQueueLink(key)} - {value} +{:else if linkType !== 'none'} + {:else} {value} {/if} diff --git a/src/lib/holocene/icon/icon.svelte b/src/lib/holocene/icon/icon.svelte index c4e444244..cf792f184 100644 --- a/src/lib/holocene/icon/icon.svelte +++ b/src/lib/holocene/icon/icon.svelte @@ -15,7 +15,7 @@ {width} {height} {title} - class={$$props.class} + class="shrink-0 {$$props.class}" {...$$restProps} /> {/if} diff --git a/src/lib/holocene/link.svelte b/src/lib/holocene/link.svelte index 1b1cd64a0..ba9bae605 100644 --- a/src/lib/holocene/link.svelte +++ b/src/lib/holocene/link.svelte @@ -66,7 +66,7 @@ } &.light { - @apply text-off-white; + @apply text-off-white hover:text-indigo-400; } } diff --git a/src/lib/holocene/table/paginated-table/index.svelte b/src/lib/holocene/table/paginated-table/index.svelte index 08ffbf968..2581842b7 100644 --- a/src/lib/holocene/table/paginated-table/index.svelte +++ b/src/lib/holocene/table/paginated-table/index.svelte @@ -7,6 +7,7 @@ export let variant: 'primary' | 'split' = 'primary'; export let updating = false; export let maxHeight = ''; + export let fixed = false; let tableContainer: HTMLDivElement; @@ -20,7 +21,11 @@ bind:this={tableContainer} style="max-height: {maxHeight || `calc(100vh - ${tableOffset}px)`}" > - +
@@ -57,7 +62,7 @@ } .paginated-table { - @apply w-full table-auto; + @apply w-full; } .paginated-table-header { diff --git a/src/lib/holocene/table/paginated-table/paginated.svelte b/src/lib/holocene/table/paginated-table/paginated.svelte index 915987075..7ca01fe8c 100644 --- a/src/lib/holocene/table/paginated-table/paginated.svelte +++ b/src/lib/holocene/table/paginated-table/paginated.svelte @@ -27,6 +27,7 @@ export let previousPageButtonLabel: string; export let maxHeight = ''; export let pageSizeOptions: string[] = options; + export let fixed = false; $: url = $page.url; $: perPageParam = url.searchParams.get(perPageKey) ?? pageSizeOptions[0]; @@ -87,7 +88,13 @@ } - + diff --git a/src/lib/utilities/get-single-attribute-for-event.ts b/src/lib/utilities/get-single-attribute-for-event.ts index 758d079d8..ac61ae960 100644 --- a/src/lib/utilities/get-single-attribute-for-event.ts +++ b/src/lib/utilities/get-single-attribute-for-event.ts @@ -141,6 +141,24 @@ const keysWithExecutionLinks = [ 'originalExecutionRunId', ] as const; +export type EventLinkType = + | 'execution' + | 'task-queue' + | 'child-workflow' + | 'nexus-endpoint' + | 'none'; + +export const displayLinkType = ( + key: string, + attributes: CombinedAttributes, +): EventLinkType => { + if (shouldDisplayAsExecutionLink(key)) return 'execution'; + if (shouldDisplayAsTaskQueueLink(key)) return 'task-queue'; + if (shouldDisplayChildWorkflowLink(key, attributes)) return 'child-workflow'; + if (shouldDisplayNexusEndpointLink(key)) return 'nexus-endpoint'; + return 'none'; +}; + // For linking to same workflow but different execution export const shouldDisplayAsExecutionLink = ( key: string, @@ -185,6 +203,16 @@ export const shouldDisplayChildWorkflowLink = ( return false; }; +const keysWithNexusEndpointLinks = ['endpointId'] as const; + +export const shouldDisplayNexusEndpointLink = (key: string): boolean => { + for (const taskQueueKey of keysWithNexusEndpointLinks) { + if (key === taskQueueKey) return true; + } + + return false; +}; + export const shouldDisplayAsTime = (key: string): boolean => { return key?.toLowerCase()?.endsWith('time'); }; @@ -225,6 +253,7 @@ const preferredSummaryKeys = [ 'historySizeBytes', 'identity', 'parentInitiatedEventId', + 'endpointId', ] as const; /**