mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 19:32:15 +00:00
fix: Show correct message on retry (#14321)
This commit is contained in:
@@ -210,3 +210,54 @@ export function hasTrimmedItem(taskData: ITaskData[]) {
|
||||
export function hasTrimmedData(runData: IRunData) {
|
||||
return Object.keys(runData).some((nodeName) => hasTrimmedItem(runData[nodeName]));
|
||||
}
|
||||
|
||||
export function executionRetryMessage(executionStatus: ExecutionStatus):
|
||||
| {
|
||||
title: string;
|
||||
type: 'error' | 'info' | 'success';
|
||||
}
|
||||
| undefined {
|
||||
if (executionStatus === 'success') {
|
||||
return {
|
||||
title: i18n.baseText('executionsList.showMessage.retrySuccess.title'),
|
||||
type: 'success',
|
||||
};
|
||||
}
|
||||
|
||||
if (executionStatus === 'waiting') {
|
||||
return {
|
||||
title: i18n.baseText('executionsList.showMessage.retryWaiting.title'),
|
||||
type: 'info',
|
||||
};
|
||||
}
|
||||
|
||||
if (executionStatus === 'running') {
|
||||
return {
|
||||
title: i18n.baseText('executionsList.showMessage.retryRunning.title'),
|
||||
type: 'info',
|
||||
};
|
||||
}
|
||||
|
||||
if (executionStatus === 'crashed') {
|
||||
return {
|
||||
title: i18n.baseText('executionsList.showMessage.retryCrashed.title'),
|
||||
type: 'error',
|
||||
};
|
||||
}
|
||||
|
||||
if (executionStatus === 'canceled') {
|
||||
return {
|
||||
title: i18n.baseText('executionsList.showMessage.retryCanceled.title'),
|
||||
type: 'error',
|
||||
};
|
||||
}
|
||||
|
||||
if (executionStatus === 'error') {
|
||||
return {
|
||||
title: i18n.baseText('executionsList.showMessage.retryError.title'),
|
||||
type: 'error',
|
||||
};
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user