summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/store/modules/Control/ControlStore.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/store/modules/Control/ControlStore.js b/src/store/modules/Control/ControlStore.js
index f27f5a69..82dbdcc1 100644
--- a/src/store/modules/Control/ControlStore.js
+++ b/src/store/modules/Control/ControlStore.js
@@ -85,36 +85,40 @@ const ControlStore = {
dispatch('hostPowerChange', data);
await checkForHostStatus.bind(this, 'on')();
commit('setOperationInProgress', false);
+ dispatch('getLastPowerOperationTime');
},
async hostSoftReboot({ dispatch, commit }) {
const data = { ResetType: 'GracefulRestart' };
dispatch('hostPowerChange', data);
await checkForHostStatus.bind(this, 'on')();
commit('setOperationInProgress', false);
+ dispatch('getLastPowerOperationTime');
},
async hostHardReboot({ dispatch, commit }) {
const data = { ResetType: 'ForceRestart' };
dispatch('hostPowerChange', data);
await checkForHostStatus.bind(this, 'on')();
commit('setOperationInProgress', false);
+ dispatch('getLastPowerOperationTime');
},
async hostSoftPowerOff({ dispatch, commit }) {
const data = { ResetType: 'GracefulShutdown' };
dispatch('hostPowerChange', data);
await checkForHostStatus.bind(this, 'off')();
commit('setOperationInProgress', false);
+ dispatch('getLastPowerOperationTime');
},
async hostHardPowerOff({ dispatch, commit }) {
const data = { ResetType: 'ForceOff' };
dispatch('hostPowerChange', data);
await checkForHostStatus.bind(this, 'off')();
commit('setOperationInProgress', false);
+ dispatch('getLastPowerOperationTime');
},
- hostPowerChange({ commit, dispatch }, data) {
+ hostPowerChange({ commit }, data) {
commit('setOperationInProgress', true);
api
.post('/redfish/v1/Systems/system/Actions/ComputerSystem.Reset', data)
- .then(() => dispatch('getLastPowerOperationTime'))
.catch(error => {
console.log(error);
commit('setOperationInProgress', false);