@@ -6,6 +6,7 @@ import {Icon, Text} from '@gravity-ui/uikit';
66import { StringParam , useQueryParams } from 'use-query-params' ;
77
88import { ButtonWithConfirmDialog } from '../../components/ButtonWithConfirmDialog/ButtonWithConfirmDialog' ;
9+ import { EntitiesCount } from '../../components/EntitiesCount' ;
910import { EntityStatus } from '../../components/EntityStatus/EntityStatus' ;
1011import { ResponseError } from '../../components/Errors/ResponseError' ;
1112import { InternalLink } from '../../components/InternalLink' ;
@@ -171,7 +172,7 @@ export function TabletsTable({database, tablets, loading, error}: TabletsTablePr
171172
172173 const columns = React . useMemo ( ( ) => getColumns ( { database} ) , [ database ] ) ;
173174
174- const data = React . useMemo ( ( ) => {
175+ const filteredTablets = React . useMemo ( ( ) => {
175176 return tablets . filter ( ( tablet ) => {
176177 return String ( tablet . TabletId ) . includes ( tabletsSearch ?? '' ) ;
177178 } ) ;
@@ -188,14 +189,20 @@ export function TabletsTable({database, tablets, loading, error}: TabletsTablePr
188189 placeholder = { i18n ( 'controls.search-placeholder' ) }
189190 onChange = { handleSearchQueryChange }
190191 value = { tabletsSearch ?? '' }
191- width = { 190 }
192+ width = { 238 }
193+ />
194+ < EntitiesCount
195+ label = { i18n ( 'controls.entities-count-label' ) }
196+ loading = { loading }
197+ total = { tablets . length }
198+ current = { filteredTablets . length }
192199 />
193200 </ TableWithControlsLayout . Controls >
194201 { error ? < ResponseError error = { error } /> : null }
195202 < TableWithControlsLayout . Table loading = { loading } >
196203 < ResizeableDataTable
197204 columns = { columns }
198- data = { data }
205+ data = { filteredTablets }
199206 settings = { DEFAULT_TABLE_SETTINGS }
200207 emptyDataMessage = { i18n ( 'noTabletsData' ) }
201208 />
0 commit comments