@@ -8,13 +8,16 @@ import {EFlag} from '../../types/api/enums';
88import { valueIsDefined } from '../../utils' ;
99import { cn } from '../../utils/cn' ;
1010import { EMPTY_DATA_PLACEHOLDER } from '../../utils/constants' ;
11+ import { stringifyVdiskId } from '../../utils/dataFormatters/dataFormatters' ;
1112import { isFullVDiskData } from '../../utils/disks/helpers' ;
1213import type { PreparedVDisk , UnavailableDonor } from '../../utils/disks/types' ;
1314import { useTypedSelector } from '../../utils/hooks' ;
1415import { bytesToGB , bytesToSpeed } from '../../utils/utils' ;
1516import type { InfoViewerItem } from '../InfoViewer' ;
1617import { InfoViewer } from '../InfoViewer' ;
18+ import { InternalLink } from '../InternalLink' ;
1719import { preparePDiskData } from '../PDiskPopup/PDiskPopup' ;
20+ import { getVDiskLink } from '../VDisk/utils' ;
1821
1922import './VDiskPopup.scss' ;
2023
@@ -146,6 +149,30 @@ export const VDiskPopup = ({data, ...props}: VDiskPopupProps) => {
146149 [ data , nodeHost , isFullData ] ,
147150 ) ;
148151
152+ const donorsInfo : InfoViewerItem [ ] = [ ] ;
153+ if ( 'Donors' in data && data . Donors ) {
154+ const donors = data . Donors ;
155+ for ( const donor of donors ) {
156+ const isFullDonorData = isFullVDiskData ( donor ) ;
157+ donorsInfo . push ( {
158+ label : 'VDisk' ,
159+ value : (
160+ < InternalLink to = { getVDiskLink ( donor ) } >
161+ { stringifyVdiskId (
162+ isFullDonorData
163+ ? donor . VDiskId
164+ : {
165+ NodeId : donor . NodeId ,
166+ PDiskId : donor . PDiskId ,
167+ VSlotId : donor . VSlotId ,
168+ } ,
169+ ) }
170+ </ InternalLink >
171+ ) ,
172+ } ) ;
173+ }
174+ }
175+
149176 return (
150177 < Popup
151178 contentClassName = { b ( ) }
@@ -159,6 +186,7 @@ export const VDiskPopup = ({data, ...props}: VDiskPopupProps) => {
159186 { data . DonorMode && < Label className = { b ( 'donor-label' ) } > Donor</ Label > }
160187 < InfoViewer title = "VDisk" info = { vdiskInfo } size = "s" />
161188 { pdiskInfo && < InfoViewer title = "PDisk" info = { pdiskInfo } size = "s" /> }
189+ { donorsInfo . length > 0 && < InfoViewer title = "Donors" info = { donorsInfo } size = "s" /> }
162190 </ Popup >
163191 ) ;
164192} ;
0 commit comments