🐛 Apply default save manual executions (#2286)

* revert savemanualexecution changes

* update toasts behavior to handle default case
This commit is contained in:
Mutasem Aldmour 2021-10-06 19:13:39 +02:00 committed by GitHub
parent 7159181345
commit e2daa523d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 4 deletions

View file

@ -578,6 +578,7 @@ export interface IRootState {
pushConnectionActive: boolean;
saveDataErrorExecution: string;
saveDataSuccessExecution: string;
saveManualExecutions: boolean;
timezone: string;
stateIsDirty: boolean;
executionTimeout: number;

View file

@ -219,13 +219,15 @@ export const pushConnection = mixins(
const workflow = this.getWorkflow();
if (runDataExecuted.waitTill !== undefined) {
const {
isNewWorkflow,
activeExecutionId,
workflowSettings,
saveManualExecutions,
} = this.$store.getters;
const isSavingExecutions= workflowSettings.saveManualExecutions === undefined ? saveManualExecutions : workflowSettings.saveManualExecutions;
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.';
}
else {

View file

@ -56,6 +56,7 @@ const state: IRootState = {
pushConnectionActive: true,
saveDataErrorExecution: 'all',
saveDataSuccessExecution: 'all',
saveManualExecutions: false,
timezone: 'America/New_York',
stateIsDirty: false,
executionTimeout: -1,
@ -496,6 +497,9 @@ export const store = new Vuex.Store({
setSaveDataSuccessExecution (state, newValue: string) {
Vue.set(state, 'saveDataSuccessExecution', newValue);
},
setSaveManualExecutions (state, saveManualExecutions: boolean) {
Vue.set(state, 'saveManualExecutions', saveManualExecutions);
},
setTimezone (state, timezone: string) {
Vue.set(state, 'timezone', timezone);
},
@ -654,8 +658,8 @@ export const store = new Vuex.Store({
saveDataSuccessExecution: (state): string => {
return state.saveDataSuccessExecution;
},
saveManualExecutions: (state, getters): boolean => {
return !!getters.workflowSettings.saveManualExecutions;
saveManualExecutions: (state): boolean => {
return state.saveManualExecutions;
},
timezone: (state): string => {
return state.timezone;

View file

@ -2197,6 +2197,7 @@ export default mixins(
this.$store.commit('setEndpointWebhookTest', settings.endpointWebhookTest);
this.$store.commit('setSaveDataErrorExecution', settings.saveDataErrorExecution);
this.$store.commit('setSaveDataSuccessExecution', settings.saveDataSuccessExecution);
this.$store.commit('setSaveManualExecutions', settings.saveManualExecutions);
this.$store.commit('setTimezone', settings.timezone);
this.$store.commit('setExecutionTimeout', settings.executionTimeout);
this.$store.commit('setMaxExecutionTimeout', settings.maxExecutionTimeout);