-
Notifications
You must be signed in to change notification settings - Fork 144
DT-3655 - add external payload count and size to workflow details #3276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rossedfort
wants to merge
8
commits into
main
Choose a base branch
from
DT-3655-workflow-details-external-payloads
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
0560ebf
add external payload count and size to workflow details
rossedfort 466578c
update snaps
rossedfort 5af83cf
fix strict
rossedfort 0e50adb
update other snaps
rossedfort e18c2ed
add text-secondary to detail list label
rossedfort d5e7196
update detail list components to support new styles for workflow deta…
rossedfort a2771fb
fix tooltip font
rossedfort 48ba1c4
fix typo and remove rust link, there is no developer guide in docs fo…
rossedfort File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| <script lang="ts"> | ||
| import type { Snippet } from 'svelte'; | ||
| import { type ClassNameValue, twMerge } from 'tailwind-merge'; | ||
|
|
||
| import CopyButton from '$lib/holocene/copyable/button.svelte'; | ||
| import { translate } from '$lib/i18n/translate'; | ||
|
|
@@ -9,17 +10,23 @@ | |
| copyable?: boolean; | ||
| copyableText?: string; | ||
| children: Snippet; | ||
| class?: ClassNameValue; | ||
| } | ||
|
|
||
| const { children, copyable, copyableText }: Props = $props(); | ||
| const { | ||
| children, | ||
| copyable, | ||
| copyableText, | ||
| class: className = '', | ||
| }: Props = $props(); | ||
| const { copy, copied } = copyToClipboard(); | ||
|
|
||
| const handleCopy = (e: Event) => { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| copy(e, copyableText); | ||
| }; | ||
| </script> | ||
|
|
||
| <dt class="col-[2] flex"> | ||
| <dt class={twMerge('col-[2] flex', className)}> | ||
| {@render children()} | ||
| {#if copyable} | ||
| <!-- | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,13 @@ | ||
| <script lang="ts"> | ||
| import { page } from '$app/state'; | ||
|
|
||
| import { timestamp } from '$lib/components/timestamp.svelte'; | ||
| import Tooltip from '$lib/holocene/tooltip.svelte'; | ||
| import { translate } from '$lib/i18n/translate'; | ||
| import { fetchWorkflow } from '$lib/services/workflow-service'; | ||
| import { isCloud } from '$lib/stores/advanced-visibility'; | ||
| import { fullEventHistory } from '$lib/stores/events'; | ||
| import { | ||
| relativeTime, | ||
| timeFormat, | ||
| timestampFormat, | ||
| } from '$lib/stores/time-format'; | ||
| import type { WorkflowExecution } from '$lib/types/workflows'; | ||
| import { formatBytes } from '$lib/utilities/format-bytes'; | ||
| import { formatDate } from '$lib/utilities/format-date'; | ||
| import { | ||
| formatDistanceAbbreviated, | ||
| formatDuration, | ||
|
|
@@ -38,6 +31,7 @@ | |
| DetailListTextValue, | ||
| DetailListValue, | ||
| } from '../detail-list'; | ||
| import DetailListTimestampValue from '../detail-list/detail-list-timestamp-value.svelte'; | ||
|
|
||
| import SdkLogo from './sdk-logo.svelte'; | ||
|
|
||
|
|
@@ -116,42 +110,25 @@ | |
|
|
||
| <DetailList aria-label="workflow details" rowCount={5}> | ||
| <DetailListLabel>{translate('common.start')}</DetailListLabel> | ||
| <DetailListTextValue | ||
| text={$timestamp(workflow?.startTime)} | ||
| tooltipText={formatDate(workflow?.startTime, $timeFormat, { | ||
| relative: !$relativeTime, | ||
| format: $timestampFormat, | ||
| })} | ||
| /> | ||
| <DetailListTimestampValue timestamp={workflow?.startTime} /> | ||
rossedfort marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| {#if workflow?.startDelay} | ||
| <DetailListLabel>{translate('workflows.execution-start')}</DetailListLabel> | ||
| <DetailListTextValue | ||
| text={$timestamp(workflow?.executionTime)} | ||
| tooltipText={formatDate(workflow?.executionTime, $timeFormat, { | ||
| relative: !$relativeTime, | ||
| format: $timestampFormat, | ||
| })} | ||
| /> | ||
| <DetailListTimestampValue timestamp={workflow?.executionTime} /> | ||
| {/if} | ||
|
|
||
| <DetailListLabel>{translate('common.end')}</DetailListLabel> | ||
| <DetailListTextValue | ||
| text={workflow?.endTime ? $timestamp(workflow?.endTime) : '-'} | ||
| tooltipText={formatDate(workflow?.endTime, $timeFormat, { | ||
| relative: !$relativeTime, | ||
| format: $timestampFormat, | ||
| })} | ||
| /> | ||
| <DetailListTimestampValue timestamp={workflow?.endTime} fallback="-" /> | ||
|
|
||
| <DetailListLabel> | ||
| {translate('common.duration')} | ||
| </DetailListLabel> | ||
| <DetailListTextValue text={elapsedTime} /> | ||
| <DetailListTextValue class="font-mono" text={elapsedTime} /> | ||
|
|
||
| {#if workflow?.workflowExecutionTimeout && workflow?.workflowExecutionTimeout.toString() !== '0s'} | ||
| <DetailListLabel>{translate('workflows.workflow-timeout')}</DetailListLabel> | ||
| <DetailListTextValue | ||
| class="font-mono" | ||
| text={formatDuration(workflow.workflowExecutionTimeout)} | ||
| tooltipText={formatDuration(workflow.workflowExecutionTimeout)} | ||
| /> | ||
|
|
@@ -288,13 +265,40 @@ | |
|
|
||
| <DetailListColumn> | ||
| <DetailListLabel>{translate('common.history-size')}</DetailListLabel> | ||
| <DetailListTextValue text={historySizeFormatted} /> | ||
| <DetailListTextValue | ||
| class="font-mono" | ||
| tooltipText={workflow.externalPayloadCount | ||
| ? translate('workflows.external-payload-tooltip') | ||
| : ''} | ||
| iconName={workflow.externalPayloadCount ? 'square-info' : undefined} | ||
| iconPosition="trailing" | ||
| text={historySizeFormatted} | ||
| /> | ||
| {#if workflow.externalPayloadCount} | ||
| <DetailListLabel | ||
| >{translate('workflows.external-payload-size')}</DetailListLabel | ||
| > | ||
| <DetailListTextValue | ||
| class="font-mono" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| text={formatBytes(parseInt(workflow.externalPayloadSizeBytes, 10))} | ||
| /> | ||
| <DetailListLabel | ||
| >{translate('workflows.external-payload-count')}</DetailListLabel | ||
| > | ||
| <DetailListTextValue | ||
| class="font-mono" | ||
| text={workflow.externalPayloadCount} | ||
| /> | ||
| {/if} | ||
|
|
||
| {#if !$isCloud} | ||
| <DetailListLabel | ||
| >{translate('workflows.state-transitions')}</DetailListLabel | ||
| > | ||
| <DetailListTextValue text={workflow?.stateTransitionCount} /> | ||
| <DetailListTextValue | ||
| class="font-mono" | ||
| text={workflow?.stateTransitionCount} | ||
| /> | ||
| {:else} | ||
| <Tooltip | ||
| bottomLeft | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| <script lang="ts"> | ||
| import Svg from '../svg.svelte'; | ||
| let props = $props(); | ||
| </script> | ||
|
|
||
| <Svg {...props}> | ||
| <path | ||
| d="M 2.5714286,2.5714286 V 21.428571 H 21.428571 V 2.5714286 Z M 0,0 H 2.5714286 21.428571 24 V 2.5714286 21.428571 24 H 21.428571 2.5714286 0 V 21.428571 2.5714286 Z M 9.8571428,16.285714 H 11.142857 V 12.857143 H 9.8571428 8.5714285 v -2.571429 h 1.2857143 2.5714282 1.285715 v 1.285714 4.714286 h 0.428571 1.285714 v 2.571429 H 14.142857 9.8571428 8.5714285 V 16.285714 Z M 13.714286,5.1428571 V 8.5714285 H 10.285714 V 5.1428571 Z" | ||
| fill="currentcolor" | ||
| /> | ||
| </Svg> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the font-sans a bug fix?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a
classprop which gets added to the parentDetailListValue. In some cases we want values to be in monospace font, such as integer values, so I've addedfont-monoto those instances. This makes it so that the Tooltip doesn't display as monospace font.