mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-02 07:01:30 -08:00
fix(editor): Remove filter that prevented showing running executions (#4470)
⚡ Removed filter that stopped showing running executions if workflow is not saving manual executions
This commit is contained in:
parent
ca60b0e203
commit
658e886861
|
@ -74,11 +74,6 @@ export default mixins(restApi, showMessage, executionHelpers, debounceHelper, wo
|
||||||
totalFinishedExecutionsCount(): number {
|
totalFinishedExecutionsCount(): number {
|
||||||
return this.$store.getters['workflows/getTotalFinishedExecutionsCount'];
|
return this.$store.getters['workflows/getTotalFinishedExecutionsCount'];
|
||||||
},
|
},
|
||||||
isWorkflowSavingManualExecutions(): boolean {
|
|
||||||
const workflowSettings: IWorkflowSettings = this.$store.getters.workflowSettings;
|
|
||||||
const saveManualExecutionsDefault = this.$store.getters.saveManualExecutions;
|
|
||||||
return workflowSettings.saveManualExecutions === undefined ? saveManualExecutionsDefault: workflowSettings.saveManualExecutions as boolean;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
$route (to: Route, from: Route) {
|
$route (to: Route, from: Route) {
|
||||||
|
@ -292,6 +287,14 @@ export default mixins(restApi, showMessage, executionHelpers, debounceHelper, wo
|
||||||
this.$store.commit('workflows/setCurrentWorkflowExecutions', existingExecutions);
|
this.$store.commit('workflows/setCurrentWorkflowExecutions', existingExecutions);
|
||||||
if (updatedActiveExecution !== null) {
|
if (updatedActiveExecution !== null) {
|
||||||
this.$store.commit('workflows/setActiveWorkflowExecution', updatedActiveExecution);
|
this.$store.commit('workflows/setActiveWorkflowExecution', updatedActiveExecution);
|
||||||
|
} else {
|
||||||
|
const activeNotInTheList = existingExecutions.find(ex => ex.id === this.activeExecution.id) === undefined;
|
||||||
|
if (activeNotInTheList) {
|
||||||
|
this.$router.push({
|
||||||
|
name: VIEWS.EXECUTION_PREVIEW,
|
||||||
|
params: { name: this.currentWorkflow, executionId: this.executions[0].id },
|
||||||
|
}).catch(()=>{});;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async loadExecutions(): Promise<IExecutionsSummary[]> {
|
async loadExecutions(): Promise<IExecutionsSummary[]> {
|
||||||
|
@ -301,11 +304,6 @@ export default mixins(restApi, showMessage, executionHelpers, debounceHelper, wo
|
||||||
try {
|
try {
|
||||||
const executions: IExecutionsSummary[] =
|
const executions: IExecutionsSummary[] =
|
||||||
await this.$store.dispatch('workflows/loadCurrentWorkflowExecutions', this.filter);
|
await this.$store.dispatch('workflows/loadCurrentWorkflowExecutions', this.filter);
|
||||||
|
|
||||||
// Don't show running manual executions if workflow is set up not to save them
|
|
||||||
if (!this.isWorkflowSavingManualExecutions) {
|
|
||||||
return executions.filter(ex => ex.finished === true || ex.mode !== 'manual');
|
|
||||||
}
|
|
||||||
return executions;
|
return executions;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$showError(
|
this.$showError(
|
||||||
|
|
Loading…
Reference in a new issue