Skip to content

Commit 59d9204

Browse files
authored
show 0 heartbeatTimeout as not set (#982)
1 parent 1c227fc commit 59d9204

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/views/workflow-history/config/workflow-history-event-details.config.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ const workflowHistoryEventDetailsConfig = [
2626
return (
2727
value === 0 &&
2828
new RegExp(
29-
'retryPolicy.(maximumAttempts|expirationIntervalInSeconds)$'
29+
'(heartbeatTimeoutSeconds|retryPolicy.(maximumAttempts|expirationIntervalInSeconds))$'
3030
).test(path)
3131
);
3232
},
33+
getLabel: ({ key }) => key.replace(/InSeconds|Seconds|$/, ''), // remove seconds suffix from label as formatted duration can be minutes/hours etc.
3334
valueComponent: () =>
3435
createElement(WorkflowHistoryEventDetailsPlaceholderText),
3536
},
@@ -57,9 +58,9 @@ const workflowHistoryEventDetailsConfig = [
5758
forceWrap: true,
5859
},
5960
{
60-
name: 'Duration timeout & backoff seconds',
61-
pathRegex: '(TimeoutSeconds|BackoffSeconds)$',
62-
getLabel: ({ key }) => key.replace(/Seconds$/, ''), // remove seconds suffix from label as formatted duration can be minutes/hours etc.
61+
name: 'Duration & interval seconds',
62+
pathRegex: '(TimeoutSeconds|BackoffSeconds|InSeconds)$',
63+
getLabel: ({ key }) => key.replace(/InSeconds|Seconds|$/, ''), // remove seconds suffix from label as formatted duration can be minutes/hours etc.
6364
valueComponent: ({ entryValue }) =>
6465
formatDuration({ seconds: entryValue > 0 ? entryValue : 0, nanos: 0 }),
6566
},

0 commit comments

Comments
 (0)