Skip to content

Commit

Permalink
fix response for pending children and pending activities to show up i…
Browse files Browse the repository at this point in the history
…n UI (#490)
  • Loading branch information
just-at-uber authored Jun 28, 2022
1 parent 1839c53 commit 3c6aae9
Showing 1 changed file with 22 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,20 @@ const formatResponseDescribeWorkflow = ({
pendingActivities: pendingActivities?.length
? pendingActivities.map(
({
activityId,
expirationTime,
lastFailure,
lastHeartbeatTime,
lastStartedTime,
scheduledTime,
state,
...pendingActivity
}) => ({
...pendingActivity,
activityID: parseInt(activityId),
expirationTimestamp: formatTimestampToDatetime(expirationTime),
lastFailureDetails: lastFailure?.details || null,
lastFailureReason: lastFailure?.reason || null,
lastHeartbeatTimestamp: formatTimestampToDatetime(lastHeartbeatTime),
lastStartedTimestamp: formatTimestampToDatetime(lastStartedTime),
scheduledTimestamp: formatTimestampToDatetime(scheduledTime),
Expand All @@ -70,10 +75,23 @@ const formatResponseDescribeWorkflow = ({
)
: null,
pendingChildren: pendingChildren?.length
? pendingChildren.map(({ parentClosePolicy, ...pendingChild }) => ({
...pendingChild,
parentClosePolicy: formatEnum(parentClosePolicy, 'PARENT_CLOSE_POLICY'),
}))
? pendingChildren.map(
({
initiatedId,
parentClosePolicy,
workflowExecution,
...pendingChild
}) => ({
...pendingChild,
initiatedID: parseInt(initiatedId),
parentClosePolicy: formatEnum(
parentClosePolicy,
'PARENT_CLOSE_POLICY'
),
runID: workflowExecution?.runId || null,
workflowID: workflowExecution?.workflowId || null,
})
)
: null,
pendingDecision: pendingDecision
? {
Expand Down

0 comments on commit 3c6aae9

Please sign in to comment.