diff --git a/packages/editor-ui/src/components/ExecutionsList.vue b/packages/editor-ui/src/components/ExecutionsList.vue index 8845678e74..f8e9abb0ce 100644 --- a/packages/editor-ui/src/components/ExecutionsList.vue +++ b/packages/editor-ui/src/components/ExecutionsList.vue @@ -60,6 +60,7 @@ + @@ -86,10 +87,13 @@
- + - + @@ -109,6 +113,12 @@ + + + {{ getStatusText(execution) }} +
@@ -129,18 +139,15 @@ - + + + + -
- +
- +
+ +
+ + + data.id === workflowId); if (workflow === undefined) { @@ -784,16 +793,35 @@ export default mixins(externalHooks, genericHelpers, executionHelpers, restApi, this.isDataLoading = false; }, + getStatus(execution: IExecutionsSummary): ExecutionStatus { + let status: ExecutionStatus = 'unknown'; + if (execution.waitTill) { + status = 'waiting'; + } else if (execution.stoppedAt === undefined) { + status = 'running'; + } else if (execution.finished) { + status = 'success'; + } else if (execution.stoppedAt !== null) { + status = 'failed'; + } else { + status = 'unknown'; + } + return status; + }, + getRowClass(execution: IExecutionsSummary): string { + return [this.$style.execRow, this.$style[this.getStatus(execution)]].join(' '); + }, getStatusText(entry: IExecutionsSummary): string { + const status = this.getStatus(entry); let text = ''; - if (entry.waitTill) { + if (status === 'waiting') { text = this.$locale.baseText('executionsList.waiting'); - } else if (entry.stoppedAt === undefined) { + } else if (status === 'running') { text = this.$locale.baseText('executionsList.running'); - } else if (entry.finished) { + } else if (status === 'success') { text = this.$locale.baseText('executionsList.succeeded'); - } else if (entry.stoppedAt !== null) { + } else if (status === 'failed') { text = this.$locale.baseText('executionsList.error'); } else { text = this.$locale.baseText('executionsList.unknown'); @@ -802,15 +830,16 @@ export default mixins(externalHooks, genericHelpers, executionHelpers, restApi, return text; }, getStatusTextTranslationPath(entry: IExecutionsSummary): string { + const status = this.getStatus(entry); let path = ''; - if (entry.waitTill) { + if (status === 'waiting') { path = 'executionsList.statusWaiting'; - } else if (entry.stoppedAt === undefined) { + } else if (status === 'running') { path = 'executionsList.statusRunning'; - } else if (entry.finished) { + } else if (status === 'success') { path = 'executionsList.statusText'; - } else if (entry.stoppedAt !== null) { + } else if (status === 'failed') { path = 'executionsList.statusText'; } else { path = 'executionsList.statusUnknown'; @@ -818,6 +847,18 @@ export default mixins(externalHooks, genericHelpers, executionHelpers, restApi, return path; }, + getStatusTooltipText(entry: IExecutionsSummary): string { + const status = this.getStatus(entry); + let text = ''; + + if (status === 'waiting' && this.isWaitTillIndefinite(entry)) { + text = this.$locale.baseText( + 'executionsList.statusTooltipText.theWorkflowIsWaitingIndefinitely', + ); + } + + return text; + }, async stopExecution(activeExecutionId: string) { try { // Add it to the list of currently stopping executions that we @@ -868,6 +909,15 @@ export default mixins(externalHooks, genericHelpers, executionHelpers, restApi, } this.isDataLoading = true; }, + isWaitTillIndefinite(execution: IExecutionsSummary): boolean { + if (!execution.waitTill) { + return false; + } + return new Date(execution.waitTill).toISOString() === WAIT_TIME_UNLIMITED; + }, + isRunning(execution: IExecutionsSummary): boolean { + return this.getStatus(execution) === 'running'; + }, }, }, ); @@ -936,6 +986,10 @@ export default mixins(externalHooks, genericHelpers, executionHelpers, restApi, color: var(--color-danger); } + .waiting & { + color: var(--color-secondary); + } + .success & { font-weight: var(--font-weight-normal); } @@ -949,7 +1003,7 @@ export default mixins(externalHooks, genericHelpers, executionHelpers, restApi, } } -.actionsContainer { +.buttonCell { overflow: hidden; button { @@ -960,10 +1014,6 @@ export default mixins(externalHooks, genericHelpers, executionHelpers, restApi, .execRow:hover & { transform: translateX(0); } - - &:not(:first-child) { - margin-left: 5px; - } } } diff --git a/packages/editor-ui/src/components/ExecutionsView/ExecutionCard.vue b/packages/editor-ui/src/components/ExecutionsView/ExecutionCard.vue index 7dec1e03b5..45cacf47a7 100644 --- a/packages/editor-ui/src/components/ExecutionsView/ExecutionCard.vue +++ b/packages/editor-ui/src/components/ExecutionsView/ExecutionCard.vue @@ -64,12 +64,16 @@ activatorIcon="redo" @select="onRetryMenuItemSelect" /> - + + + +
diff --git a/packages/editor-ui/src/plugins/i18n/locales/en.json b/packages/editor-ui/src/plugins/i18n/locales/en.json index 47e87aeeff..25ec639cb9 100644 --- a/packages/editor-ui/src/plugins/i18n/locales/en.json +++ b/packages/editor-ui/src/plugins/i18n/locales/en.json @@ -454,7 +454,7 @@ "executionsList.selectStatus": "Select Status", "executionsList.selectWorkflow": "Select Workflow", "executionsList.selected": "{numSelected} execution selected:", - "executionsList.manual": "Manual execution", + "executionsList.test": "Test execution", "executionsList.showError.handleDeleteSelected.title": "Problem deleting executions", "executionsList.showError.loadMore.title": "Problem loading executions", "executionsList.showError.loadWorkflows.title": "Problem loading workflows", @@ -484,6 +484,7 @@ "executionsList.workflowExecutions": "Workflow Executions", "executionsList.view": "View", "executionsList.stop": "Stop", + "executionsList.statusTooltipText.theWorkflowIsWaitingIndefinitely": "The workflow is waiting indefinitely for an incoming webhook call.", "executionSidebar.executionName": "Execution {id}", "executionSidebar.searchPlaceholder": "Search executions...", "executionView.onPaste.title": "Cannot paste here",