Add default or empty table state
-Add appropriate empty text for the table.
-Add common default empty state for all tables.
Signed-off-by: Suren Neware <sneware9@in.ibm.com>
Change-Id: If4beabc0b1450718095757bbb0803335ccf83ec5
diff --git a/src/views/Health/EventLogs/EventLogs.vue b/src/views/Health/EventLogs/EventLogs.vue
index d4bfc6f..810eddd 100644
--- a/src/views/Health/EventLogs/EventLogs.vue
+++ b/src/views/Health/EventLogs/EventLogs.vue
@@ -52,7 +52,7 @@
:fields="fields"
:items="filteredLogs"
:sort-compare="onSortCompare"
- :empty-text="$t('pageEventLogs.table.emptyMessage')"
+ :empty-text="$t('global.table.emptyMessage')"
:per-page="perPage"
:current-page="currentPage"
:filter="searchFilter"
diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableBmcManager.vue b/src/views/Health/HardwareStatus/HardwareStatusTableBmcManager.vue
index ffbfc79..a5f5711 100644
--- a/src/views/Health/HardwareStatus/HardwareStatusTableBmcManager.vue
+++ b/src/views/Health/HardwareStatus/HardwareStatusTableBmcManager.vue
@@ -1,6 +1,12 @@
<template>
<page-section :section-title="$t('pageHardwareStatus.bmcManager')">
- <b-table responsive="md" :items="items" :fields="fields">
+ <b-table
+ responsive="md"
+ :items="items"
+ :fields="fields"
+ show-empty
+ :empty-text="$t('global.table.emptyMessage')"
+ >
<!-- Expand chevron icon -->
<template v-slot:cell(expandRow)="row">
<b-button
diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableChassis.vue b/src/views/Health/HardwareStatus/HardwareStatusTableChassis.vue
index 5632e83..eb4c000 100644
--- a/src/views/Health/HardwareStatus/HardwareStatusTableChassis.vue
+++ b/src/views/Health/HardwareStatus/HardwareStatusTableChassis.vue
@@ -1,6 +1,12 @@
<template>
<page-section :section-title="$t('pageHardwareStatus.chassis')">
- <b-table responsive="md" :items="chassis" :fields="fields">
+ <b-table
+ responsive="md"
+ :items="chassis"
+ :fields="fields"
+ show-empty
+ :empty-text="$t('global.table.emptyMessage')"
+ >
<!-- Expand chevron icon -->
<template v-slot:cell(expandRow)="row">
<b-button
diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableDimmSlot.vue b/src/views/Health/HardwareStatus/HardwareStatusTableDimmSlot.vue
index 79bbe96..9cacad0 100644
--- a/src/views/Health/HardwareStatus/HardwareStatusTableDimmSlot.vue
+++ b/src/views/Health/HardwareStatus/HardwareStatusTableDimmSlot.vue
@@ -10,11 +10,13 @@
no-sort-reset
sort-by="health"
responsive="md"
+ show-empty
:items="dimms"
:fields="fields"
:sort-desc="true"
:sort-compare="sortCompare"
:filter="searchFilter"
+ :empty-text="$t('global.table.emptyMessage')"
>
<!-- Expand chevron icon -->
<template v-slot:cell(expandRow)="row">
diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableFans.vue b/src/views/Health/HardwareStatus/HardwareStatusTableFans.vue
index e9cbf04..b29b0e6 100644
--- a/src/views/Health/HardwareStatus/HardwareStatusTableFans.vue
+++ b/src/views/Health/HardwareStatus/HardwareStatusTableFans.vue
@@ -10,11 +10,13 @@
no-sort-reset
responsive="md"
sort-by="health"
+ show-empty
:items="fans"
:fields="fields"
:sort-desc="true"
:sort-compare="sortCompare"
:filter="searchFilter"
+ :empty-text="$t('global.table.emptyMessage')"
>
<!-- Expand chevron icon -->
<template v-slot:cell(expandRow)="row">
diff --git a/src/views/Health/HardwareStatus/HardwareStatusTablePowerSupplies.vue b/src/views/Health/HardwareStatus/HardwareStatusTablePowerSupplies.vue
index b6dd326..e738080 100644
--- a/src/views/Health/HardwareStatus/HardwareStatusTablePowerSupplies.vue
+++ b/src/views/Health/HardwareStatus/HardwareStatusTablePowerSupplies.vue
@@ -10,11 +10,13 @@
no-sort-reset
responsive="md"
sort-by="health"
+ show-empty
:items="powerSupplies"
:fields="fields"
:sort-desc="true"
:sort-compare="sortCompare"
:filter="searchFilter"
+ :empty-text="$t('global.table.emptyMessage')"
>
<!-- Expand chevron icon -->
<template v-slot:cell(expandRow)="row">
diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableStystem.vue b/src/views/Health/HardwareStatus/HardwareStatusTableStystem.vue
index bff9108..4bcab51 100644
--- a/src/views/Health/HardwareStatus/HardwareStatusTableStystem.vue
+++ b/src/views/Health/HardwareStatus/HardwareStatusTableStystem.vue
@@ -1,6 +1,12 @@
<template>
<page-section :section-title="$t('pageHardwareStatus.system')">
- <b-table responsive="md" :items="systems" :fields="fields">
+ <b-table
+ responsive="md"
+ show-empty
+ :items="systems"
+ :fields="fields"
+ :empty-text="$t('global.table.emptyMessage')"
+ >
<!-- Expand chevron icon -->
<template v-slot:cell(expandRow)="row">
<b-button
diff --git a/src/views/Health/Sensors/Sensors.vue b/src/views/Health/Sensors/Sensors.vue
index f8564d8..f096654 100644
--- a/src/views/Health/Sensors/Sensors.vue
+++ b/src/views/Health/Sensors/Sensors.vue
@@ -35,11 +35,13 @@
no-sort-reset
sticky-header="75vh"
sort-by="status"
+ show-empty
:items="filteredSensors"
:fields="fields"
:sort-desc="true"
:sort-compare="sortCompare"
:filter="searchFilter"
+ :empty-text="$t('global.table.emptyMessage')"
@row-selected="onRowSelected($event, filteredSensors.length)"
>
<!-- Checkbox column -->