@@ -22,20 +22,20 @@ import {filterTreemapElement} from 'sentry/views/preprod/utils/treemapFiltering'
2222interface AppSizeTreemapProps {
2323 root : TreemapElement | null ;
2424 searchQuery : string ;
25- missingDsymBinaries ?: string [ ] ;
25+ alertMessage ?: string ;
2626 onSearchChange ?: ( query : string ) => void ;
2727 unfilteredRoot ?: TreemapElement ;
2828}
2929
3030function FullscreenModalContent ( {
3131 unfilteredRoot,
3232 initialSearch,
33- missingDsymBinaries ,
33+ alertMessage ,
3434 onSearchChange,
3535} : {
3636 initialSearch : string ;
3737 unfilteredRoot : TreemapElement ;
38- missingDsymBinaries ?: string [ ] ;
38+ alertMessage ?: string ;
3939 onSearchChange ?: ( query : string ) => void ;
4040} ) {
4141 const [ localSearch , setLocalSearch ] = useState ( initialSearch ) ;
@@ -74,7 +74,7 @@ function FullscreenModalContent({
7474 < AppSizeTreemap
7575 root = { filteredRoot }
7676 searchQuery = { localSearch }
77- missingDsymBinaries = { missingDsymBinaries }
77+ alertMessage = { alertMessage }
7878 />
7979 </ Container >
8080 </ Flex >
@@ -83,7 +83,7 @@ function FullscreenModalContent({
8383
8484export function AppSizeTreemap ( props : AppSizeTreemapProps ) {
8585 const theme = useTheme ( ) ;
86- const { root, searchQuery, unfilteredRoot, missingDsymBinaries , onSearchChange} = props ;
86+ const { root, searchQuery, unfilteredRoot, alertMessage , onSearchChange} = props ;
8787 const appSizeCategoryInfo = getAppSizeCategoryInfo ( theme ) ;
8888 const renderingContext = useContext ( ChartRenderingContext ) ;
8989 const isFullscreen = renderingContext ?. isFullscreen ?? false ;
@@ -314,24 +314,9 @@ export function AppSizeTreemap(props: AppSizeTreemapProps) {
314314 } ,
315315 } ;
316316
317- const hasMissingDsyms = missingDsymBinaries && missingDsymBinaries . length > 0 ;
318-
319- const getBinariesMessage = ( ) => {
320- if ( missingDsymBinaries ?. length === 1 ) {
321- return t (
322- 'Missing debug symbols for some binaries (%s). Those binaries will not have a detailed breakdown.' ,
323- missingDsymBinaries [ 0 ]
324- ) ;
325- }
326- return t (
327- 'Missing debug symbols for some binaries (%s and others). Those binaries will not have a detailed breakdown.' ,
328- missingDsymBinaries ! [ 0 ]
329- ) ;
330- } ;
331-
332317 return (
333318 < Flex direction = "column" gap = "sm" height = "100%" width = "100%" >
334- { hasMissingDsyms && < Alert type = "warning" > { getBinariesMessage ( ) } </ Alert > }
319+ { alertMessage && < Alert type = "warning" > { alertMessage } </ Alert > }
335320 < Container
336321 height = "100%"
337322 width = "100%"
@@ -379,15 +364,15 @@ export function AppSizeTreemap(props: AppSizeTreemapProps) {
379364 < FullscreenModalContent
380365 unfilteredRoot = { unfilteredRoot }
381366 initialSearch = { searchQuery }
382- missingDsymBinaries = { missingDsymBinaries }
367+ alertMessage = { alertMessage }
383368 onSearchChange = { onSearchChange }
384369 />
385370 ) : (
386371 < Container height = "100%" width = "100%" >
387372 < AppSizeTreemap
388373 root = { root }
389374 searchQuery = { searchQuery }
390- missingDsymBinaries = { missingDsymBinaries }
375+ alertMessage = { alertMessage }
391376 />
392377 </ Container >
393378 ) ,
0 commit comments