From f92e29696d0f01c7fa1941829cb131a708f88393 Mon Sep 17 00:00:00 2001
From: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Date: Tue, 9 Feb 2021 12:41:53 -0800
Subject: Add enhancements to BVToastMixin

Adds ability to create toasts with multi-lined body content and
options to include a timestamp and application refresh action.

Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: I30b1da04a0e0b5f29a419950462d1ca35e207552
---
 src/views/Configuration/Firmware/Firmware.vue | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

(limited to 'src/views/Configuration/Firmware/Firmware.vue')

diff --git a/src/views/Configuration/Firmware/Firmware.vue b/src/views/Configuration/Firmware/Firmware.vue
index 0e162069..5001702a 100644
--- a/src/views/Configuration/Firmware/Firmware.vue
+++ b/src/views/Configuration/Firmware/Firmware.vue
@@ -282,7 +282,7 @@ export default {
       this.setRebootTimeout(360000); //6 minute timeout
       this.infoToast(
         this.$t('pageFirmware.toast.infoUploadStartTimeMessage', { startTime }),
-        this.$t('pageFirmware.toast.infoUploadStartTimeTitle')
+        { title: this.$t('pageFirmware.toast.infoUploadStartTimeTitle') }
       );
       if (this.isWorkstationSelected) {
         this.dispatchWorkstationUpload();
@@ -294,10 +294,9 @@ export default {
       this.$store
         .dispatch('firmware/uploadFirmware', this.file)
         .then((success) =>
-          this.infoToast(
-            success,
-            this.$t('pageFirmware.toast.successUploadTitle')
-          )
+          this.infoToast(success, {
+            title: this.$t('pageFirmware.toast.successUploadTitle'),
+          })
         )
         .catch(({ message }) => {
           this.errorToast(message);
@@ -312,10 +311,9 @@ export default {
       this.$store
         .dispatch('firmware/uploadFirmwareTFTP', data)
         .then((success) =>
-          this.infoToast(
-            success,
-            this.$t('pageFirmware.toast.successUploadTitle')
-          )
+          this.infoToast(success, {
+            title: this.$t('pageFirmware.toast.successUploadTitle'),
+          })
         )
         .catch(({ message }) => {
           this.errorToast(message);
@@ -327,7 +325,7 @@ export default {
       this.$store
         .dispatch('firmware/switchBmcFirmware')
         .then((success) =>
-          this.infoToast(success, this.$t('global.status.success'))
+          this.infoToast(success, { title: this.$t('global.status.success') })
         )
         .catch(({ message }) => {
           this.errorToast(message);
@@ -342,7 +340,10 @@ export default {
         this.endLoader();
         this.infoToast(
           this.$t('pageFirmware.toast.infoRefreshApplicationMessage'),
-          this.$t('pageFirmware.toast.infoRefreshApplicationTitle')
+          {
+            title: this.$t('pageFirmware.toast.infoRefreshApplicationTitle'),
+            refreshAction: true,
+          }
         );
       }, timeoutMs);
     },
-- 
cgit v1.2.3

