mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-24 20:24:05 -08:00
🐛 Apply default save manual executions (#2286)
* revert savemanualexecution changes * update toasts behavior to handle default case
This commit is contained in:
parent
7159181345
commit
e2daa523d4
|
@ -578,6 +578,7 @@ export interface IRootState {
|
||||||
pushConnectionActive: boolean;
|
pushConnectionActive: boolean;
|
||||||
saveDataErrorExecution: string;
|
saveDataErrorExecution: string;
|
||||||
saveDataSuccessExecution: string;
|
saveDataSuccessExecution: string;
|
||||||
|
saveManualExecutions: boolean;
|
||||||
timezone: string;
|
timezone: string;
|
||||||
stateIsDirty: boolean;
|
stateIsDirty: boolean;
|
||||||
executionTimeout: number;
|
executionTimeout: number;
|
||||||
|
|
|
@ -219,13 +219,15 @@ export const pushConnection = mixins(
|
||||||
const workflow = this.getWorkflow();
|
const workflow = this.getWorkflow();
|
||||||
if (runDataExecuted.waitTill !== undefined) {
|
if (runDataExecuted.waitTill !== undefined) {
|
||||||
const {
|
const {
|
||||||
isNewWorkflow,
|
|
||||||
activeExecutionId,
|
activeExecutionId,
|
||||||
|
workflowSettings,
|
||||||
saveManualExecutions,
|
saveManualExecutions,
|
||||||
} = this.$store.getters;
|
} = this.$store.getters;
|
||||||
|
|
||||||
|
const isSavingExecutions= workflowSettings.saveManualExecutions === undefined ? saveManualExecutions : workflowSettings.saveManualExecutions;
|
||||||
|
|
||||||
let action;
|
let action;
|
||||||
if (isNewWorkflow || !saveManualExecutions) {
|
if (!isSavingExecutions) {
|
||||||
action = '<a class="open-settings">Turn on saving manual executions</a> and run again to see what happened after this node.';
|
action = '<a class="open-settings">Turn on saving manual executions</a> and run again to see what happened after this node.';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -56,6 +56,7 @@ const state: IRootState = {
|
||||||
pushConnectionActive: true,
|
pushConnectionActive: true,
|
||||||
saveDataErrorExecution: 'all',
|
saveDataErrorExecution: 'all',
|
||||||
saveDataSuccessExecution: 'all',
|
saveDataSuccessExecution: 'all',
|
||||||
|
saveManualExecutions: false,
|
||||||
timezone: 'America/New_York',
|
timezone: 'America/New_York',
|
||||||
stateIsDirty: false,
|
stateIsDirty: false,
|
||||||
executionTimeout: -1,
|
executionTimeout: -1,
|
||||||
|
@ -496,6 +497,9 @@ export const store = new Vuex.Store({
|
||||||
setSaveDataSuccessExecution (state, newValue: string) {
|
setSaveDataSuccessExecution (state, newValue: string) {
|
||||||
Vue.set(state, 'saveDataSuccessExecution', newValue);
|
Vue.set(state, 'saveDataSuccessExecution', newValue);
|
||||||
},
|
},
|
||||||
|
setSaveManualExecutions (state, saveManualExecutions: boolean) {
|
||||||
|
Vue.set(state, 'saveManualExecutions', saveManualExecutions);
|
||||||
|
},
|
||||||
setTimezone (state, timezone: string) {
|
setTimezone (state, timezone: string) {
|
||||||
Vue.set(state, 'timezone', timezone);
|
Vue.set(state, 'timezone', timezone);
|
||||||
},
|
},
|
||||||
|
@ -654,8 +658,8 @@ export const store = new Vuex.Store({
|
||||||
saveDataSuccessExecution: (state): string => {
|
saveDataSuccessExecution: (state): string => {
|
||||||
return state.saveDataSuccessExecution;
|
return state.saveDataSuccessExecution;
|
||||||
},
|
},
|
||||||
saveManualExecutions: (state, getters): boolean => {
|
saveManualExecutions: (state): boolean => {
|
||||||
return !!getters.workflowSettings.saveManualExecutions;
|
return state.saveManualExecutions;
|
||||||
},
|
},
|
||||||
timezone: (state): string => {
|
timezone: (state): string => {
|
||||||
return state.timezone;
|
return state.timezone;
|
||||||
|
|
|
@ -2197,6 +2197,7 @@ export default mixins(
|
||||||
this.$store.commit('setEndpointWebhookTest', settings.endpointWebhookTest);
|
this.$store.commit('setEndpointWebhookTest', settings.endpointWebhookTest);
|
||||||
this.$store.commit('setSaveDataErrorExecution', settings.saveDataErrorExecution);
|
this.$store.commit('setSaveDataErrorExecution', settings.saveDataErrorExecution);
|
||||||
this.$store.commit('setSaveDataSuccessExecution', settings.saveDataSuccessExecution);
|
this.$store.commit('setSaveDataSuccessExecution', settings.saveDataSuccessExecution);
|
||||||
|
this.$store.commit('setSaveManualExecutions', settings.saveManualExecutions);
|
||||||
this.$store.commit('setTimezone', settings.timezone);
|
this.$store.commit('setTimezone', settings.timezone);
|
||||||
this.$store.commit('setExecutionTimeout', settings.executionTimeout);
|
this.$store.commit('setExecutionTimeout', settings.executionTimeout);
|
||||||
this.$store.commit('setMaxExecutionTimeout', settings.maxExecutionTimeout);
|
this.$store.commit('setMaxExecutionTimeout', settings.maxExecutionTimeout);
|
||||||
|
|
Loading…
Reference in a new issue