@@ -24,10 +24,14 @@ interface MountData {
2424}
2525
2626const DiskUsageCard : React . FC < DiskUsageCardProps > = ( { systemStats } ) => {
27- const { data : disk , isLoading, t } = useSystemMetric ( {
27+ const {
28+ data : disk ,
29+ isLoading,
30+ t
31+ } = useSystemMetric ( {
2832 systemStats,
2933 extractData : ( stats ) => stats . disk ,
30- defaultData : DEFAULT_METRICS . disk ,
34+ defaultData : DEFAULT_METRICS . disk
3135 } ) ;
3236
3337 return (
@@ -39,10 +43,7 @@ const DiskUsageCard: React.FC<DiskUsageCardProps> = ({ systemStats }) => {
3943 >
4044 < div className = "space-y-2 sm:space-y-3" >
4145 < div className = "w-full h-2 bg-gray-200 rounded-full" >
42- < div
43- className = { `h-2 rounded-full bg-primary` }
44- style = { { width : `${ disk . percentage } %` } }
45- />
46+ < div className = { `h-2 rounded-full bg-primary` } style = { { width : `${ disk . percentage } %` } } />
4647 </ div >
4748 < div className = "flex justify-between" >
4849 < TypographyMuted className = "text-xs truncate max-w-[80px] sm:max-w-[100px]" >
@@ -74,36 +75,28 @@ function DiskMountsTable({ mounts }: { mounts: MountData[] }) {
7475 title : t ( 'dashboard.disk.table.headers.mount' ) ,
7576 dataIndex : 'mountPoint' ,
7677 className : 'text-xs pr-1 sm:pr-2' ,
77- render : ( mountPoint ) => (
78- < TypographySmall className = "text-xs" > { mountPoint } </ TypographySmall >
79- )
78+ render : ( mountPoint ) => < TypographySmall className = "text-xs" > { mountPoint } </ TypographySmall >
8079 } ,
8180 {
8281 key : 'size' ,
8382 title : t ( 'dashboard.disk.table.headers.size' ) ,
8483 dataIndex : 'size' ,
8584 className : 'text-xs pr-1 sm:pr-2' ,
86- render : ( size ) => (
87- < TypographySmall className = "text-xs" > { size } </ TypographySmall >
88- )
85+ render : ( size ) => < TypographySmall className = "text-xs" > { size } </ TypographySmall >
8986 } ,
9087 {
9188 key : 'used' ,
9289 title : t ( 'dashboard.disk.table.headers.used' ) ,
9390 dataIndex : 'used' ,
9491 className : 'text-xs pr-1 sm:pr-2' ,
95- render : ( used ) => (
96- < TypographySmall className = "text-xs" > { used } </ TypographySmall >
97- )
92+ render : ( used ) => < TypographySmall className = "text-xs" > { used } </ TypographySmall >
9893 } ,
9994 {
10095 key : 'capacity' ,
10196 title : t ( 'dashboard.disk.table.headers.percentage' ) ,
10297 dataIndex : 'capacity' ,
10398 className : 'text-xs' ,
104- render : ( capacity ) => (
105- < TypographySmall className = "text-xs" > { capacity } </ TypographySmall >
106- )
99+ render : ( capacity ) => < TypographySmall className = "text-xs" > { capacity } </ TypographySmall >
107100 }
108101 ] ;
109102
0 commit comments