Skip to content

Commit 7b8e473

Browse files
authored
feat: add databases label (#774)
1 parent bf32a9d commit 7b8e473

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/containers/Tenants/Tenants.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {PoolsGraph} from '../../components/PoolsGraph/PoolsGraph';
88
import {TabletsStatistic} from '../../components/TabletsStatistic';
99
import {ProblemFilter} from '../../components/ProblemFilter';
1010
import {Illustration} from '../../components/Illustration';
11+
import {EntitiesCount} from '../../components/EntitiesCount';
1112
import {Search} from '../../components/Search';
1213
import {TableWithControlsLayout} from '../../components/TableWithControlsLayout/TableWithControlsLayout';
1314
import {ResponseError} from '../../components/Errors/ResponseError';
@@ -47,7 +48,7 @@ interface TenantsProps {
4748
export const Tenants = ({additionalTenantsProps}: TenantsProps) => {
4849
const dispatch = useTypedDispatch();
4950

50-
const {error, loading, wasLoaded} = useTypedSelector((state) => state.tenants);
51+
const {error, loading, wasLoaded, tenants} = useTypedSelector((state) => state.tenants);
5152
const searchValue = useTypedSelector(selectTenantsSearchValue);
5253
const filteredTenants = useTypedSelector(selectFilteredTenants);
5354
const problemFilter = useTypedSelector(selectProblemFilter);
@@ -78,6 +79,12 @@ export const Tenants = ({additionalTenantsProps}: TenantsProps) => {
7879
className={b('search')}
7980
/>
8081
<ProblemFilter value={problemFilter} onChange={handleProblemFilterChange} />
82+
<EntitiesCount
83+
total={tenants.length}
84+
current={filteredTenants?.length || 0}
85+
label={'Databases'}
86+
loading={loading && !wasLoaded}
87+
/>
8188
</>
8289
);
8390
};

0 commit comments

Comments
 (0)