Vuelidate, I18n, and filter are upgraded to vue3
While navigating to the pages i18n, vuelidate, and filters errors
occurred. i18n, and vuelidate code changes in each page adapted to
vue3. Filter global function for date and time format implemented
in the main.js file and those files which as called the filter
functions.
Change-Id: If1a2ee22d47750faef1c35ef2c263299067d9a20
Signed-off-by: Surya Venkatesan <suryav@ami.com>
diff --git a/src/views/Logs/Dumps/DumpsForm.vue b/src/views/Logs/Dumps/DumpsForm.vue
index 40cea7e..7da3084 100644
--- a/src/views/Logs/Dumps/DumpsForm.vue
+++ b/src/views/Logs/Dumps/DumpsForm.vue
@@ -9,7 +9,7 @@
id="selectDumpType"
v-model="selectedDumpType"
:options="dumpTypeOptions"
- :state="getValidationState($v.selectedDumpType)"
+ :state="getValidationState(v$.selectedDumpType)"
>
<template #first>
<b-form-select-option :value="null" disabled>
@@ -39,6 +39,7 @@
import Alert from '@/components/Global/Alert';
import BVToastMixin from '@/components/Mixins/BVToastMixin';
import VuelidateMixin from '@/components/Mixins/VuelidateMixin.js';
+import i18n from '@/i18n';
export default {
components: { Alert, ModalConfirmation },
@@ -52,8 +53,8 @@
return {
selectedDumpType: null,
dumpTypeOptions: [
- { value: 'bmc', text: this.$t('pageDumps.form.bmcDump') },
- { value: 'system', text: this.$t('pageDumps.form.systemDump') },
+ { value: 'bmc', text: i18n.global.t('pageDumps.form.bmcDump') },
+ { value: 'system', text: i18n.global.t('pageDumps.form.systemDump') },
],
};
},
@@ -64,8 +65,8 @@
},
methods: {
handleSubmit() {
- this.$v.$touch();
- if (this.$v.$invalid) return;
+ this.v$.$touch();
+ if (this.v$.$invalid) return;
// System dump initiation
if (this.selectedDumpType === 'system') {
@@ -76,10 +77,15 @@
this.$store
.dispatch('dumps/createBmcDump')
.then(() =>
- this.infoToast(this.$t('pageDumps.toast.successStartBmcDump'), {
- title: this.$t('pageDumps.toast.successStartBmcDumpTitle'),
- timestamp: true,
- }),
+ this.infoToast(
+ i18n.global.t('pageDumps.toast.successStartBmcDump'),
+ {
+ title: i18n.global.t(
+ 'pageDumps.toast.successStartBmcDumpTitle',
+ ),
+ timestamp: true,
+ },
+ ),
)
.catch(({ message }) => this.errorToast(message));
}
@@ -91,10 +97,15 @@
this.$store
.dispatch('dumps/createSystemDump')
.then(() =>
- this.infoToast(this.$t('pageDumps.toast.successStartSystemDump'), {
- title: this.$t('pageDumps.toast.successStartSystemDumpTitle'),
- timestamp: true,
- }),
+ this.infoToast(
+ i18n.global.t('pageDumps.toast.successStartSystemDump'),
+ {
+ title: i18n.global.t(
+ 'pageDumps.toast.successStartSystemDumpTitle',
+ ),
+ timestamp: true,
+ },
+ ),
)
.catch(({ message }) => this.errorToast(message));
},