fix(editor): Fix bug causing workflow debugging to not work in new canvas (no-changelog) (#10384)
Some checks are pending
Test Master / install-and-build (push) Waiting to run
Test Master / Unit tests (18.x) (push) Blocked by required conditions
Test Master / Unit tests (20.x) (push) Blocked by required conditions
Test Master / Unit tests (22.4) (push) Blocked by required conditions
Test Master / Lint (push) Blocked by required conditions
Test Master / Notify Slack on failure (push) Blocked by required conditions

This commit is contained in:
Alex Grozav 2024-08-13 23:14:06 +03:00 committed by GitHub
parent 1e310f40f7
commit dfd712a45a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,6 +8,7 @@ import {
onMounted, onMounted,
ref, ref,
useCssModule, useCssModule,
watch,
} from 'vue'; } from 'vue';
import { useRoute, useRouter } from 'vue-router'; import { useRoute, useRouter } from 'vue-router';
import WorkflowCanvas from '@/components/canvas/WorkflowCanvas.vue'; import WorkflowCanvas from '@/components/canvas/WorkflowCanvas.vue';
@ -288,6 +289,7 @@ async function initializeRoute() {
nodeHelpers.updateNodesParameterIssues(); nodeHelpers.updateNodesParameterIssues();
await loadCredentials(); await loadCredentials();
await initializeDebugMode();
} }
async function initializeWorkspaceForNewWorkflow() { async function initializeWorkspaceForNewWorkflow() {
@ -306,7 +308,6 @@ async function initializeWorkspaceForExistingWorkflow(id: string) {
const workflowData = await workflowsStore.fetchWorkflow(id); const workflowData = await workflowsStore.fetchWorkflow(id);
await openWorkflow(workflowData); await openWorkflow(workflowData);
await initializeDebugMode();
if (workflowData.meta?.onboardingId) { if (workflowData.meta?.onboardingId) {
trackOpenWorkflowFromOnboardingTemplate(); trackOpenWorkflowFromOnboardingTemplate();
@ -748,6 +749,7 @@ async function importWorkflowExact({ workflow: workflowData }: { workflow: IWork
resetWorkspace(); resetWorkspace();
await initializeData();
await initializeWorkspace({ await initializeWorkspace({
...workflowData, ...workflowData,
nodes: NodeViewUtils.getFixedNodesList<INodeUi>(workflowData.nodes), nodes: NodeViewUtils.getFixedNodesList<INodeUi>(workflowData.nodes),
@ -1370,6 +1372,21 @@ function registerCustomActions() {
// }); // });
} }
/**
* Routing
*/
watch(
() => route.name,
async () => {
if (!checkIfEditingIsAllowed()) {
return;
}
await initializeRoute();
},
);
/** /**
* Lifecycle * Lifecycle
*/ */