Profile settings page
-To set the profile by setting password.
-This commit adds a profile page which allows the user to change their
password.
In the future, the profile page will also contain user settings like
language and timezone.
The API called to change the user's
password is '/redfish/v1/AccountService/Accounts/<userName>'
Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com>
Change-Id: Ie54a54beff8c85bc9ac5af21c35edc481b34cf44
diff --git a/src/store/modules/GlobalStore.js b/src/store/modules/GlobalStore.js
index 42e9e2b..55b0796 100644
--- a/src/store/modules/GlobalStore.js
+++ b/src/store/modules/GlobalStore.js
@@ -31,19 +31,22 @@
state: {
bmcTime: null,
hostStatus: 'unreachable',
- languagePreference: localStorage.getItem('storedLanguage') || 'en-US'
+ languagePreference: localStorage.getItem('storedLanguage') || 'en-US',
+ username: localStorage.getItem('storedUsername')
},
getters: {
hostStatus: state => state.hostStatus,
bmcTime: state => state.bmcTime,
- languagePreference: state => state.languagePreference
+ languagePreference: state => state.languagePreference,
+ username: state => state.username
},
mutations: {
setBmcTime: (state, bmcTime) => (state.bmcTime = bmcTime),
setHostStatus: (state, hostState) =>
(state.hostStatus = hostStateMapper(hostState)),
setLanguagePreference: (state, language) =>
- (state.languagePreference = language)
+ (state.languagePreference = language),
+ setUsername: (state, username) => (state.username = username)
},
actions: {
async getBmcTime({ commit }) {