diff options
Diffstat (limited to 'src/views/Health/HardwareStatus/HardwareStatusTableDimmSlot.vue')
-rw-r--r-- | src/views/Health/HardwareStatus/HardwareStatusTableDimmSlot.vue | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/views/Health/HardwareStatus/HardwareStatusTableDimmSlot.vue b/src/views/Health/HardwareStatus/HardwareStatusTableDimmSlot.vue index 4fd077ba..97116ca2 100644 --- a/src/views/Health/HardwareStatus/HardwareStatusTableDimmSlot.vue +++ b/src/views/Health/HardwareStatus/HardwareStatusTableDimmSlot.vue @@ -4,6 +4,12 @@ <b-col sm="6" md="5" xl="4"> <search @changeSearch="onChangeSearchInput" /> </b-col> + <b-col sm="6" md="3" xl="2"> + <table-cell-count + :filtered-items-count="filteredRows" + :total-number-of-cells="dimms.length" + ></table-cell-count> + </b-col> </b-row> <b-table sort-icon-left @@ -18,6 +24,7 @@ :filter="searchFilter" :empty-text="$t('global.table.emptyMessage')" :empty-filtered-text="$t('global.table.emptySearchMessage')" + @filtered="onFiltered" > <!-- Expand chevron icon --> <template v-slot:cell(expandRow)="row"> @@ -58,12 +65,14 @@ import PageSection from '@/components/Global/PageSection'; import IconChevron from '@carbon/icons-vue/es/chevron--down/20'; import StatusIcon from '@/components/Global/StatusIcon'; +import TableCellCount from '@/components/Global/TableCellCount'; + import TableDataFormatterMixin from '@/components/Mixins/TableDataFormatterMixin'; import TableSortMixin from '@/components/Mixins/TableSortMixin'; import Search from '@/components/Global/Search'; export default { - components: { IconChevron, PageSection, StatusIcon, Search }, + components: { IconChevron, PageSection, StatusIcon, Search, TableCellCount }, mixins: [TableDataFormatterMixin, TableSortMixin], data() { return { @@ -99,10 +108,16 @@ export default { sortable: true } ], - searchFilter: null + searchFilter: null, + searchTotalFilteredRows: 0 }; }, computed: { + filteredRows() { + return this.searchFilter + ? this.searchTotalFilteredRows + : this.dimms.length; + }, dimms() { return this.$store.getters['memory/dimms']; } @@ -121,6 +136,9 @@ export default { }, onChangeSearchInput(searchValue) { this.searchFilter = searchValue; + }, + onFiltered(filteredItems) { + this.searchTotalFilteredRows = filteredItems.length; } } }; |