File tree Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Expand file tree Collapse file tree 2 files changed +16
-13
lines changed Original file line number Diff line number Diff line change @@ -6,10 +6,12 @@ import {PDiskPopup} from '../../../components/PDiskPopup/PDiskPopup';
66import { VDiskWithDonorsStack } from '../../../components/VDisk/VDiskWithDonorsStack' ;
77import routes , { createHref , getPDiskPagePath } from '../../../routes' ;
88import { useDiskPagesAvailable } from '../../../store/reducers/capabilities/hooks' ;
9+ import { selectNodesMap } from '../../../store/reducers/nodesList' ;
910import { valueIsDefined } from '../../../utils' ;
1011import { cn } from '../../../utils/cn' ;
1112import { stringifyVdiskId } from '../../../utils/dataFormatters/dataFormatters' ;
1213import type { PreparedPDisk , PreparedVDisk } from '../../../utils/disks/types' ;
14+ import { useTypedSelector } from '../../../utils/hooks' ;
1315import { STRUCTURE } from '../../Node/NodePages' ;
1416
1517import './PDisk.scss' ;
@@ -39,6 +41,7 @@ export const PDisk = ({
3941} : PDiskProps ) => {
4042 const [ isPopupVisible , setIsPopupVisible ] = React . useState ( false ) ;
4143
44+ const nodes = useTypedSelector ( selectNodesMap ) ;
4245 const diskPagesAvailable = useDiskPagesAvailable ( ) ;
4346
4447 const anchor = React . useRef ( null ) ;
@@ -115,7 +118,12 @@ export const PDisk = ({
115118 < div className = { b ( 'media-type' ) } > { data . Type } </ div >
116119 </ InternalLink >
117120 </ div >
118- < PDiskPopup data = { data } anchorRef = { anchor } open = { isPopupVisible || showPopup } />
121+ < PDiskPopup
122+ data = { data }
123+ nodes = { nodes }
124+ anchorRef = { anchor }
125+ open = { isPopupVisible || showPopup }
126+ />
119127 </ React . Fragment >
120128 ) ;
121129} ;
Original file line number Diff line number Diff line change 11import DataTable from '@gravity-ui/react-data-table' ;
22
33import { NodeHostWrapper } from '../../../../components/NodeHostWrapper/NodeHostWrapper' ;
4- import type { AdditionalNodesProps } from '../../../../types/additionalProps' ;
54import { cn } from '../../../../utils/cn' ;
65import { EMPTY_DATA_PLACEHOLDER } from '../../../../utils/constants' ;
76import { isSortableNodesProperty } from '../../../../utils/nodes' ;
@@ -14,11 +13,11 @@ import './StorageNodesColumns.scss';
1413
1514const b = cn ( 'ydb-storage-nodes-columns' ) ;
1615
17- const getStorageNodesColumns = (
18- additionalNodesProps : AdditionalNodesProps | undefined ,
19- database ?: string ,
20- groupId ?: string ,
21- ) => {
16+ const getStorageNodesColumns = ( {
17+ additionalNodesProps,
18+ database,
19+ groupId,
20+ } : GetStorageNodesColumnsParams ) => {
2221 const getNodeRef = additionalNodesProps ?. getNodeRef ;
2322
2423 const columns : StorageNodesColumn [ ] = [
@@ -107,12 +106,8 @@ const getStorageNodesColumns = (
107106 return columns ;
108107} ;
109108
110- export const getPreparedStorageNodesColumns = ( {
111- additionalNodesProps,
112- database,
113- groupId,
114- } : GetStorageNodesColumnsParams ) => {
115- const rawColumns = getStorageNodesColumns ( additionalNodesProps , database , groupId ) ;
109+ export const getPreparedStorageNodesColumns = ( params : GetStorageNodesColumnsParams ) => {
110+ const rawColumns = getStorageNodesColumns ( params ) ;
116111
117112 const sortableColumns = rawColumns . map ( ( column ) => ( {
118113 ...column ,
You can’t perform that action at this time.
0 commit comments