Skip to content

Commit 0418061

Browse files
fix: review
1 parent ca6c505 commit 0418061

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

src/containers/Tablets/TabletsTable.tsx

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {Icon, Text} from '@gravity-ui/uikit';
66
import {StringParam, useQueryParams} from 'use-query-params';
77

88
import {ButtonWithConfirmDialog} from '../../components/ButtonWithConfirmDialog/ButtonWithConfirmDialog';
9+
import {EntitiesCount} from '../../components/EntitiesCount';
910
import {EntityStatus} from '../../components/EntityStatus/EntityStatus';
1011
import {ResponseError} from '../../components/Errors/ResponseError';
1112
import {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
/>

src/containers/Tablets/i18n/en.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
"dialog.kill-header": "Restart tablet",
1111
"dialog.kill-text": "The tablet will be restarted. Do you want to proceed?",
1212
"controls.kill-not-allowed": "You don't have enough rights to restart tablet",
13-
"controls.search-placeholder": "Tablet ID"
13+
"controls.search-placeholder": "Tablet ID",
14+
"controls.entities-count-label": "Tablets"
1415
}

0 commit comments

Comments
 (0)