fix(editor): Fix for loading executions that are not on the current executions list (#5035)

* fix(editor): fixed executions list scroll not working on large screens
*  Use limit to only load necessary number of additional executions
* 🐛 Fixing loading execution that is not on the current execution list
* ✔️ Fixing lint error
*  Fixing more executions count logic
* 📚 Updating comments
* 🔥 Removing leftover `console.log`
This commit is contained in:
Milorad FIlipović
2022-12-27 14:51:48 +01:00
committed by GitHub
parent d113977b10
commit d0865e28ff
5 changed files with 79 additions and 10 deletions

View File

@@ -46,6 +46,7 @@ import { useRootStore } from './n8nRootStore';
import {
getActiveWorkflows,
getCurrentExecutions,
getExecutionData,
getFinishedExecutions,
getNewWorkflow,
getWorkflows,
@@ -941,6 +942,10 @@ export const useWorkflowsStore = defineStore(STORES.WORKFLOWS, {
throw error;
}
},
async fetchExecutionDataById(executionId: string): Promise<IExecutionResponse | null> {
const rootStore = useRootStore();
return await getExecutionData(rootStore.getRestApiContext, executionId);
},
deleteExecution(execution: IExecutionsSummary): void {
this.currentWorkflowExecutions.splice(this.currentWorkflowExecutions.indexOf(execution), 1);
},