Compare commits
2 Commits
daadee9190
...
2c0649d297
Author | SHA1 | Date | |
---|---|---|---|
2c0649d297
|
|||
fd87391383
|
@@ -6,6 +6,4 @@ if ("production" == process.env.NODE_ENV) {
|
|||||||
config = require("@/config/test.json");
|
config = require("@/config/test.json");
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default config;
|
||||||
...config,
|
|
||||||
};
|
|
||||||
|
@@ -10,18 +10,17 @@ export default {
|
|||||||
state: {
|
state: {
|
||||||
apache_need_restart: false,
|
apache_need_restart: false,
|
||||||
restart_flag: false,
|
restart_flag: false,
|
||||||
flag_sent: false,
|
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
setApacheNeedRestart(state) {
|
setApacheNeedRestart(state) {
|
||||||
state.apache_need_restart = true;
|
state.apache_need_restart = true;
|
||||||
},
|
},
|
||||||
setApacheRestartFlag(state, flag) {
|
setApacheRestartFlag(state, flag) {
|
||||||
|
if (state.restart_flag && !flag) {
|
||||||
|
state.apache_need_restart = false;
|
||||||
|
}
|
||||||
state.restart_flag = flag;
|
state.restart_flag = flag;
|
||||||
},
|
},
|
||||||
setApacheRestartFlagSent(state, flag) {
|
|
||||||
state.flag_sent = flag;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
async fetchApacheRestartFlag(ctx) {
|
async fetchApacheRestartFlag(ctx) {
|
||||||
@@ -30,10 +29,6 @@ export default {
|
|||||||
ctx.commit("setApacheRestartFlag", true);
|
ctx.commit("setApacheRestartFlag", true);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
ctx.commit("setApacheRestartFlag", false);
|
ctx.commit("setApacheRestartFlag", false);
|
||||||
if (ctx.getters.isApacheRestartFlagSent) {
|
|
||||||
ctx.commit("setApacheNeedRestart", false);
|
|
||||||
ctx.commit("setApacheRestartFlagSent", false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async updateApacheRestartFlag(ctx) {
|
async updateApacheRestartFlag(ctx) {
|
||||||
@@ -46,7 +41,6 @@ export default {
|
|||||||
try {
|
try {
|
||||||
await axios.put(`${api_base}/apache-restart`);
|
await axios.put(`${api_base}/apache-restart`);
|
||||||
ctx.commit("setApacheRestartFlag", true);
|
ctx.commit("setApacheRestartFlag", true);
|
||||||
ctx.commit("setApacheRestartFlagSent", true);
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
pass();
|
pass();
|
||||||
}
|
}
|
||||||
@@ -59,8 +53,5 @@ export default {
|
|||||||
isApacheRestartPending(state) {
|
isApacheRestartPending(state) {
|
||||||
return state.restart_flag;
|
return state.restart_flag;
|
||||||
},
|
},
|
||||||
isApacheRestartFlagSent(state) {
|
|
||||||
return state.flag_sent;
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user