From 5f991368892a11f577bd598ec7f62c8619563581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Garc=C3=ADa=20Crespo?= Date: Thu, 2 Apr 2020 16:34:03 -0700 Subject: [PATCH] ui: show timeouts activities and user decisions --- ui/src/views/CollectionShowWorkflow.vue | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/ui/src/views/CollectionShowWorkflow.vue b/ui/src/views/CollectionShowWorkflow.vue index a9dfb4b6..e7936fd6 100644 --- a/ui/src/views/CollectionShowWorkflow.vue +++ b/ui/src/views/CollectionShowWorkflow.vue @@ -48,7 +48,7 @@
Activity summary
- + {{ item.name }} {{ item.name }} (local activity) @@ -192,6 +192,16 @@ export default class CollectionShowWorkflow extends Vue { item.completed = details.timestamp; item.duration = (item.completed - item.started) / 1000000000; item.duration = item.duration.toFixed(2); + if (item.name === 'async-completion-activity' && attrs.result) { + item.details = 'User selection: ' + window.atob(attrs.result) + '.'; + } + } + } else if (event.type === 'ActivityTaskTimedOut') { + const attrs = details.activityTaskTimedOutEventAttributes; + if (attrs.scheduledEventId in this.activities) { + const item = this.activities[attrs.scheduledEventId]; + item.status = 'timed out'; + item.details = 'Timeout ' + attrs.timeoutType + '.'; } } else if (event.type === 'WorkflowExecutionStarted') { this.startedAt = details.timestamp; @@ -275,12 +285,14 @@ export default class CollectionShowWorkflow extends Vue { background-color: #ff000011; } .details { - border-top: 2px solid #ff4545; display: block; color: #666; - margin-top: .5rem; padding: 0.5rem 0; } + .failed .details { + margin-top: .5rem; + border-top: 2px solid #ff4545; + } .date, .duration { color: #999; }