Set table busy state on load

- Add busy prop to tables

Signed-off-by: Kenneth Fullbright <kennyneedsmilky@gmail.com>
Change-Id: I4416f12967c9a0ad6c8bb782c7d8de5c17fdd195
diff --git a/src/views/HardwareStatus/Inventory/InventoryTableAssembly.vue b/src/views/HardwareStatus/Inventory/InventoryTableAssembly.vue
index afc1470..b4010bf 100644
--- a/src/views/HardwareStatus/Inventory/InventoryTableAssembly.vue
+++ b/src/views/HardwareStatus/Inventory/InventoryTableAssembly.vue
@@ -9,6 +9,7 @@
       :fields="fields"
       show-empty
       :empty-text="$t('global.table.emptyMessage')"
+      :busy="isBusy"
     >
       <!-- Expand chevron icon -->
       <template #cell(expandRow)="row">
@@ -81,6 +82,7 @@
   mixins: [BVToastMixin, TableRowExpandMixin, DataFormatterMixin],
   data() {
     return {
+      isBusy: true,
       fields: [
         {
           key: 'expandRow',
@@ -130,6 +132,7 @@
     this.$store.dispatch('assemblies/getAssemblyInfo').finally(() => {
       // Emit initial data fetch complete to parent component
       this.$root.$emit('hardware-status-assembly-complete');
+      this.isBusy = false;
     });
   },
   methods: {
diff --git a/src/views/HardwareStatus/Inventory/InventoryTableBmcManager.vue b/src/views/HardwareStatus/Inventory/InventoryTableBmcManager.vue
index ad73f59..48b914f 100644
--- a/src/views/HardwareStatus/Inventory/InventoryTableBmcManager.vue
+++ b/src/views/HardwareStatus/Inventory/InventoryTableBmcManager.vue
@@ -7,6 +7,7 @@
       :fields="fields"
       show-empty
       :empty-text="$t('global.table.emptyMessage')"
+      :busy="isBusy"
     >
       <!-- Expand chevron icon -->
       <template #cell(expandRow)="row">
@@ -175,6 +176,7 @@
   mixins: [BVToastMixin, TableRowExpandMixin, DataFormatterMixin],
   data() {
     return {
+      isBusy: true,
       fields: [
         {
           key: 'expandRow',
@@ -221,6 +223,7 @@
     this.$store.dispatch('bmc/getBmcInfo').finally(() => {
       // Emit initial data fetch complete to parent component
       this.$root.$emit('hardware-status-bmc-manager-complete');
+      this.isBusy = false;
     });
   },
   methods: {
diff --git a/src/views/HardwareStatus/Inventory/InventoryTableChassis.vue b/src/views/HardwareStatus/Inventory/InventoryTableChassis.vue
index 3f63c06..b49cec7 100644
--- a/src/views/HardwareStatus/Inventory/InventoryTableChassis.vue
+++ b/src/views/HardwareStatus/Inventory/InventoryTableChassis.vue
@@ -7,6 +7,7 @@
       :fields="fields"
       show-empty
       :empty-text="$t('global.table.emptyMessage')"
+      :busy="isBusy"
     >
       <!-- Expand chevron icon -->
       <template #cell(expandRow)="row">
@@ -128,6 +129,7 @@
   mixins: [BVToastMixin, TableRowExpandMixin, DataFormatterMixin],
   data() {
     return {
+      isBusy: true,
       fields: [
         {
           key: 'expandRow',
@@ -168,6 +170,7 @@
     this.$store.dispatch('chassis/getChassisInfo').finally(() => {
       // Emit initial data fetch complete to parent component
       this.$root.$emit('hardware-status-chassis-complete');
+      this.isBusy = false;
     });
   },
   methods: {
diff --git a/src/views/HardwareStatus/Inventory/InventoryTableDimmSlot.vue b/src/views/HardwareStatus/Inventory/InventoryTableDimmSlot.vue
index 73be06b..6599481 100644
--- a/src/views/HardwareStatus/Inventory/InventoryTableDimmSlot.vue
+++ b/src/views/HardwareStatus/Inventory/InventoryTableDimmSlot.vue
@@ -28,6 +28,7 @@
       :filter="searchFilter"
       :empty-text="$t('global.table.emptyMessage')"
       :empty-filtered-text="$t('global.table.emptySearchMessage')"
+      :busy="isBusy"
       @filtered="onFiltered"
     >
       <!-- Expand chevron icon -->
@@ -181,6 +182,7 @@
   ],
   data() {
     return {
+      isBusy: true,
       fields: [
         {
           key: 'expandRow',
@@ -228,6 +230,7 @@
     this.$store.dispatch('memory/getDimms').finally(() => {
       // Emit initial data fetch complete to parent component
       this.$root.$emit('hardware-status-dimm-slot-complete');
+      this.isBusy = false;
     });
   },
   methods: {
diff --git a/src/views/HardwareStatus/Inventory/InventoryTableFans.vue b/src/views/HardwareStatus/Inventory/InventoryTableFans.vue
index ff56804..fe788c5 100644
--- a/src/views/HardwareStatus/Inventory/InventoryTableFans.vue
+++ b/src/views/HardwareStatus/Inventory/InventoryTableFans.vue
@@ -28,6 +28,7 @@
       :filter="searchFilter"
       :empty-text="$t('global.table.emptyMessage')"
       :empty-filtered-text="$t('global.table.emptySearchMessage')"
+      :busy="isBusy"
       @filtered="onFiltered"
     >
       <!-- Expand chevron icon -->
@@ -120,6 +121,7 @@
   ],
   data() {
     return {
+      isBusy: true,
       fields: [
         {
           key: 'expandRow',
@@ -171,6 +173,7 @@
     this.$store.dispatch('fan/getFanInfo').finally(() => {
       // Emit initial data fetch complete to parent component
       this.$root.$emit('hardware-status-fans-complete');
+      this.isBusy = false;
     });
   },
   methods: {
diff --git a/src/views/HardwareStatus/Inventory/InventoryTablePowerSupplies.vue b/src/views/HardwareStatus/Inventory/InventoryTablePowerSupplies.vue
index ba0896b..aed7871 100644
--- a/src/views/HardwareStatus/Inventory/InventoryTablePowerSupplies.vue
+++ b/src/views/HardwareStatus/Inventory/InventoryTablePowerSupplies.vue
@@ -28,6 +28,7 @@
       :filter="searchFilter"
       :empty-text="$t('global.table.emptyMessage')"
       :empty-filtered-text="$t('global.table.emptySearchMessage')"
+      :busy="isBusy"
       @filtered="onFiltered"
     >
       <!-- Expand chevron icon -->
@@ -138,6 +139,7 @@
   ],
   data() {
     return {
+      isBusy: true,
       fields: [
         {
           key: 'expandRow',
@@ -189,6 +191,7 @@
     this.$store.dispatch('powerSupply/getAllPowerSupplies').finally(() => {
       // Emit initial data fetch complete to parent component
       this.$root.$emit('hardware-status-power-supplies-complete');
+      this.isBusy = false;
     });
   },
   methods: {
diff --git a/src/views/HardwareStatus/Inventory/InventoryTableProcessors.vue b/src/views/HardwareStatus/Inventory/InventoryTableProcessors.vue
index fbe5837..7d5dd70 100644
--- a/src/views/HardwareStatus/Inventory/InventoryTableProcessors.vue
+++ b/src/views/HardwareStatus/Inventory/InventoryTableProcessors.vue
@@ -27,6 +27,7 @@
       :filter="searchFilter"
       :empty-text="$t('global.table.emptyMessage')"
       :empty-filtered-text="$t('global.table.emptySearchMessage')"
+      :busy="isBusy"
       @filtered="onFiltered"
     >
       <!-- Expand button -->
@@ -172,6 +173,7 @@
   ],
   data() {
     return {
+      isBusy: true,
       fields: [
         {
           key: 'expandRow',
@@ -224,6 +226,7 @@
     this.$store.dispatch('processors/getProcessorsInfo').finally(() => {
       // Emit initial data fetch complete to parent component
       this.$root.$emit('hardware-status-processors-complete');
+      this.isBusy = false;
     });
   },
   methods: {
diff --git a/src/views/HardwareStatus/Inventory/InventoryTableSystem.vue b/src/views/HardwareStatus/Inventory/InventoryTableSystem.vue
index 93e65bb..cf2cf02 100644
--- a/src/views/HardwareStatus/Inventory/InventoryTableSystem.vue
+++ b/src/views/HardwareStatus/Inventory/InventoryTableSystem.vue
@@ -7,6 +7,7 @@
       :items="systems"
       :fields="fields"
       :empty-text="$t('global.table.emptyMessage')"
+      :busy="isBusy"
     >
       <!-- Expand chevron icon -->
       <template #cell(expandRow)="row">
@@ -162,6 +163,7 @@
   mixins: [BVToastMixin, TableRowExpandMixin, DataFormatterMixin],
   data() {
     return {
+      isBusy: true,
       fields: [
         {
           key: 'expandRow',
@@ -208,6 +210,7 @@
     this.$store.dispatch('system/getSystem').finally(() => {
       // Emit initial data fetch complete to parent component
       this.$root.$emit('hardware-status-system-complete');
+      this.isBusy = false;
     });
   },
   methods: {
diff --git a/src/views/HardwareStatus/Sensors/Sensors.vue b/src/views/HardwareStatus/Sensors/Sensors.vue
index 15cecff..6329d9d 100644
--- a/src/views/HardwareStatus/Sensors/Sensors.vue
+++ b/src/views/HardwareStatus/Sensors/Sensors.vue
@@ -53,6 +53,7 @@
           :filter="searchFilter"
           :empty-text="$t('global.table.emptyMessage')"
           :empty-filtered-text="$t('global.table.emptySearchMessage')"
+          :busy="isBusy"
           @filtered="onFiltered"
           @row-selected="onRowSelected($event, filteredSensors.length)"
         >
@@ -146,6 +147,7 @@
   },
   data() {
     return {
+      isBusy: true,
       fields: [
         {
           key: 'checkbox',
@@ -220,9 +222,10 @@
   },
   created() {
     this.startLoader();
-    this.$store
-      .dispatch('sensors/getAllSensors')
-      .finally(() => this.endLoader());
+    this.$store.dispatch('sensors/getAllSensors').finally(() => {
+      this.endLoader();
+      this.isBusy = false;
+    });
   },
   methods: {
     sortCompare(a, b, key) {
diff --git a/src/views/Logs/Dumps/Dumps.vue b/src/views/Logs/Dumps/Dumps.vue
index 179a503..81c9de0 100644
--- a/src/views/Logs/Dumps/Dumps.vue
+++ b/src/views/Logs/Dumps/Dumps.vue
@@ -59,8 +59,9 @@
             :empty-text="$t('global.table.emptyMessage')"
             :empty-filtered-text="$t('global.table.emptySearchMessage')"
             :filter="searchFilter"
-            @filtered="onFiltered"
-            @row-selected="onRowSelected($event, filteredDumps.length)"
+            :busy="isBusy"
+            @filtered="onChangeSearchFilter"
+            @row-selected="onRowSelected($event, filteredTableItems.length)"
           >
             <!-- Checkbox column -->
             <template #head(checkbox)>
@@ -201,6 +202,7 @@
   },
   data() {
     return {
+      isBusy: true,
       fields: [
         {
           key: 'checkbox',
@@ -304,7 +306,10 @@
   },
   created() {
     this.startLoader();
-    this.$store.dispatch('dumps/getAllDumps').finally(() => this.endLoader());
+    this.$store.dispatch('dumps/getBmcDumpEntries').finally(() => {
+      this.endLoader();
+      this.isBusy = false;
+    });
   },
   methods: {
     convertBytesToMegabytes(bytes) {
diff --git a/src/views/Logs/EventLogs/EventLogs.vue b/src/views/Logs/EventLogs/EventLogs.vue
index fb5458f..9487211 100644
--- a/src/views/Logs/EventLogs/EventLogs.vue
+++ b/src/views/Logs/EventLogs/EventLogs.vue
@@ -82,6 +82,7 @@
           :per-page="perPage"
           :current-page="currentPage"
           :filter="searchFilter"
+          :busy="isBusy"
           @filtered="onFiltered"
           @row-selected="onRowSelected($event, filteredLogs.length)"
         >
@@ -314,6 +315,7 @@
   },
   data() {
     return {
+      isBusy: true,
       fields: [
         {
           key: 'expandRow',
@@ -434,9 +436,10 @@
   },
   created() {
     this.startLoader();
-    this.$store
-      .dispatch('eventLog/getEventLogData')
-      .finally(() => this.endLoader());
+    this.$store.dispatch('eventLog/getEventLogData').finally(() => {
+      this.endLoader();
+      this.isBusy = false;
+    });
   },
   methods: {
     changelogStatus(row) {
diff --git a/src/views/Logs/PostCodeLogs/PostCodeLogs.vue b/src/views/Logs/PostCodeLogs/PostCodeLogs.vue
index 6ef575e..d116d2e 100644
--- a/src/views/Logs/PostCodeLogs/PostCodeLogs.vue
+++ b/src/views/Logs/PostCodeLogs/PostCodeLogs.vue
@@ -64,6 +64,7 @@
           :per-page="perPage"
           :current-page="currentPage"
           :filter="searchFilter"
+          :busy="isBusy"
           @filtered="onFiltered"
           @row-selected="onRowSelected($event, filteredLogs.length)"
         >
@@ -208,6 +209,7 @@
   },
   data() {
     return {
+      isBusy: true,
       fields: [
         {
           key: 'checkbox',
@@ -297,9 +299,10 @@
   },
   created() {
     this.startLoader();
-    this.$store
-      .dispatch('postCodeLogs/getPostCodesLogData')
-      .finally(() => this.endLoader());
+    this.$store.dispatch('postCodeLogs/getPostCodesLogData').finally(() => {
+      this.endLoader();
+      this.isBusy = false;
+    });
   },
   methods: {
     exportAllLogsString() {
diff --git a/src/views/SecurityAndAccess/Certificates/Certificates.vue b/src/views/SecurityAndAccess/Certificates/Certificates.vue
index 9d20889..0113b80 100644
--- a/src/views/SecurityAndAccess/Certificates/Certificates.vue
+++ b/src/views/SecurityAndAccess/Certificates/Certificates.vue
@@ -57,6 +57,7 @@
           responsive="md"
           show-empty
           hover
+          :busy="isBusy"
           :fields="fields"
           :items="tableItems"
           :empty-text="$t('global.table.emptyMessage')"
@@ -133,6 +134,7 @@
   },
   data() {
     return {
+      isBusy: true,
       modalCertificate: null,
       fields: [
         {
@@ -214,9 +216,10 @@
   async created() {
     this.startLoader();
     await this.$store.dispatch('global/getBmcTime');
-    this.$store
-      .dispatch('certificates/getCertificates')
-      .finally(() => this.endLoader());
+    this.$store.dispatch('certificates/getCertificates').finally(() => {
+      this.endLoader();
+      this.isBusy = false;
+    });
   },
   methods: {
     onTableRowAction(event, rowItem) {
diff --git a/src/views/SecurityAndAccess/Ldap/TableRoleGroups.vue b/src/views/SecurityAndAccess/Ldap/TableRoleGroups.vue
index 6e23111..5ae3e3d 100644
--- a/src/views/SecurityAndAccess/Ldap/TableRoleGroups.vue
+++ b/src/views/SecurityAndAccess/Ldap/TableRoleGroups.vue
@@ -37,6 +37,7 @@
           hover
           no-sort-reset
           sort-icon-left
+          :busy="isBusy"
           :items="tableItems"
           :fields="fields"
           :empty-text="$t('global.table.emptyMessage')"
@@ -121,6 +122,7 @@
   mixins: [BVTableSelectableMixin, BVToastMixin, LoadingBarMixin],
   data() {
     return {
+      isBusy: true,
       activeRoleGroup: null,
       fields: [
         {
@@ -179,7 +181,9 @@
     },
   },
   created() {
-    this.$store.dispatch('userManagement/getAccountRoles');
+    this.$store.dispatch('userManagement/getAccountRoles').finally(() => {
+      this.isBusy = false;
+    });
   },
   methods: {
     onBatchAction() {
diff --git a/src/views/SecurityAndAccess/Sessions/Sessions.vue b/src/views/SecurityAndAccess/Sessions/Sessions.vue
index 9782e7f..07ee725 100644
--- a/src/views/SecurityAndAccess/Sessions/Sessions.vue
+++ b/src/views/SecurityAndAccess/Sessions/Sessions.vue
@@ -36,6 +36,7 @@
           hover
           show-empty
           sort-by="clientID"
+          :busy="isBusy"
           :fields="fields"
           :items="allConnections"
           :filter="searchFilter"
@@ -158,6 +159,7 @@
   },
   data() {
     return {
+      isBusy: true,
       fields: [
         {
           key: 'checkbox',
@@ -217,9 +219,10 @@
   },
   created() {
     this.startLoader();
-    this.$store
-      .dispatch('sessions/getSessionsData')
-      .finally(() => this.endLoader());
+    this.$store.dispatch('sessions/getSessionsData').finally(() => {
+      this.endLoader();
+      this.isBusy = false;
+    });
   },
   methods: {
     onFiltered(filteredItems) {
diff --git a/src/views/SecurityAndAccess/UserManagement/UserManagement.vue b/src/views/SecurityAndAccess/UserManagement/UserManagement.vue
index 015fee9..c6c556c 100644
--- a/src/views/SecurityAndAccess/UserManagement/UserManagement.vue
+++ b/src/views/SecurityAndAccess/UserManagement/UserManagement.vue
@@ -33,6 +33,7 @@
           show-empty
           no-select-on-click
           hover
+          :busy="isBusy"
           :fields="fields"
           :items="tableItems"
           :empty-text="$t('global.table.emptyMessage')"
@@ -155,6 +156,7 @@
   },
   data() {
     return {
+      isBusy: true,
       activeUser: null,
       fields: [
         {
@@ -237,9 +239,10 @@
   },
   created() {
     this.startLoader();
-    this.$store
-      .dispatch('userManagement/getUsers')
-      .finally(() => this.endLoader());
+    this.$store.dispatch('userManagement/getUsers').finally(() => {
+      this.endLoader();
+      this.isBusy = false;
+    });
     this.$store.dispatch('userManagement/getAccountSettings');
     this.$store.dispatch('userManagement/getAccountRoles');
   },