mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
fix(editor): Show correct status on canceled executions (#5813)
Co-authored-by: Milorad Filipovic <milorad@n8n.io>
This commit is contained in:
parent
41cdee7bc7
commit
d0788ee8e1
|
@ -74,6 +74,7 @@ const vModel = reactive(
|
|||
const statuses = computed(() => [
|
||||
{ id: 'all', name: locale.baseText('executionsList.anyStatus') },
|
||||
{ id: 'error', name: locale.baseText('executionsList.error') },
|
||||
{ id: 'canceled', name: locale.baseText('executionsList.canceled') },
|
||||
{ id: 'running', name: locale.baseText('executionsList.running') },
|
||||
{ id: 'success', name: locale.baseText('executionsList.success') },
|
||||
{ id: 'waiting', name: locale.baseText('executionsList.waiting') },
|
||||
|
|
|
@ -779,6 +779,8 @@ export default mixins(externalHooks, genericHelpers, executionHelpers, restApi,
|
|||
|
||||
if (status === 'waiting') {
|
||||
text = this.$locale.baseText('executionsList.waiting');
|
||||
} else if (status === 'canceled') {
|
||||
text = this.$locale.baseText('executionsList.canceled');
|
||||
} else if (status === 'crashed') {
|
||||
text = this.$locale.baseText('executionsList.error');
|
||||
} else if (status === 'new') {
|
||||
|
@ -801,6 +803,8 @@ export default mixins(externalHooks, genericHelpers, executionHelpers, restApi,
|
|||
|
||||
if (status === 'waiting') {
|
||||
path = 'executionsList.statusWaiting';
|
||||
} else if (status === 'canceled') {
|
||||
path = 'executionsList.statusCanceled';
|
||||
} else if (status === 'crashed') {
|
||||
path = 'executionsList.statusText';
|
||||
} else if (status === 'new') {
|
||||
|
|
|
@ -38,9 +38,7 @@
|
|||
<execution-time :start-time="execution.startedAt" />
|
||||
</n8n-text>
|
||||
<n8n-text
|
||||
v-else-if="
|
||||
executionUIDetails.name !== 'waiting' && executionUIDetails.name !== 'unknown'
|
||||
"
|
||||
v-else-if="executionUIDetails.runningTime !== ''"
|
||||
:color="isActive ? 'text-dark' : 'text-base'"
|
||||
size="small"
|
||||
>
|
||||
|
|
|
@ -50,34 +50,26 @@ export const executionHelpers = mixins(genericHelpers).extend({
|
|||
) {
|
||||
status.name = 'running';
|
||||
status.label = this.$locale.baseText('executionsList.running');
|
||||
if (execution.startedAt) {
|
||||
status.runningTime = this.displayTimer(
|
||||
new Date().getTime() - new Date(execution.startedAt).getTime(),
|
||||
true,
|
||||
);
|
||||
}
|
||||
} else if (execution.status === 'success' || execution.finished) {
|
||||
status.name = 'success';
|
||||
status.label = this.$locale.baseText('executionsList.succeeded');
|
||||
if (execution.stoppedAt) {
|
||||
status.runningTime = this.displayTimer(
|
||||
new Date(execution.stoppedAt).getTime() - new Date(execution.startedAt).getTime(),
|
||||
true,
|
||||
);
|
||||
}
|
||||
} else if (
|
||||
execution.status === 'failed' ||
|
||||
execution.status === 'crashed' ||
|
||||
execution.stoppedAt !== null
|
||||
) {
|
||||
} else if (execution.status === 'failed' || execution.status === 'crashed') {
|
||||
status.name = 'error';
|
||||
status.label = this.$locale.baseText('executionsList.error');
|
||||
if (execution.stoppedAt) {
|
||||
status.runningTime = this.displayTimer(
|
||||
new Date(execution.stoppedAt).getTime() - new Date(execution.startedAt).getTime(),
|
||||
true,
|
||||
);
|
||||
}
|
||||
} else if (execution.status === 'canceled') {
|
||||
status.label = this.$locale.baseText('executionsList.canceled');
|
||||
}
|
||||
|
||||
if (!execution.status) execution.status = 'unknown';
|
||||
|
||||
if (execution.startedAt && execution.stoppedAt) {
|
||||
const stoppedAt = execution.stoppedAt
|
||||
? new Date(execution.stoppedAt).getTime()
|
||||
: Date.now();
|
||||
status.runningTime = this.displayTimer(
|
||||
stoppedAt - new Date(execution.startedAt).getTime(),
|
||||
true,
|
||||
);
|
||||
}
|
||||
|
||||
return status;
|
||||
|
|
|
@ -451,6 +451,7 @@
|
|||
"executionsList.allWorkflows": "All Workflows",
|
||||
"executionsList.anyStatus": "Any Status",
|
||||
"executionsList.autoRefresh": "Auto refresh",
|
||||
"executionsList.canceled": "Canceled",
|
||||
"executionsList.confirmMessage.cancelButtonText": "",
|
||||
"executionsList.confirmMessage.confirmButtonText": "Yes, delete",
|
||||
"executionsList.confirmMessage.headline": "Delete Executions?",
|
||||
|
@ -496,6 +497,7 @@
|
|||
"executionsList.started": "{date} at {time}",
|
||||
"executionsList.id": "Execution ID",
|
||||
"executionsList.status": "Status",
|
||||
"executionsList.statusCanceled": "Canceled",
|
||||
"executionsList.statusText": "{status} in {time}",
|
||||
"executionsList.statusRunning": "{status} for {time}",
|
||||
"executionsList.statusWaiting": "{status} until {time}",
|
||||
|
|
Loading…
Reference in a new issue