@@ -17,6 +17,7 @@ import { importComponentFromFELibrary, useAsync } from '../../../../common'
1717import { DeploymentAppTypes , noop } from '@devtron-labs/devtron-fe-common-lib'
1818import DeploymentStatusCard from '../../../../app/details/appDetails/DeploymentStatusCard'
1919import { EnvironmentStatusComponentType } from '../environment.type'
20+ import HelmAppConfigApplyStatusCard from './HelmAppConfigApplyStatusCard'
2021
2122const AppDetailsDownloadCard = importComponentFromFELibrary ( 'AppDetailsDownloadCard' )
2223
@@ -78,7 +79,7 @@ function EnvironmentStatusComponent({
7879 }
7980
8081 const renderStatusBlock = ( ) => {
81- return (
82+ return status ? (
8283 < div
8384 className = "app-status-card bcn-0 mr-12 br-8 p-16 cursor "
8485 onClick = { loadingResourceTree ? noop : handleShowAppStatusDetail }
@@ -112,45 +113,22 @@ function EnvironmentStatusComponent({
112113 </ >
113114 ) }
114115 </ div >
115- )
116+ ) : null
116117 }
117118
118119 const onClickShowNotes = ( ) => {
119120 setShowNotes ( true )
120121 }
121122
122123 const renderHelmConfigApplyStatusBlock = ( ) => {
123- return (
124- appDetails ?. appType == AppType . EXTERNAL_HELM_CHART && (
125- < div className = "app-status-card bcn-0 mr-12 br-8 p-16 " >
126- < div className = "cn-9 flex left" >
127- < span > Config apply status</ span >
128- < Tippy
129- className = "default-tt cursor"
130- arrow = { false }
131- content = { 'Whether or not your last helm install was successful' }
132- >
133- < Question className = "cursor icon-dim-16 ml-4" />
134- </ Tippy >
135- </ div >
136- < div
137- className = { `f-${ appDetails . additionalData [
138- 'status'
139- ] . toLowerCase ( ) } dc__capitalize fw-6 fs-14 flex left`}
140- >
141- < span > { appDetails . additionalData [ 'status' ] } </ span >
142- < figure
143- className = { `${ appDetails . additionalData [
144- 'status'
145- ] . toLowerCase ( ) } dc__app-summary__icon ml-8 icon-dim-20`}
146- > </ figure >
147- </ div >
148- < div className = "cn-9 flex left" >
149- < span > { appDetails . additionalData [ 'message' ] } </ span >
150- </ div >
151- </ div >
152- )
153- )
124+ if (
125+ appDetails ?. appType === AppType . EXTERNAL_HELM_CHART ||
126+ ( appDetails ?. deploymentAppType === DeploymentAppTypes . HELM &&
127+ appDetails ?. appType === AppType . DEVTRON_HELM_CHART )
128+ ) {
129+ return < HelmAppConfigApplyStatusCard releaseStatus = { appDetails . helmReleaseStatus } />
130+ }
131+ return null
154132 }
155133
156134 const renderGeneratedManifestDownloadCard = ( ) : JSX . Element => {
0 commit comments