Display eventlog status button based on condition

Resolved and Unresolved status button in event log page is shown
or hidden based on the environment variable
VUE_APP_EVENT_LOGS_TOGGLE_BUTTON_DISABLED

Change-Id: If99a9705d4690995fb998daa979c21c61c3cc4a7
Signed-off-by: Sivaprabu Ganesan <sivaprabug@ami.com>
diff --git a/.env.intel b/.env.intel
index 5b2383d..6a8c181 100644
--- a/.env.intel
+++ b/.env.intel
@@ -7,6 +7,7 @@
 VUE_APP_MODIFY_SSH_POLICY_DISABLED="true"
 VUE_APP_VIRTUAL_MEDIA_LIST_ENABLED="true"
 VUE_APP_EVENT_LOGS_DELETE_BUTTON_DISABLED="true"
+VUE_APP_EVENT_LOGS_TOGGLE_BUTTON_DISABLED="true"
 CUSTOM_STYLES="true"
 CUSTOM_APP_NAV="true"
 CUSTOM_STORE="true"
diff --git a/src/views/Logs/EventLogs/EventLogs.vue b/src/views/Logs/EventLogs/EventLogs.vue
index a3a90fd..ff0473e 100644
--- a/src/views/Logs/EventLogs/EventLogs.vue
+++ b/src/views/Logs/EventLogs/EventLogs.vue
@@ -50,10 +50,14 @@
           @batch-action="onBatchAction"
         >
           <template #toolbar-buttons>
-            <b-button variant="primary" @click="resolveLogs">
+            <b-button v-if="!hideToggle" variant="primary" @click="resolveLogs">
               {{ $t('pageEventLogs.resolve') }}
             </b-button>
-            <b-button variant="primary" @click="unresolveLogs">
+            <b-button
+              v-if="!hideToggle"
+              variant="primary"
+              @click="unresolveLogs"
+            >
               {{ $t('pageEventLogs.unresolve') }}
             </b-button>
             <table-toolbar-export
@@ -348,10 +352,12 @@
           label: this.$t('pageEventLogs.table.description'),
           tdClass: 'text-break',
         },
-        {
-          key: 'status',
-          label: this.$t('pageEventLogs.table.status'),
-        },
+        process.env.VUE_APP_EVENT_LOGS_TOGGLE_BUTTON_DISABLED === 'true'
+          ? {}
+          : {
+              key: 'status',
+              label: this.$t('pageEventLogs.table.status'),
+            },
         {
           key: 'actions',
           sortable: false,
@@ -359,18 +365,27 @@
           tdClass: 'text-right text-nowrap',
         },
       ],
-      tableFilters: [
-        {
-          key: 'severity',
-          label: this.$t('pageEventLogs.table.severity'),
-          values: ['OK', 'Warning', 'Critical'],
-        },
-        {
-          key: 'filterByStatus',
-          label: this.$t('pageEventLogs.table.status'),
-          values: ['Resolved', 'Unresolved'],
-        },
-      ],
+      tableFilters:
+        process.env.VUE_APP_EVENT_LOGS_TOGGLE_BUTTON_DISABLED === 'true'
+          ? [
+              {
+                key: 'severity',
+                label: this.$t('pageEventLogs.table.severity'),
+                values: ['OK', 'Warning', 'Critical'],
+              },
+            ]
+          : [
+              {
+                key: 'severity',
+                label: this.$t('pageEventLogs.table.severity'),
+                values: ['OK', 'Warning', 'Critical'],
+              },
+              {
+                key: 'filterByStatus',
+                label: this.$t('pageEventLogs.table.status'),
+                values: ['Resolved', 'Unresolved'],
+              },
+            ],
       expandRowLabel,
       activeFilters: [],
       batchActions:
@@ -392,6 +407,8 @@
       selectedRows: selectedRows,
       tableHeaderCheckboxModel: tableHeaderCheckboxModel,
       tableHeaderCheckboxIndeterminate: tableHeaderCheckboxIndeterminate,
+      hideToggle:
+        process.env.VUE_APP_EVENT_LOGS_TOGGLE_BUTTON_DISABLED === 'true',
       hideDelete:
         process.env.VUE_APP_EVENT_LOGS_DELETE_BUTTON_DISABLED === 'true',
     };