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/Operations/ServerPowerOperations/ServerPowerOperations.vue b/src/views/Operations/ServerPowerOperations/ServerPowerOperations.vue
index 4e26ee1..caa608e 100644
--- a/src/views/Operations/ServerPowerOperations/ServerPowerOperations.vue
+++ b/src/views/Operations/ServerPowerOperations/ServerPowerOperations.vue
@@ -44,8 +44,8 @@
                   v-if="lastPowerOperationTime"
                   data-test-id="powerServerOps-text-lastPowerOp"
                 >
-                  {{ lastPowerOperationTime }}
-                  {{ lastPowerOperationTime }}
+                  {{ $filters.formatDate(lastPowerOperationTime) }}
+                  {{ $filters.formatTime(lastPowerOperationTime) }}
                 </dd>
                 <dd v-else>--</dd>
               </dl>
@@ -158,6 +158,8 @@
 import BootSettings from './BootSettings';
 import LoadingBarMixin from '@/components/Mixins/LoadingBarMixin';
 import Alert from '@/components/Global/Alert';
+import { useI18n } from 'vue-i18n';
+import i18n from '@/i18n';
 
 export default {
   name: 'ServerPowerOperations',
@@ -169,6 +171,7 @@
   },
   data() {
     return {
+      $t: useI18n().t,
       form: {
         rebootOption: 'orderly',
         shutdownOption: 'orderly',
@@ -212,13 +215,15 @@
       this.$store.dispatch('controls/serverPowerOn');
     },
     rebootServer() {
-      const modalMessage = this.$t(
+      const modalMessage = i18n.global.t(
         'pageServerPowerOperations.modal.confirmRebootMessage',
       );
       const modalOptions = {
-        title: this.$t('pageServerPowerOperations.modal.confirmRebootTitle'),
-        okTitle: this.$t('global.action.confirm'),
-        cancelTitle: this.$t('global.action.cancel'),
+        title: i18n.global.t(
+          'pageServerPowerOperations.modal.confirmRebootTitle',
+        ),
+        okTitle: i18n.global.t('global.action.confirm'),
+        cancelTitle: i18n.global.t('global.action.cancel'),
         autoFocusButton: 'ok',
       };
 
@@ -237,13 +242,15 @@
       }
     },
     shutdownServer() {
-      const modalMessage = this.$t(
+      const modalMessage = i18n.global.t(
         'pageServerPowerOperations.modal.confirmShutdownMessage',
       );
       const modalOptions = {
-        title: this.$t('pageServerPowerOperations.modal.confirmShutdownTitle'),
-        okTitle: this.$t('global.action.confirm'),
-        cancelTitle: this.$t('global.action.cancel'),
+        title: i18n.global.t(
+          'pageServerPowerOperations.modal.confirmShutdownTitle',
+        ),
+        okTitle: i18n.global.t('global.action.confirm'),
+        cancelTitle: i18n.global.t('global.action.cancel'),
         autoFocusButton: 'ok',
       };