From 1a814b9f104927ae0b54699fb0c5a1b731903058 Mon Sep 17 00:00:00 2001 From: Surya Venkatesan Date: Mon, 23 Sep 2024 16:29:01 +0530 Subject: LDAP and server power operation page fix In LDAP loading declare outside the form, form validation condition change, server power operation page validation added and i18n method changed in the event log store. Change-Id: I903b4dec7da1a5a2cc8441c65693c57201405d70 Signed-off-by: Surya Venkatesan --- src/store/modules/Logs/EventLogStore.js | 2 +- src/views/Operations/ServerPowerOperations/BootSettings.vue | 6 ++++++ src/views/SecurityAndAccess/Ldap/Ldap.vue | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/store/modules/Logs/EventLogStore.js b/src/store/modules/Logs/EventLogStore.js index 3de31aec..360fbf5d 100644 --- a/src/store/modules/Logs/EventLogStore.js +++ b/src/store/modules/Logs/EventLogStore.js @@ -240,7 +240,7 @@ const EventLogStore = { .catch((error) => { console.log(error); throw new Error( - i18n.t('pageEventLogs.toast.errorDownloadEventEntry'), + i18n.global.t('pageEventLogs.toast.errorDownloadEventEntry'), ); }); }, diff --git a/src/views/Operations/ServerPowerOperations/BootSettings.vue b/src/views/Operations/ServerPowerOperations/BootSettings.vue index a7bcfaa9..48ce71c6 100644 --- a/src/views/Operations/ServerPowerOperations/BootSettings.vue +++ b/src/views/Operations/ServerPowerOperations/BootSettings.vue @@ -54,10 +54,16 @@ import { mapState } from 'vuex'; import BVToastMixin from '@/components/Mixins/BVToastMixin'; import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin'; import { useI18n } from 'vue-i18n'; +import { useVuelidate } from '@vuelidate/core'; export default { name: 'BootSettings', mixins: [BVToastMixin, LoadingBarMixin], + setup() { + return { + v$: useVuelidate(), + }; + }, data() { return { $t: useI18n().t, diff --git a/src/views/SecurityAndAccess/Ldap/Ldap.vue b/src/views/SecurityAndAccess/Ldap/Ldap.vue index eab2737f..6de491a6 100644 --- a/src/views/SecurityAndAccess/Ldap/Ldap.vue +++ b/src/views/SecurityAndAccess/Ldap/Ldap.vue @@ -278,8 +278,8 @@ export default { baseDn: '', userIdAttribute: '', groupIdAttribute: '', - loading, }, + loading, }; }, computed: { @@ -390,8 +390,8 @@ export default { this.form.groupIdAttribute = groupsAttribute; }, handleSubmit() { - this.v$.$touch(); - if (this.v$.$invalid) return; + this.v$.form.$touch(); + if (this.v$.form.$invalid) return; const data = { serviceEnabled: this.form.ldapAuthenticationEnabled, activeDirectoryEnabled: this.form.activeDirectoryEnabled, -- cgit v1.2.3