From 6483544a7be8f86b37ce817b6cb7ac93db6e322a Mon Sep 17 00:00:00 2001
From: Derick Montague <derick.montague@ibm.com>
Date: Sun, 29 Nov 2020 12:31:20 -0600
Subject: Refactor server LED indicator variable naming

- Make name consistent between both Overview and Server LED views

Signed-off-by: Derick Montague <derick.montague@ibm.com>
Change-Id: I36601b603bfeb4e9f2b782641dd2813882466c21
---
 src/views/Overview/OverviewQuickLinks.vue | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

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

diff --git a/src/views/Overview/OverviewQuickLinks.vue b/src/views/Overview/OverviewQuickLinks.vue
index 207478ac..82975f57 100644
--- a/src/views/Overview/OverviewQuickLinks.vue
+++ b/src/views/Overview/OverviewQuickLinks.vue
@@ -14,13 +14,13 @@
         <dt>{{ $t('pageOverview.quicklinks.serverLed') }}</dt>
         <dd>
           <b-form-checkbox
-            v-model="serverLedChecked"
+            v-model="indicatorLedActiveState"
             data-test-id="overviewQuickLinks-checkbox-serverLed"
             name="check-button"
             switch
             @change="onChangeServerLed"
           >
-            <span v-if="serverLedChecked">
+            <span v-if="indicatorLedActiveState">
               {{ $t('global.status.on') }}
             </span>
             <span v-else>{{ $t('global.status.off') }}</span>
@@ -67,9 +67,9 @@ export default {
     bmcTime() {
       return this.$store.getters['global/bmcTime'];
     },
-    serverLedChecked: {
+    indicatorLedActiveState: {
       get() {
-        return this.$store.getters['serverLed/getIndicatorValue'];
+        return this.$store.getters['serverLed/getIndicatorLedActiveState'];
       },
       set(value) {
         return value;
@@ -79,17 +79,22 @@ export default {
   created() {
     Promise.all([
       this.$store.dispatch('global/getBmcTime'),
-      this.$store.dispatch('serverLed/getIndicatorValue'),
+      this.$store.dispatch('serverLed/getIndicatorLedActiveState'),
     ]).finally(() => {
       this.$root.$emit('overview-quicklinks-complete');
     });
   },
   methods: {
-    onChangeServerLed(value) {
+    onChangeServerLed(indicatorLedActiveState) {
       this.$store
-        .dispatch('serverLed/saveIndicatorLedValue', value)
+        .dispatch(
+          'serverLed/saveIndicatorLedActiveState',
+          indicatorLedActiveState
+        )
         .then((message) => this.successToast(message))
-        .catch(({ message }) => this.errorToast(message));
+        .catch(({ message }) => {
+          this.errorToast(message);
+        });
     },
   },
 };
-- 
cgit v1.2.3

