From 4c69f5b7658337b8d621c3c26aa30708848e63ed Mon Sep 17 00:00:00 2001
From: Dixsie Wolmers <dixsie@ibm.com>
Date: Wed, 26 Feb 2020 11:23:52 -0600
Subject: Move power control to redfish

Replaces power cap store and power consumption store with power control store
and uses redfish.

Signed-off-by: Dixsie Wolmers <dixsie@ibm.com>
Change-Id: I5cce223da17373bcae3e7c6736a4580e1bd8ae00
---
 src/views/Overview/Overview.vue | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

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

diff --git a/src/views/Overview/Overview.vue b/src/views/Overview/Overview.vue
index 76a062c0..962d9a37 100644
--- a/src/views/Overview/Overview.vue
+++ b/src/views/Overview/Overview.vue
@@ -60,15 +60,19 @@
             <b-col sm="6">
               <dl>
                 <dt>{{ $t('pageOverview.powerConsumption') }}</dt>
-                <dd v-if="powerConsumption">{{ powerConsumption }} W</dd>
-                <dd v-else>{{ $t('global.status.notAvailable') }}</dd>
+                <dd v-if="powerConsumptionValue == null">
+                  {{ $t('global.status.notAvailable') }}
+                </dd>
+                <dd v-else>{{ powerConsumptionValue }} W</dd>
               </dl>
             </b-col>
             <b-col sm="6">
               <dl>
                 <dt>{{ $t('pageOverview.powerCap') }}</dt>
-                <dd v-if="powerCapData">{{ powerCapData }} W</dd>
-                <dd v-else>{{ $t('global.status.disabled') }}</dd>
+                <dd v-if="powerCapValue == null">
+                  {{ $t('global.status.disabled') }}
+                </dd>
+                <dd v-else>{{ powerCapValue }} W</dd>
               </dl>
             </b-col>
           </b-row>
@@ -103,10 +107,10 @@ export default {
     serverManufacturer: state => state.overview.serverManufacturer,
     serverSerialNumber: state => state.overview.serverSerialNumber,
     hostName: state => state.global.hostName,
-    hostFirmwareVersion: state => state.firmware.hostFirmwareVersion,
-    bmcFirmwareVersion: state => state.firmware.bmcFirmwareVersion,
-    powerConsumption: state => state.powerConsumption.powerConsumption,
-    powerCapValue: state => state.powerCap.powerCapValue
+    hostActiveVersion: state => state.firmware.hostActiveVersion,
+    bmcActiveVersion: state => state.firmware.bmcActiveVersion,
+    powerCapValue: state => state.powerControl.powerCapValue,
+    powerConsumptionValue: state => state.powerControl.powerConsumptionValue
   }),
   created() {
     this.getOverviewInfo();
@@ -115,10 +119,8 @@ export default {
     getOverviewInfo() {
       this.$store.dispatch('overview/getServerInfo');
       this.$store.dispatch('global/getHostName');
-      this.$store.dispatch('firmware/getBmcFirmware');
-      this.$store.dispatch('firmware/getHostFirmware');
-      this.$store.dispatch('powerConsumption/getPowerData');
-      this.$store.dispatch('powerCap/getPowerCapData');
+      this.$store.dispatch('firmware/getFirmwareInfo');
+      this.$store.dispatch('powerControl/getPowerControl');
     }
   }
 };
-- 
cgit v1.2.3

