summaryrefslogtreecommitdiff
path: root/src/views/ProfileSettings/ProfileSettings.vue
diff options
context:
space:
mode:
authorSukanya Pandey <sukapan1@in.ibm.com>2020-07-10 16:21:58 +0300
committerGunnar Mills <gmills@us.ibm.com>2020-07-17 04:06:48 +0300
commitb93608db49fa40f4e7ad742e4aa285d106caf117 (patch)
treeddfc05e4826cb86481a6a49214b86fc938a46f40 /src/views/ProfileSettings/ProfileSettings.vue
parentd83b2c012f8f2a2f5e068d82f708c503e749c6d5 (diff)
downloadwebui-vue-b93608db49fa40f4e7ad742e4aa285d106caf117.tar.xz
Add min and max password range in profile settings
-Api used to get the min and max value is redfish/v1/AccountService. Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com> Change-Id: I0f211496bef85aefe843052a6b6ba72156d2e4c7
Diffstat (limited to 'src/views/ProfileSettings/ProfileSettings.vue')
-rw-r--r--src/views/ProfileSettings/ProfileSettings.vue34
1 files changed, 20 insertions, 14 deletions
diff --git a/src/views/ProfileSettings/ProfileSettings.vue b/src/views/ProfileSettings/ProfileSettings.vue
index df74b4b7..32278b24 100644
--- a/src/views/ProfileSettings/ProfileSettings.vue
+++ b/src/views/ProfileSettings/ProfileSettings.vue
@@ -95,10 +95,7 @@
</template>
<script>
-import PageTitle from '@/components/Global/PageTitle';
-import PageSection from '@/components/Global/PageSection';
import BVToastMixin from '@/components/Mixins/BVToastMixin';
-import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js';
import InputPasswordToggle from '@/components/Global/InputPasswordToggle';
import {
maxLength,
@@ -106,23 +103,37 @@ import {
required,
sameAs
} from 'vuelidate/lib/validators';
+import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin';
+import PageTitle from '@/components/Global/PageTitle';
+import PageSection from '@/components/Global/PageSection';
+import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js';
export default {
name: 'ProfileSettings',
- components: { PageTitle, PageSection, InputPasswordToggle },
- mixins: [BVToastMixin, VuelidateMixin],
+ components: { InputPasswordToggle, PageSection, PageTitle },
+ mixins: [BVToastMixin, LoadingBarMixin, VuelidateMixin],
data() {
return {
- passwordRequirements: {
- minLength: 8,
- maxLength: 20
- },
form: {
newPassword: '',
confirmPassword: ''
}
};
},
+ computed: {
+ username() {
+ return this.$store.getters['global/username'];
+ },
+ passwordRequirements() {
+ return this.$store.getters['localUsers/accountPasswordRequirements'];
+ }
+ },
+ created() {
+ this.startLoader();
+ this.$store
+ .dispatch('localUsers/getAccountSettings')
+ .finally(() => this.endLoader());
+ },
validations() {
return {
form: {
@@ -138,11 +149,6 @@ export default {
}
};
},
- computed: {
- username() {
- return this.$store.getters['global/username'];
- }
- },
methods: {
submitForm() {
this.$v.$touch();