From 33d755f4e62beff72101f6ca07e4d31b04e13826 Mon Sep 17 00:00:00 2001
From: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Date: Thu, 18 Feb 2021 15:24:14 -0800
Subject: Update the default firmware page

- Minor updates made to the general layout and styles
  - Changes to some page copy
  - Moves update firmware form to bottom of page
- Adds dynamic TFTP upload option
- Adds dynamic card layout for BMC and host firmwre
  - 2 cards for combined
  - 4 cards for separate
- Removes FirmwareSingleImage components that were used for IBM builds

Signed-off-by: Yoshie Muranaka <yoshiemuranaka@gmail.com>
Change-Id: Ib5465ecc30dd1505824bf41c82d33b7655d5e598
---
 src/views/Overview/Overview.vue | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

(limited to 'src/views/Overview/Overview.vue')

diff --git a/src/views/Overview/Overview.vue b/src/views/Overview/Overview.vue
index 1d2da441..2436e393 100644
--- a/src/views/Overview/Overview.vue
+++ b/src/views/Overview/Overview.vue
@@ -104,13 +104,6 @@ export default {
     PageSection,
   },
   mixins: [LoadingBarMixin],
-  data() {
-    return {
-      firmwareStoreModuleName: this.$store.hasModule('firmwareSingleImage')
-        ? 'firmwareSingleImage'
-        : 'firmware',
-    };
-  },
   computed: {
     ...mapState({
       server: (state) => state.system.systems[0],
@@ -129,15 +122,18 @@ export default {
         if (this.server) return this.server.serialNumber || '--';
         return '--';
       },
-      hostFirmwareVersion() {
-        if (this.server) return this.server.firmwareVersion || '--';
-        return '--';
-      },
     }),
+    activeHostFirmware() {
+      return this.$store.getters[`firmware/activeHostFirmware`];
+    },
+    hostFirmwareVersion() {
+      return this.activeHostFirmware?.version || '--';
+    },
+    activeBmcFirmware() {
+      return this.$store.getters[`firmware/activeBmcFirmware`];
+    },
     bmcFirmwareVersion() {
-      return this.$store.getters[
-        `${this.firmwareStoreModuleName}/bmcFirmwareCurrentVersion`
-      ];
+      return this.activeBmcFirmware?.version || '--';
     },
   },
   created() {
@@ -153,9 +149,7 @@ export default {
     });
     Promise.all([
       this.$store.dispatch('system/getSystem'),
-      this.$store.dispatch(
-        `${this.firmwareStoreModuleName}/getFirmwareInformation`
-      ),
+      this.$store.dispatch(`firmware/getFirmwareInformation`),
       this.$store.dispatch('powerControl/getPowerControl'),
       quicklinksPromise,
       networkPromise,
-- 
cgit v1.2.3

