mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(editor): Fix switching to execution debug mode in new canvas (no-changelog) (#11350)
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
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:
parent
1b734dd9f4
commit
695f6531f4
|
@ -309,27 +309,32 @@ async function initializeRoute() {
|
|||
} else if (route.name === VIEWS.TEMPLATE_IMPORT) {
|
||||
const templateId = route.params.id;
|
||||
await openWorkflowTemplate(templateId.toString());
|
||||
} else if (isWorkflowRoute.value && !isAlreadyInitialized) {
|
||||
historyStore.reset();
|
||||
} else if (isWorkflowRoute.value) {
|
||||
if (!isAlreadyInitialized) {
|
||||
historyStore.reset();
|
||||
|
||||
// If there is no workflow id, treat it as a new workflow
|
||||
if (isNewWorkflowRoute.value || !workflowId.value) {
|
||||
if (route.meta?.nodeView === true) {
|
||||
await initializeWorkspaceForNewWorkflow();
|
||||
// If there is no workflow id, treat it as a new workflow
|
||||
if (isNewWorkflowRoute.value || !workflowId.value) {
|
||||
if (route.meta?.nodeView === true) {
|
||||
await initializeWorkspaceForNewWorkflow();
|
||||
}
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
await initializeWorkspaceForExistingWorkflow(workflowId.value);
|
||||
|
||||
await loadCredentials();
|
||||
|
||||
void nextTick(() => {
|
||||
nodeHelpers.updateNodesInputIssues();
|
||||
nodeHelpers.updateNodesCredentialsIssues();
|
||||
nodeHelpers.updateNodesParameterIssues();
|
||||
});
|
||||
}
|
||||
|
||||
await initializeWorkspaceForExistingWorkflow(workflowId.value);
|
||||
|
||||
await loadCredentials();
|
||||
await initializeDebugMode();
|
||||
|
||||
void nextTick(() => {
|
||||
nodeHelpers.updateNodesInputIssues();
|
||||
nodeHelpers.updateNodesCredentialsIssues();
|
||||
nodeHelpers.updateNodesParameterIssues();
|
||||
});
|
||||
if (route.name === VIEWS.EXECUTION_DEBUG) {
|
||||
await initializeDebugMode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1396,16 +1401,14 @@ function checkIfRouteIsAllowed() {
|
|||
*/
|
||||
|
||||
async function initializeDebugMode() {
|
||||
if (route.name === VIEWS.EXECUTION_DEBUG) {
|
||||
workflowHelpers.setDocumentTitle(workflowsStore.workflowName, 'DEBUG');
|
||||
workflowHelpers.setDocumentTitle(workflowsStore.workflowName, 'DEBUG');
|
||||
|
||||
if (!workflowsStore.isInDebugMode) {
|
||||
await applyExecutionData(route.params.executionId as string);
|
||||
workflowsStore.isInDebugMode = true;
|
||||
}
|
||||
|
||||
canvasEventBus.on('saved:workflow', onSaveFromWithinExecutionDebug);
|
||||
if (!workflowsStore.isInDebugMode) {
|
||||
await applyExecutionData(route.params.executionId as string);
|
||||
workflowsStore.isInDebugMode = true;
|
||||
}
|
||||
|
||||
canvasEventBus.on('saved:workflow', onSaveFromWithinExecutionDebug);
|
||||
}
|
||||
|
||||
async function onSaveFromWithinExecutionDebug() {
|
||||
|
|
Loading…
Reference in a new issue