@@ -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,15 @@ function StorageNodesComponent({
6061 database,
6162 nodeId,
6263 groupId,
64+ viewContext,
6365 parentContainer,
6466} : PaginatedStorageProps ) {
6567 const { searchValue, visibleEntities, nodesUptimeFilter, handleShowAllNodes} =
6668 useStorageQueryParams ( ) ;
6769
6870 const { columnsToShow, columnsToSelect, setColumns} = useStorageNodesColumnsToSelect ( {
6971 database,
70- groupId : groupId ?. toString ( ) ,
72+ viewContext ,
7173 } ) ;
7274
7375 const renderControls : RenderControls = ( { totalEntities, foundEntities, inited} ) => {
@@ -101,14 +103,19 @@ function StorageNodesComponent({
101103 ) ;
102104}
103105
104- function GroupedStorageNodesComponent ( { database, groupId, nodeId} : PaginatedStorageProps ) {
106+ function GroupedStorageNodesComponent ( {
107+ database,
108+ groupId,
109+ nodeId,
110+ viewContext,
111+ } : PaginatedStorageProps ) {
105112 const [ autoRefreshInterval ] = useAutoRefreshInterval ( ) ;
106113
107114 const { searchValue, storageNodesGroupByParam, handleShowAllNodes} = useStorageQueryParams ( ) ;
108115
109116 const { columnsToShow, columnsToSelect, setColumns} = useStorageNodesColumnsToSelect ( {
110117 database,
111- groupId : groupId ?. toString ( ) ,
118+ viewContext ,
112119 } ) ;
113120
114121 const { currentData, isFetching, error} = storageApi . useGetStorageNodesInfoQuery (
@@ -193,10 +200,10 @@ function GroupedStorageNodesComponent({database, groupId, nodeId}: PaginatedStor
193200
194201function useStorageNodesColumnsToSelect ( {
195202 database,
196- groupId ,
203+ viewContext ,
197204} : {
198205 database ?: string ;
199- groupId ?: string ;
206+ viewContext : StorageViewContext ;
200207} ) {
201208 const { balancer} = useClusterBaseInfo ( ) ;
202209 const { additionalNodesProps} = useAdditionalNodeProps ( { balancer} ) ;
@@ -206,6 +213,6 @@ function useStorageNodesColumnsToSelect({
206213 additionalNodesProps,
207214 visibleEntities,
208215 database,
209- groupId ,
216+ viewContext ,
210217 } ) ;
211218}
0 commit comments