diff options
author | SurenNeware <sneware9@in.ibm.com> | 2020-08-19 09:31:32 +0300 |
---|---|---|
committer | Derick Montague <derick.montague@ibm.com> | 2020-08-21 22:39:42 +0300 |
commit | 10fe276be19c4ba736eedf28d4ea2031f3eecd14 (patch) | |
tree | 31d0835ff574f37246333adb53f882e53bb8069b | |
parent | 50cf2f78ea0b4fe4c08514d1dc71112312a2790b (diff) | |
download | webui-vue-10fe276be19c4ba736eedf28d4ea2031f3eecd14.tar.xz |
Add default empty table state
-Add empty table state to High priority events table in Overview page
and Processors table in Hardware status page.
Signed-off-by: Suren Neware <sneware9@in.ibm.com>
Change-Id: I68b613cc181c2423c9a8769d26f218ff89a0c834
-rw-r--r-- | src/views/Health/HardwareStatus/HardwareStatusTableProcessors.vue | 2 | ||||
-rw-r--r-- | src/views/Overview/OverviewEvents.vue | 55 |
2 files changed, 28 insertions, 29 deletions
diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableProcessors.vue b/src/views/Health/HardwareStatus/HardwareStatusTableProcessors.vue index dad3ac8e..28163e8a 100644 --- a/src/views/Health/HardwareStatus/HardwareStatusTableProcessors.vue +++ b/src/views/Health/HardwareStatus/HardwareStatusTableProcessors.vue @@ -10,10 +10,12 @@ sort-icon-left no-sort-reset responsive="md" + show-empty :items="processors" :fields="fields" :sort-desc="true" :filter="searchFilter" + :empty-text="$t('global.table.emptyMessage')" > <!-- Expand button --> <template v-slot:cell(expandRow)="row"> diff --git a/src/views/Overview/OverviewEvents.vue b/src/views/Overview/OverviewEvents.vue index 5c862639..391fb055 100644 --- a/src/views/Overview/OverviewEvents.vue +++ b/src/views/Overview/OverviewEvents.vue @@ -1,34 +1,31 @@ <template> <div> - <div v-if="eventLogData.length == 0"> - {{ $t('pageOverview.events.noHighEventsMsg') }} - </div> - <div v-else> - <b-button - variant="link" - to="/health/event-logs" - data-test-id="overviewEvents-button-eventLogs" - class="float-md-right" - > - {{ $t('pageOverview.events.viewAllButton') }} - </b-button> - <b-table - per-page="5" - sort-by="date" - sort-desc - responsive="md" - :items="eventLogData" - :fields="fields" - > - <template v-slot:cell(severity)="{ value }"> - <status-icon status="danger" /> - {{ value }} - </template> - <template v-slot:cell(date)="{ value }"> - {{ value | formatDate }} {{ value | formatTime }} - </template> - </b-table> - </div> + <b-button + variant="link" + to="/health/event-logs" + data-test-id="overviewEvents-button-eventLogs" + class="float-md-right" + > + {{ $t('pageOverview.events.viewAllButton') }} + </b-button> + <b-table + per-page="5" + sort-by="date" + sort-desc + responsive="md" + show-empty + :items="eventLogData" + :fields="fields" + :empty-text="$t('pageOverview.events.noHighEventsMsg')" + > + <template v-slot:cell(severity)="{ value }"> + <status-icon status="danger" /> + {{ value }} + </template> + <template v-slot:cell(date)="{ value }"> + {{ value | formatDate }} {{ value | formatTime }} + </template> + </b-table> </div> </template> |