From 833c0e497203c59cbc6211cbf17d3b2bcfe6045e Mon Sep 17 00:00:00 2001 From: Mutasem Aldmour <4711238+mutdmour@users.noreply.github.com> Date: Fri, 3 Dec 2021 13:59:15 +0100 Subject: [PATCH] :sparkles: Open workflows/executions in new window (ctrl/command + click) (#2508) * open workflows in new window * open execution in new window --- packages/editor-ui/src/components/ExecutionsList.vue | 11 +++++++++-- packages/editor-ui/src/components/WorkflowOpen.vue | 9 ++++++++- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/packages/editor-ui/src/components/ExecutionsList.vue b/packages/editor-ui/src/components/ExecutionsList.vue index 86aa77f7b..2e61fbca6 100644 --- a/packages/editor-ui/src/components/ExecutionsList.vue +++ b/packages/editor-ui/src/components/ExecutionsList.vue @@ -137,7 +137,7 @@ - + @@ -324,7 +324,14 @@ export default mixins( return false; }, convertToDisplayDate, - displayExecution (execution: IExecutionShortResponse) { + displayExecution (execution: IExecutionShortResponse, e: PointerEvent) { + if (e.metaKey || e.ctrlKey) { + const route = this.$router.resolve({name: 'ExecutionById', params: {id: execution.id}}); + window.open(route.href, '_blank'); + + return; + } + this.$router.push({ name: 'ExecutionById', params: { id: execution.id }, diff --git a/packages/editor-ui/src/components/WorkflowOpen.vue b/packages/editor-ui/src/components/WorkflowOpen.vue index 062d3a716..81d08761c 100644 --- a/packages/editor-ui/src/components/WorkflowOpen.vue +++ b/packages/editor-ui/src/components/WorkflowOpen.vue @@ -134,11 +134,18 @@ export default mixins( this.filterTagIds.push(tagId); } }, - async openWorkflow (data: IWorkflowShortResponse, column: any) { // tslint:disable-line:no-any + async openWorkflow (data: IWorkflowShortResponse, column: any, cell: any, e: PointerEvent) { // tslint:disable-line:no-any if (column.label !== 'Active') { const currentWorkflowId = this.$store.getters.workflowId; + if (e.metaKey || e.ctrlKey) { + const route = this.$router.resolve({name: 'NodeViewExisting', params: {name: data.id}}); + window.open(route.href, '_blank'); + + return; + } + if (data.id === currentWorkflowId) { this.$showMessage({ title: 'Already open',