mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
show execution not forund message
This commit is contained in:
parent
39704860ef
commit
ca98c30f6b
|
@ -79,9 +79,9 @@ export class WaitingForms extends WaitingWebhooks {
|
|||
|
||||
const execution = await this.getExecution(executionId);
|
||||
|
||||
if (execution && suffix === WAITING_FORMS_EXECUTION_STATUS) {
|
||||
let status: string = execution?.status;
|
||||
const { node } = execution.data.executionData?.nodeExecutionStack[0] ?? {};
|
||||
if (suffix === WAITING_FORMS_EXECUTION_STATUS) {
|
||||
let status: string = execution?.status ?? 'null';
|
||||
const { node } = execution?.data.executionData?.nodeExecutionStack[0] ?? {};
|
||||
|
||||
if (node && status === 'waiting') {
|
||||
if (node.type === FORM_NODE_TYPE) {
|
||||
|
@ -91,7 +91,7 @@ export class WaitingForms extends WaitingWebhooks {
|
|||
status = 'form-waiting';
|
||||
}
|
||||
}
|
||||
res.send(status ?? null);
|
||||
res.send(status);
|
||||
return { noWebhookResponse: true };
|
||||
}
|
||||
|
||||
|
|
|
@ -774,7 +774,6 @@
|
|||
let formWaitingUrl;
|
||||
|
||||
const checkExecutionStatus = async () => {
|
||||
|
||||
try {
|
||||
const response = await fetch(`${formWaitingUrl ?? window.location.href}/n8n-execution-status`);
|
||||
const text = (await response.text()).trim();
|
||||
|
@ -791,6 +790,16 @@
|
|||
return;
|
||||
}
|
||||
|
||||
if (text === "null") {
|
||||
form.style.display = 'none';
|
||||
document.querySelector('#submitted-form').style.display = 'block';
|
||||
document.querySelector('#submitted-header').textContent = 'Could not get execution status';
|
||||
document.querySelector('#submitted-content').textContent =
|
||||
'Make sure "Save successful production executions" is enabled in your workflow settings';
|
||||
clearTimeout(timeoutId);
|
||||
return;
|
||||
}
|
||||
|
||||
if(["canceled", "crashed", "error" ].includes(text)) {
|
||||
form.style.display = 'none';
|
||||
document.querySelector('#submitted-form').style.display = 'block';
|
||||
|
|
Loading…
Reference in a new issue