fix: Check if execution will wait on Test step click (no-changelog) (#11311)

This commit is contained in:
Michael Kret
2024-10-23 15:53:01 +03:00
committed by GitHub
parent 96219486dc
commit fd11f1e169
8 changed files with 138 additions and 31 deletions

View File

@@ -56,7 +56,7 @@ defineOptions({
const lastPopupCountUpdate = ref(0);
const router = useRouter();
const { runWorkflowResolvePending, stopCurrentExecution } = useRunWorkflow({ router });
const { runWorkflow, runWorkflowResolvePending, stopCurrentExecution } = useRunWorkflow({ router });
const workflowsStore = useWorkflowsStore();
const externalHooks = useExternalHooks();
@@ -76,10 +76,10 @@ const nodeType = computed((): INodeTypeDescription | null => {
});
const isNodeRunning = computed(() => {
if (!uiStore.isActionActive['workflowRunning']) return false;
const triggeredNode = workflowsStore.executedNode;
return (
uiStore.isActionActive.workflowRunning &&
(workflowsStore.isNodeExecuting(node.value?.name ?? '') || triggeredNode === node.value?.name)
workflowsStore.isNodeExecuting(node.value?.name ?? '') || triggeredNode === node.value?.name
);
});
@@ -264,10 +264,18 @@ async function onClick() {
telemetry.track('User clicked execute node button', telemetryPayload);
await externalHooks.run('nodeExecuteButton.onClick', telemetryPayload);
await runWorkflowResolvePending({
destinationNode: props.nodeName,
source: 'RunData.ExecuteNodeButton',
});
if (workflowsStore.isWaitingExecution) {
await runWorkflowResolvePending({
destinationNode: props.nodeName,
source: 'RunData.ExecuteNodeButton',
});
} else {
await runWorkflow({
destinationNode: props.nodeName,
source: 'RunData.ExecuteNodeButton',
});
}
emit('execute');
}
}