summaryrefslogtreecommitdiff
path: root/src/views/Configuration/Firmware/Firmware.vue
diff options
context:
space:
mode:
authorYoshie Muranaka <yoshiemuranaka@gmail.com>2021-02-09 23:41:53 +0300
committerYoshie Muranaka <yoshiemuranaka@gmail.com>2021-02-16 20:31:36 +0300
commitf92e29696d0f01c7fa1941829cb131a708f88393 (patch)
tree3347cb1a5c22cd1686744481fb2e2e15c61a560a /src/views/Configuration/Firmware/Firmware.vue
parent6f71284973ee2f0b35fb22fa36a1afa883a0cc7a (diff)
downloadwebui-vue-f92e29696d0f01c7fa1941829cb131a708f88393.tar.xz
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
Diffstat (limited to 'src/views/Configuration/Firmware/Firmware.vue')
-rw-r--r--src/views/Configuration/Firmware/Firmware.vue23
1 files changed, 12 insertions, 11 deletions
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);
},