mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
🐛 Fix workflow execution bugs (#1941)
This commit is contained in:
parent
004979f592
commit
f940ba8f71
|
@ -349,6 +349,7 @@ export default mixins(
|
|||
this.$externalHooks().run('nodeView.createNodeActiveChanged', { source: 'add_node_button' });
|
||||
},
|
||||
async openExecution (executionId: string) {
|
||||
this.resetWorkspace();
|
||||
|
||||
let data: IExecutionResponse | undefined;
|
||||
try {
|
||||
|
@ -368,6 +369,10 @@ export default mixins(
|
|||
this.$store.commit('setWorkflowExecutionData', data);
|
||||
|
||||
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 });
|
||||
},
|
||||
|
@ -824,6 +829,10 @@ export default mixins(
|
|||
zoomToFit () {
|
||||
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 PADDING = NODE_SIZE * 4;
|
||||
|
|
Loading…
Reference in a new issue