mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
fix(editor): Fix for wrong execution data displayed in executions preview (#4966)
This commit is contained in:
parent
5cbb5f4bc8
commit
bfc8e68b37
|
@ -611,6 +611,7 @@ export default mixins(externalHooks, genericHelpers, restApi, showMessage).exten
|
||||||
}
|
}
|
||||||
|
|
||||||
this.workflowsStore.activeExecutions = activeExecutions;
|
this.workflowsStore.activeExecutions = activeExecutions;
|
||||||
|
this.workflowsStore.addToCurrentExecutions(activeExecutions);
|
||||||
},
|
},
|
||||||
async loadAutoRefresh(): Promise<void> {
|
async loadAutoRefresh(): Promise<void> {
|
||||||
const filter = this.workflowFilterPast;
|
const filter = this.workflowFilterPast;
|
||||||
|
@ -697,6 +698,7 @@ export default mixins(externalHooks, genericHelpers, restApi, showMessage).exten
|
||||||
);
|
);
|
||||||
this.finishedExecutionsCount = results[0].count;
|
this.finishedExecutionsCount = results[0].count;
|
||||||
this.finishedExecutionsCountEstimated = results[0].estimated;
|
this.finishedExecutionsCountEstimated = results[0].estimated;
|
||||||
|
this.workflowsStore.addToCurrentExecutions(this.finishedExecutions);
|
||||||
},
|
},
|
||||||
async loadFinishedExecutions(): Promise<void> {
|
async loadFinishedExecutions(): Promise<void> {
|
||||||
if (this.filter.status === 'running') {
|
if (this.filter.status === 'running') {
|
||||||
|
@ -712,6 +714,8 @@ export default mixins(externalHooks, genericHelpers, restApi, showMessage).exten
|
||||||
this.finishedExecutions = data.results;
|
this.finishedExecutions = data.results;
|
||||||
this.finishedExecutionsCount = data.count;
|
this.finishedExecutionsCount = data.count;
|
||||||
this.finishedExecutionsCountEstimated = data.estimated;
|
this.finishedExecutionsCountEstimated = data.estimated;
|
||||||
|
|
||||||
|
this.workflowsStore.addToCurrentExecutions(data.results);
|
||||||
},
|
},
|
||||||
async loadMore() {
|
async loadMore() {
|
||||||
if (this.filter.status === 'running') {
|
if (this.filter.status === 'running') {
|
||||||
|
@ -747,6 +751,8 @@ export default mixins(externalHooks, genericHelpers, restApi, showMessage).exten
|
||||||
this.finishedExecutionsCountEstimated = data.estimated;
|
this.finishedExecutionsCountEstimated = data.estimated;
|
||||||
|
|
||||||
this.isDataLoading = false;
|
this.isDataLoading = false;
|
||||||
|
|
||||||
|
this.workflowsStore.addToCurrentExecutions(data.results);
|
||||||
},
|
},
|
||||||
async loadWorkflows() {
|
async loadWorkflows() {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -944,5 +944,13 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
|
||||||
deleteExecution(execution: IExecutionsSummary): void {
|
deleteExecution(execution: IExecutionsSummary): void {
|
||||||
this.currentWorkflowExecutions.splice(this.currentWorkflowExecutions.indexOf(execution), 1);
|
this.currentWorkflowExecutions.splice(this.currentWorkflowExecutions.indexOf(execution), 1);
|
||||||
},
|
},
|
||||||
|
addToCurrentExecutions(executions: IExecutionsSummary[]): void {
|
||||||
|
executions.forEach(execution => {
|
||||||
|
const exists = this.currentWorkflowExecutions.find(ex => ex.id === execution.id);
|
||||||
|
if (!exists) {
|
||||||
|
this.currentWorkflowExecutions.push(execution);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue