File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
static/app/views/preprod/utils Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import {formatBytesBase10} from 'sentry/utils/bytes/formatBytesBase10';
33import { unreachable } from 'sentry/utils/unreachable' ;
44import {
55 BuildDetailsArtifactType ,
6+ getPrimarySizeMetric ,
67 isSizeInfoCompleted ,
78 type BuildDetailsApiResponse ,
89} from 'sentry/views/preprod/types/buildDetailsTypes' ;
@@ -116,14 +117,16 @@ export function getReadablePlatformLabel(platform: Platform): string {
116117
117118export function formattedInstallSize ( build : BuildDetailsApiResponse ) : string {
118119 if ( isSizeInfoCompleted ( build ?. size_info ) ) {
119- return formatBytesBase10 ( build . size_info . install_size_bytes ) ;
120+ const primarySizeMetric = getPrimarySizeMetric ( build . size_info ) ;
121+ return formatBytesBase10 ( primarySizeMetric ?. install_size_bytes ?? 0 ) ;
120122 }
121123 return '-' ;
122124}
123125
124126export function formattedDownloadSize ( build : BuildDetailsApiResponse ) : string {
125127 if ( isSizeInfoCompleted ( build ?. size_info ) ) {
126- return formatBytesBase10 ( build . size_info . download_size_bytes ) ;
128+ const primarySizeMetric = getPrimarySizeMetric ( build . size_info ) ;
129+ return formatBytesBase10 ( primarySizeMetric ?. download_size_bytes ?? 0 ) ;
127130 }
128131 return '-' ;
129132}
You can’t perform that action at this time.
0 commit comments