@@ -6,11 +6,10 @@ import {PDiskPopup} from '../../../components/PDiskPopup/PDiskPopup';
6
6
import { VDiskWithDonorsStack } from '../../../components/VDisk/VDiskWithDonorsStack' ;
7
7
import routes , { createHref , getPDiskPagePath } from '../../../routes' ;
8
8
import { useDiskPagesAvailable } from '../../../store/reducers/capabilities/hooks' ;
9
- import type { TVDiskStateInfo } from '../../../types/api/vdisk' ;
10
9
import { valueIsDefined } from '../../../utils' ;
11
10
import { cn } from '../../../utils/cn' ;
12
11
import { stringifyVdiskId } from '../../../utils/dataFormatters/dataFormatters' ;
13
- import type { PreparedPDisk } from '../../../utils/disks/types' ;
12
+ import type { PreparedPDisk , PreparedVDisk } from '../../../utils/disks/types' ;
14
13
import { STRUCTURE } from '../../Node/NodePages' ;
15
14
16
15
import './PDisk.scss' ;
@@ -19,12 +18,13 @@ const b = cn('pdisk-storage');
19
18
20
19
interface PDiskProps {
21
20
data ?: PreparedPDisk ;
22
- vDisks ?: TVDiskStateInfo [ ] ;
21
+ vDisks ?: PreparedVDisk [ ] ;
23
22
showPopup ?: boolean ;
24
23
onShowPopup ?: VoidFunction ;
25
24
onHidePopup ?: VoidFunction ;
26
25
className ?: string ;
27
26
progressBarClassName ?: string ;
27
+ groupId ?: string ;
28
28
}
29
29
30
30
export const PDisk = ( {
@@ -35,6 +35,7 @@ export const PDisk = ({
35
35
onHidePopup,
36
36
className,
37
37
progressBarClassName,
38
+ groupId,
38
39
} : PDiskProps ) => {
39
40
const [ isPopupVisible , setIsPopupVisible ] = React . useState ( false ) ;
40
41
@@ -75,8 +76,11 @@ export const PDisk = ({
75
76
>
76
77
< VDiskWithDonorsStack
77
78
data = { vdisk }
78
- compact = { true }
79
+ faded = {
80
+ groupId ? groupId !== vdisk . VDiskId ?. GroupID ?. toString ( ) : false
81
+ }
79
82
stackClassName = { b ( 'donors-stack' ) }
83
+ compact
80
84
/>
81
85
</ div >
82
86
) ;
0 commit comments