@@ -8,13 +8,16 @@ import {EFlag} from '../../types/api/enums';
8
8
import { valueIsDefined } from '../../utils' ;
9
9
import { cn } from '../../utils/cn' ;
10
10
import { EMPTY_DATA_PLACEHOLDER } from '../../utils/constants' ;
11
+ import { stringifyVdiskId } from '../../utils/dataFormatters/dataFormatters' ;
11
12
import { isFullVDiskData } from '../../utils/disks/helpers' ;
12
13
import type { PreparedVDisk , UnavailableDonor } from '../../utils/disks/types' ;
13
14
import { useTypedSelector } from '../../utils/hooks' ;
14
15
import { bytesToGB , bytesToSpeed } from '../../utils/utils' ;
15
16
import type { InfoViewerItem } from '../InfoViewer' ;
16
17
import { InfoViewer } from '../InfoViewer' ;
18
+ import { InternalLink } from '../InternalLink' ;
17
19
import { preparePDiskData } from '../PDiskPopup/PDiskPopup' ;
20
+ import { getVDiskLink } from '../VDisk/utils' ;
18
21
19
22
import './VDiskPopup.scss' ;
20
23
@@ -146,6 +149,30 @@ export const VDiskPopup = ({data, ...props}: VDiskPopupProps) => {
146
149
[ data , nodeHost , isFullData ] ,
147
150
) ;
148
151
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
+
149
176
return (
150
177
< Popup
151
178
contentClassName = { b ( ) }
@@ -159,6 +186,7 @@ export const VDiskPopup = ({data, ...props}: VDiskPopupProps) => {
159
186
{ data . DonorMode && < Label className = { b ( 'donor-label' ) } > Donor</ Label > }
160
187
< InfoViewer title = "VDisk" info = { vdiskInfo } size = "s" />
161
188
{ pdiskInfo && < InfoViewer title = "PDisk" info = { pdiskInfo } size = "s" /> }
189
+ { donorsInfo . length > 0 && < InfoViewer title = "Donors" info = { donorsInfo } size = "s" /> }
162
190
</ Popup >
163
191
) ;
164
192
} ;
0 commit comments