Skip to content

Commit

Permalink
feat: add createdAt to execution metadata in detail page
Browse files Browse the repository at this point in the history
  • Loading branch information
xwk1246 committed Feb 15, 2024
1 parent a162fb0 commit 56f7115
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const ExecutionMetadata: React.FC<{}> = () => {
const { execution } = React.useContext(ExecutionContext);

const { domain } = execution.id;
const { abortMetadata, duration, error, startedAt, workflowId } =
const { abortMetadata, duration, error, startedAt, createdAt, workflowId } =
execution.closure;
const { referenceExecution, systemMetadata } = execution.spec.metadata;
const cluster = systemMetadata?.executionCluster ?? dashedValueString;
Expand All @@ -80,11 +80,17 @@ export const ExecutionMetadata: React.FC<{}> = () => {
value: cluster,
},
{
label: ExecutionMetadataLabels.time,
label: ExecutionMetadataLabels.startedAt,
value: startedAt
? formatDateUTC(timestampToDate(startedAt))
: dashedValueString,
},
{
label: ExecutionMetadataLabels.createdAt,
value: createdAt
? formatDateUTC(timestampToDate(createdAt))
: dashedValueString,
},
{
label: ExecutionMetadataLabels.duration,
value: duration ? protobufDurationToHMS(duration) : dashedValueString,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ export enum ExecutionMetadataLabels {
cluster = 'Cluster',
domain = 'Domain',
duration = 'Duration',
time = 'Time',
startedAt = 'Start time',
createdAt = 'Create time',
relatedTo = 'Related to',
version = 'Version',
serviceAccount = 'Service Account',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { ExecutionMetadataLabels } from '../constants';
import { ExecutionMetadata } from '../ExecutionMetadata';

const clusterTestId = `metadata-${ExecutionMetadataLabels.cluster}`;
const startTimeTestId = `metadata-${ExecutionMetadataLabels.time}`;
const startTimeTestId = `metadata-${ExecutionMetadataLabels.startedAt}`;
const durationTestId = `metadata-${ExecutionMetadataLabels.duration}`;
const interruptibleTestId = `metadata-${ExecutionMetadataLabels.interruptible}`;
const overwriteCacheTestId = `metadata-${ExecutionMetadataLabels.overwriteCache}`;
Expand Down

0 comments on commit 56f7115

Please sign in to comment.