mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
🐛 Fix workflow execution bugs (#1941)
This commit is contained in:
@@ -349,6 +349,7 @@ export default mixins(
|
|||||||
this.$externalHooks().run('nodeView.createNodeActiveChanged', { source: 'add_node_button' });
|
this.$externalHooks().run('nodeView.createNodeActiveChanged', { source: 'add_node_button' });
|
||||||
},
|
},
|
||||||
async openExecution (executionId: string) {
|
async openExecution (executionId: string) {
|
||||||
|
this.resetWorkspace();
|
||||||
|
|
||||||
let data: IExecutionResponse | undefined;
|
let data: IExecutionResponse | undefined;
|
||||||
try {
|
try {
|
||||||
@@ -368,6 +369,10 @@ export default mixins(
|
|||||||
this.$store.commit('setWorkflowExecutionData', data);
|
this.$store.commit('setWorkflowExecutionData', data);
|
||||||
|
|
||||||
await this.addNodes(JSON.parse(JSON.stringify(data.workflowData.nodes)), JSON.parse(JSON.stringify(data.workflowData.connections)));
|
await this.addNodes(JSON.parse(JSON.stringify(data.workflowData.nodes)), JSON.parse(JSON.stringify(data.workflowData.connections)));
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.zoomToFit();
|
||||||
|
this.$store.commit('setStateDirty', false);
|
||||||
|
});
|
||||||
|
|
||||||
this.$externalHooks().run('execution.open', { workflowId: data.workflowData.id, workflowName: data.workflowData.name, executionId });
|
this.$externalHooks().run('execution.open', { workflowId: data.workflowData.id, workflowName: data.workflowData.name, executionId });
|
||||||
},
|
},
|
||||||
@@ -824,6 +829,10 @@ export default mixins(
|
|||||||
zoomToFit () {
|
zoomToFit () {
|
||||||
const nodes = this.$store.getters.allNodes as INodeUi[];
|
const nodes = this.$store.getters.allNodes as INodeUi[];
|
||||||
|
|
||||||
|
if (nodes.length === 0) { // some unknown workflow executions
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const {minX, minY, maxX, maxY} = getWorkflowCorners(nodes);
|
const {minX, minY, maxX, maxY} = getWorkflowCorners(nodes);
|
||||||
|
|
||||||
const PADDING = NODE_SIZE * 4;
|
const PADDING = NODE_SIZE * 4;
|
||||||
|
|||||||
Reference in New Issue
Block a user