@@ -515,6 +515,32 @@ const DeployImageContent = ({
515
515
)
516
516
} )
517
517
518
+ const renderMaterialListEmptyState = ( ) => (
519
+ < div className = "flexbox-col flex-grow-1 dc__overflow-auto h-100" >
520
+ < MaterialListEmptyState
521
+ isRollbackTrigger = { isRollbackTrigger }
522
+ stageType = { stageType }
523
+ appId = { appId }
524
+ isSearchApplied = { isSearchApplied }
525
+ policyConsequences = { policyConsequences }
526
+ isTriggerBlockedDueToPlugin = { isTriggerBlockedDueToPlugin }
527
+ configurePluginURL = { configurePluginURL }
528
+ isConsumedImagePresent = { consumedImage . length > 0 }
529
+ envName = { envName }
530
+ materialResponse = { materialResponse }
531
+ isExceptionUser = { isExceptionUser }
532
+ isLoadingMore = { isLoadingOlderImages }
533
+ viewAllImages = { viewAllImages }
534
+ triggerType = { triggerType }
535
+ loadOlderImages = { loadOlderImages }
536
+ onSearchApply = { onSearchApply }
537
+ eligibleImagesCount = { eligibleImagesCount }
538
+ handleEnableFiltersView = { handleShowConfiguredFilters }
539
+ handleAllImagesView = { handleAllImagesView }
540
+ />
541
+ </ div >
542
+ )
543
+
518
544
const renderContent = ( ) => {
519
545
if ( isBulkTrigger ) {
520
546
if ( showFiltersView ) {
@@ -596,33 +622,9 @@ const DeployImageContent = ({
596
622
</ div >
597
623
</ div >
598
624
599
- { materialList . length === 0 ? (
600
- < div className = "flexbox-col flex-grow-1 dc__overflow-auto h-100" >
601
- < MaterialListEmptyState
602
- isRollbackTrigger = { isRollbackTrigger }
603
- stageType = { stageType }
604
- appId = { appId }
605
- isSearchApplied = { isSearchApplied }
606
- policyConsequences = { policyConsequences }
607
- isTriggerBlockedDueToPlugin = { isTriggerBlockedDueToPlugin }
608
- configurePluginURL = { configurePluginURL }
609
- isConsumedImagePresent = { consumedImage . length > 0 }
610
- envName = { envName }
611
- materialResponse = { materialResponse }
612
- isExceptionUser = { isExceptionUser }
613
- isLoadingMore = { isLoadingOlderImages }
614
- viewAllImages = { viewAllImages }
615
- triggerType = { triggerType }
616
- loadOlderImages = { loadOlderImages }
617
- onSearchApply = { onSearchApply }
618
- eligibleImagesCount = { eligibleImagesCount }
619
- handleEnableFiltersView = { handleShowConfiguredFilters }
620
- handleAllImagesView = { handleAllImagesView }
621
- />
622
- </ div >
623
- ) : (
624
- renderMaterialList ( materialList , false )
625
- ) }
625
+ { materialList . length === 0
626
+ ? renderMaterialListEmptyState ( )
627
+ : renderMaterialList ( materialList , false ) }
626
628
627
629
{ ! areNoMoreImagesPresent && ! ! materialList ?. length && (
628
630
< button
@@ -656,6 +658,10 @@ const DeployImageContent = ({
656
658
return renderConfiguredFilters ( )
657
659
}
658
660
661
+ if ( materials . length === 0 && ! isBulkTrigger ) {
662
+ return renderMaterialListEmptyState ( )
663
+ }
664
+
659
665
return (
660
666
< >
661
667
{ ! showFiltersView &&
0 commit comments