@@ -22,6 +22,7 @@ import {TableGroup} from './TableGroup/TableGroup';
2222import { useExpandedGroups } from './TableGroup/useExpandedTableGroups' ;
2323import i18n from './i18n' ;
2424import { b , renderPaginatedTableErrorMessage } from './shared' ;
25+ import type { StorageViewContext } from './types' ;
2526import { useStorageQueryParams } from './useStorageQueryParams' ;
2627
2728import './Storage.scss' ;
@@ -60,14 +61,16 @@ function StorageNodesComponent({
6061 database,
6162 nodeId,
6263 groupId,
64+ viewContext,
6365 parentContainer,
66+ initialEntitiesCount,
6467} : PaginatedStorageProps ) {
6568 const { searchValue, visibleEntities, nodesUptimeFilter, handleShowAllNodes} =
6669 useStorageQueryParams ( ) ;
6770
6871 const { columnsToShow, columnsToSelect, setColumns} = useStorageNodesColumnsToSelect ( {
6972 database,
70- groupId : groupId ?. toString ( ) ,
73+ viewContext ,
7174 } ) ;
7275
7376 const renderControls : RenderControls = ( { totalEntities, foundEntities, inited} ) => {
@@ -97,18 +100,24 @@ function StorageNodesComponent({
97100 renderControls = { renderControls }
98101 renderErrorMessage = { renderPaginatedTableErrorMessage }
99102 columns = { columnsToShow }
103+ initialEntitiesCount = { initialEntitiesCount }
100104 />
101105 ) ;
102106}
103107
104- function GroupedStorageNodesComponent ( { database, groupId, nodeId} : PaginatedStorageProps ) {
108+ function GroupedStorageNodesComponent ( {
109+ database,
110+ groupId,
111+ nodeId,
112+ viewContext,
113+ } : PaginatedStorageProps ) {
105114 const [ autoRefreshInterval ] = useAutoRefreshInterval ( ) ;
106115
107116 const { searchValue, storageNodesGroupByParam, handleShowAllNodes} = useStorageQueryParams ( ) ;
108117
109118 const { columnsToShow, columnsToSelect, setColumns} = useStorageNodesColumnsToSelect ( {
110119 database,
111- groupId : groupId ?. toString ( ) ,
120+ viewContext ,
112121 } ) ;
113122
114123 const { currentData, isFetching, error} = storageApi . useGetStorageNodesInfoQuery (
@@ -193,10 +202,10 @@ function GroupedStorageNodesComponent({database, groupId, nodeId}: PaginatedStor
193202
194203function useStorageNodesColumnsToSelect ( {
195204 database,
196- groupId ,
205+ viewContext ,
197206} : {
198207 database ?: string ;
199- groupId ?: string ;
208+ viewContext : StorageViewContext ;
200209} ) {
201210 const { balancer} = useClusterBaseInfo ( ) ;
202211 const { additionalNodesProps} = useAdditionalNodeProps ( { balancer} ) ;
@@ -206,6 +215,6 @@ function useStorageNodesColumnsToSelect({
206215 additionalNodesProps,
207216 visibleEntities,
208217 database,
209- groupId ,
218+ viewContext ,
210219 } ) ;
211220}
0 commit comments