From d90a192757432eeea04df668df33046abbea6ee2 Mon Sep 17 00:00:00 2001 From: Milorad Filipovic Date: Wed, 16 Nov 2022 17:09:40 +0100 Subject: [PATCH 1/5] =?UTF-8?q?=E2=9C=A8=20Adding=20`Stop=20execution`=20b?= =?UTF-8?q?utton=20to=20execution=20preview?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExecutionsView/ExecutionPreview.vue | 6 ++++ .../ExecutionsView/ExecutionsView.vue | 30 ++++++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/packages/editor-ui/src/components/ExecutionsView/ExecutionPreview.vue b/packages/editor-ui/src/components/ExecutionsView/ExecutionPreview.vue index 3648049da2555..5cc14ac92e683 100644 --- a/packages/editor-ui/src/components/ExecutionsView/ExecutionPreview.vue +++ b/packages/editor-ui/src/components/ExecutionsView/ExecutionPreview.vue @@ -6,6 +6,9 @@ {{ $locale.baseText('executionDetails.runningMessage') }} + + {{ $locale.baseText('executionsList.stopExecution') }} +
@@ -111,6 +114,9 @@ export default mixins(restApi, showMessage, executionHelpers).extend({ handleRetryClick(command: string): void { this.$emit('retryExecution', { execution: this.activeExecution, command }); }, + handleStopClick(): void { + this.$emit('stopExecution'); + }, onRetryButtonBlur(event: FocusEvent): void { // Hide dropdown when clicking outside of current document const retryDropdown = this.$refs.retryDropdown as Vue & { hide: () => void } | undefined; diff --git a/packages/editor-ui/src/components/ExecutionsView/ExecutionsView.vue b/packages/editor-ui/src/components/ExecutionsView/ExecutionsView.vue index 3081327b3110f..f028fd5832123 100644 --- a/packages/editor-ui/src/components/ExecutionsView/ExecutionsView.vue +++ b/packages/editor-ui/src/components/ExecutionsView/ExecutionsView.vue @@ -12,7 +12,12 @@ @refresh="loadAutoRefresh" />
- +
@@ -240,6 +245,29 @@ export default mixins(restApi, showMessage, executionHelpers, debounceHelper, wo type: 'success', }); }, + async onStopExecution(): Promise { + const activeExecutionId = this.$route.params.executionId; + + try { + await this.restApi().stopCurrentExecution(activeExecutionId); + + this.$showMessage({ + title: this.$locale.baseText('executionsList.showMessage.stopExecution.title'), + message: this.$locale.baseText( + 'executionsList.showMessage.stopExecution.message', + { interpolate: { activeExecutionId } }, + ), + type: 'success', + }); + + this.loadAutoRefresh(); + } catch (error) { + this.$showError( + error, + this.$locale.baseText('executionsList.showError.stopExecution.title'), + ); + } + }, onFilterUpdated(newFilter: { finished: boolean, status: string }): void { this.filter = newFilter; this.setExecutions(); From 979dc3d6aa8ce334b003213050e3bb1ccf25cdfe Mon Sep 17 00:00:00 2001 From: Milorad Filipovic Date: Thu, 17 Nov 2022 10:21:39 +0100 Subject: [PATCH 2/5] =?UTF-8?q?=E2=9C=A8=20Added=20execution=20timer=20for?= =?UTF-8?q?=20running=20executions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/ExecutionsView/ExecutionCard.vue | 7 ++++++- .../src/components/ExecutionsView/ExecutionPreview.vue | 2 +- packages/editor-ui/src/plugins/i18n/locales/en.json | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/editor-ui/src/components/ExecutionsView/ExecutionCard.vue b/packages/editor-ui/src/components/ExecutionsView/ExecutionCard.vue index f0e282e6e57a5..5e38b74472c65 100644 --- a/packages/editor-ui/src/components/ExecutionsView/ExecutionCard.vue +++ b/packages/editor-ui/src/components/ExecutionsView/ExecutionCard.vue @@ -18,7 +18,8 @@ {{ executionUIDetails.label }} - {{ $locale.baseText('executionDetails.runningTimeRunning', { interpolate: { time: executionUIDetails.runningTime } }) }} + {{ $locale.baseText('executionDetails.runningTimeRunning') }} + {{ $locale.baseText('executionDetails.runningTimeFinished', { interpolate: { time: executionUIDetails.runningTime } }) }} @@ -56,6 +57,7 @@ import { executionHelpers, IExecutionUIData } from '../mixins/executionsHelpers' import { VIEWS } from '../../constants'; import { showMessage } from '../mixins/showMessage'; import { restApi } from '../mixins/restApi'; +import ExecutionTime from '@/components/ExecutionTime.vue'; export default mixins( executionHelpers, @@ -63,6 +65,9 @@ export default mixins( restApi, ).extend({ name: 'execution-card', + components: { + ExecutionTime, + }, data() { return { VIEWS, diff --git a/packages/editor-ui/src/components/ExecutionsView/ExecutionPreview.vue b/packages/editor-ui/src/components/ExecutionsView/ExecutionPreview.vue index 5cc14ac92e683..fb9f5b1efa2bf 100644 --- a/packages/editor-ui/src/components/ExecutionsView/ExecutionPreview.vue +++ b/packages/editor-ui/src/components/ExecutionsView/ExecutionPreview.vue @@ -6,7 +6,7 @@ {{ $locale.baseText('executionDetails.runningMessage') }} - + {{ $locale.baseText('executionsList.stopExecution') }}
diff --git a/packages/editor-ui/src/plugins/i18n/locales/en.json b/packages/editor-ui/src/plugins/i18n/locales/en.json index 1be9eaca15238..f192cb5c2c666 100644 --- a/packages/editor-ui/src/plugins/i18n/locales/en.json +++ b/packages/editor-ui/src/plugins/i18n/locales/en.json @@ -395,7 +395,7 @@ "executionDetails.readOnly.youreViewingTheLogOf": "You're viewing the log of a previous execution. You cannot
\n\t\tmake changes since this execution already occurred. Make changes
\n\t\tto this workflow by clicking on its name on the left.", "executionDetails.retry": "Retry of execution", "executionDetails.runningTimeFinished": "in {time}", - "executionDetails.runningTimeRunning": "for {time}", + "executionDetails.runningTimeRunning": "for", "executionDetails.runningMessage": "Execution is running. It will show here once finished.", "executionDetails.workflow": "workflow", "executionsLandingPage.emptyState.noTrigger.heading": "Set up the first step. Then execute your workflow", From f1b227bc59e812c2f35b9144ccad1a868ea31113 Mon Sep 17 00:00:00 2001 From: Milorad Filipovic Date: Thu, 17 Nov 2022 10:54:02 +0100 Subject: [PATCH 3/5] =?UTF-8?q?=F0=9F=92=84=20Adjusting=20spinner=20size?= =?UTF-8?q?=20and=20text=20color?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ExecutionsView/ExecutionPreview.vue | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/editor-ui/src/components/ExecutionsView/ExecutionPreview.vue b/packages/editor-ui/src/components/ExecutionsView/ExecutionPreview.vue index fb9f5b1efa2bf..5804d4b6879ca 100644 --- a/packages/editor-ui/src/components/ExecutionsView/ExecutionPreview.vue +++ b/packages/editor-ui/src/components/ExecutionsView/ExecutionPreview.vue @@ -1,12 +1,12 @@