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

This commit is contained in:
Alex Grozav 2024-10-22 22:36:05 +03:00 committed by GitHub
parent 1b734dd9f4
commit 695f6531f4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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() {