@@ -210,8 +210,7 @@ const Details: React.FC<DetailsType> = ({
210
210
211
211
const appDetailsFromIndexStore = IndexStore . getAppDetails ( )
212
212
213
- // fixme: the state is not being set anywhere and just being drilled down
214
- const [ detailedStatus , toggleDetailedStatus ] = useState < boolean > ( false )
213
+ const [ showAppStatusModal , setShowAppStatusModal ] = useState < boolean > ( false )
215
214
const [ resourceTreeFetchTimeOut , setResourceTreeFetchTimeOut ] = useState < boolean > ( false )
216
215
const [ urlInfo , setUrlInfo ] = useState < boolean > ( false )
217
216
const [ hibernateConfirmationModal , setHibernateConfirmationModal ] = useState < HibernationModalTypes > ( null )
@@ -293,7 +292,6 @@ const Details: React.FC<DetailsType> = ({
293
292
] ,
294
293
)
295
294
296
- // This method is called in case of gitops based deployment for polling
297
295
const getDeploymentDetailStepsData = useCallback ( ( ) : void => {
298
296
// Deployments status details for Devtron apps
299
297
getDeploymentStatusDetail ( params . appId , params . envId )
@@ -513,8 +511,8 @@ const Details: React.FC<DetailsType> = ({
513
511
}
514
512
515
513
const handleCloseAppStatusModal = ( ) : void => {
516
- if ( detailedStatus ) {
517
- toggleDetailedStatus ( false )
514
+ if ( showAppStatusModal ) {
515
+ setShowAppStatusModal ( false )
518
516
}
519
517
520
518
if ( location . search . includes ( DEPLOYMENT_STATUS_QUERY_PARAM ) ) {
@@ -525,7 +523,7 @@ const Details: React.FC<DetailsType> = ({
525
523
}
526
524
527
525
const showApplicationDetailedModal = ( ) : void => {
528
- toggleDetailedStatus ( true )
526
+ setShowAppStatusModal ( true )
529
527
}
530
528
531
529
const renderAppDetailsCDButton = ( ) =>
@@ -666,7 +664,7 @@ const Details: React.FC<DetailsType> = ({
666
664
>
667
665
< SourceInfo
668
666
appDetails = { appDetails }
669
- setDetailed = { toggleDetailedStatus }
667
+ setDetailed = { setShowAppStatusModal }
670
668
environment = { environment }
671
669
isAppView = { isAppView }
672
670
environments = { environments }
@@ -714,7 +712,7 @@ const Details: React.FC<DetailsType> = ({
714
712
) : (
715
713
renderAppDetails ( )
716
714
) }
717
- { ( detailedStatus || ( appDetails && location . search . includes ( DEPLOYMENT_STATUS_QUERY_PARAM ) ) ) && (
715
+ { ( showAppStatusModal || ( appDetails && location . search . includes ( DEPLOYMENT_STATUS_QUERY_PARAM ) ) ) && (
718
716
< AppStatusModal
719
717
titleSegments = { [ appDetailsFromIndexStore . appName , appDetailsFromIndexStore . environmentName ] }
720
718
handleClose = { handleCloseAppStatusModal }
@@ -723,7 +721,7 @@ const Details: React.FC<DetailsType> = ({
723
721
isConfigDriftEnabled = { isConfigDriftEnabled }
724
722
configDriftModal = { ConfigDriftModal }
725
723
initialTab = {
726
- detailedStatus ? AppStatusModalTabType . APP_STATUS : AppStatusModalTabType . DEPLOYMENT_STATUS
724
+ showAppStatusModal ? AppStatusModalTabType . APP_STATUS : AppStatusModalTabType . DEPLOYMENT_STATUS
727
725
}
728
726
processVirtualEnvironmentDeploymentData = { processVirtualEnvironmentDeploymentData }
729
727
handleUpdateDeploymentStatusDetailsBreakdownData = { handleUpdateDeploymentStatusDetailsBreakdownData }
0 commit comments