Compare commits

...

2 Commits

Author SHA1 Message Date
2c0649d297 export default config 2021-06-17 14:02:52 +03:00
fd87391383 fix apache restart monitor 2021-06-17 12:50:43 +03:00
2 changed files with 4 additions and 15 deletions

View File

@@ -6,6 +6,4 @@ if ("production" == process.env.NODE_ENV) {
config = require("@/config/test.json");
}
export default {
...config,
};
export default config;

View File

@@ -10,18 +10,17 @@ export default {
state: {
apache_need_restart: false,
restart_flag: false,
flag_sent: false,
},
mutations: {
setApacheNeedRestart(state) {
state.apache_need_restart = true;
},
setApacheRestartFlag(state, flag) {
if (state.restart_flag && !flag) {
state.apache_need_restart = false;
}
state.restart_flag = flag;
},
setApacheRestartFlagSent(state, flag) {
state.flag_sent = flag;
},
},
actions: {
async fetchApacheRestartFlag(ctx) {
@@ -30,10 +29,6 @@ export default {
ctx.commit("setApacheRestartFlag", true);
} catch (err) {
ctx.commit("setApacheRestartFlag", false);
if (ctx.getters.isApacheRestartFlagSent) {
ctx.commit("setApacheNeedRestart", false);
ctx.commit("setApacheRestartFlagSent", false);
}
}
},
async updateApacheRestartFlag(ctx) {
@@ -46,7 +41,6 @@ export default {
try {
await axios.put(`${api_base}/apache-restart`);
ctx.commit("setApacheRestartFlag", true);
ctx.commit("setApacheRestartFlagSent", true);
} catch (err) {
pass();
}
@@ -59,8 +53,5 @@ export default {
isApacheRestartPending(state) {
return state.restart_flag;
},
isApacheRestartFlagSent(state) {
return state.flag_sent;
},
},
};