15
15
*/
16
16
17
17
import { Fragment } from 'react'
18
- import { useRouteMatch } from 'react-router-dom'
19
18
20
19
import { TIMELINE_STATUS } from '@Shared/types'
21
20
22
- import { URLS } from '../../../Common'
23
- import ErrorBar from '../Error/ErrorBar'
24
21
import { DeploymentStatusDetailRow } from './DeploymentStatusDetailRow'
25
22
import { DeploymentStatusDetailBreakdownType , DeploymentStatusDetailRowType } from './types'
26
23
@@ -31,7 +28,6 @@ const DeploymentStatusDetailBreakdown = ({
31
28
isVirtualEnvironment,
32
29
appDetails,
33
30
} : DeploymentStatusDetailBreakdownType ) => {
34
- const { url } = useRouteMatch ( )
35
31
const isHelmManifestPushed =
36
32
deploymentStatusDetailsBreakdownData . deploymentStatusBreakdown [
37
33
TIMELINE_STATUS . HELM_MANIFEST_PUSHED_TO_HELM_REPO
@@ -44,56 +40,51 @@ const DeploymentStatusDetailBreakdown = ({
44
40
}
45
41
46
42
return (
47
- < >
48
- { ! url . includes ( `/${ URLS . CD_DETAILS } ` ) && < ErrorBar appDetails = { appDetails } /> }
49
- < div className = "deployment-status-breakdown-container" data-testid = "deployment-history-steps-status" >
50
- < DeploymentStatusDetailRow
51
- type = { TIMELINE_STATUS . DEPLOYMENT_INITIATED }
52
- { ...deploymentStatusDetailRowProps }
53
- />
54
- { ! (
55
- isVirtualEnvironment &&
56
- deploymentStatusDetailsBreakdownData . deploymentStatusBreakdown [
57
- TIMELINE_STATUS . HELM_PACKAGE_GENERATED
58
- ]
59
- ) ? (
60
- < >
61
- { (
62
- [
63
- TIMELINE_STATUS . GIT_COMMIT ,
64
- TIMELINE_STATUS . ARGOCD_SYNC ,
65
- TIMELINE_STATUS . KUBECTL_APPLY ,
66
- ] as DeploymentStatusDetailRowType [ 'type' ] [ ]
67
- ) . map ( ( timelineStatus ) => (
68
- < Fragment key = { timelineStatus } >
69
- < DeploymentStatusDetailRow type = { timelineStatus } { ...deploymentStatusDetailRowProps } />
70
- </ Fragment >
71
- ) ) }
43
+ < div className = "deployment-status-breakdown-container" data-testid = "deployment-history-steps-status" >
44
+ < DeploymentStatusDetailRow
45
+ type = { TIMELINE_STATUS . DEPLOYMENT_INITIATED }
46
+ { ...deploymentStatusDetailRowProps }
47
+ />
48
+ { ! (
49
+ isVirtualEnvironment &&
50
+ deploymentStatusDetailsBreakdownData . deploymentStatusBreakdown [ TIMELINE_STATUS . HELM_PACKAGE_GENERATED ]
51
+ ) ? (
52
+ < >
53
+ { (
54
+ [
55
+ TIMELINE_STATUS . GIT_COMMIT ,
56
+ TIMELINE_STATUS . ARGOCD_SYNC ,
57
+ TIMELINE_STATUS . KUBECTL_APPLY ,
58
+ ] as DeploymentStatusDetailRowType [ 'type' ] [ ]
59
+ ) . map ( ( timelineStatus ) => (
60
+ < Fragment key = { timelineStatus } >
61
+ < DeploymentStatusDetailRow type = { timelineStatus } { ...deploymentStatusDetailRowProps } />
62
+ </ Fragment >
63
+ ) ) }
72
64
65
+ < DeploymentStatusDetailRow
66
+ type = { TIMELINE_STATUS . APP_HEALTH }
67
+ hideVerticalConnector
68
+ { ...deploymentStatusDetailRowProps }
69
+ />
70
+ </ >
71
+ ) : (
72
+ < >
73
+ < DeploymentStatusDetailRow
74
+ type = { TIMELINE_STATUS . HELM_PACKAGE_GENERATED }
75
+ hideVerticalConnector = { ! isHelmManifestPushed }
76
+ { ...deploymentStatusDetailRowProps }
77
+ />
78
+ { isHelmManifestPushed && (
73
79
< DeploymentStatusDetailRow
74
- type = { TIMELINE_STATUS . APP_HEALTH }
80
+ type = { TIMELINE_STATUS . HELM_MANIFEST_PUSHED_TO_HELM_REPO }
75
81
hideVerticalConnector
76
82
{ ...deploymentStatusDetailRowProps }
77
83
/>
78
- </ >
79
- ) : (
80
- < >
81
- < DeploymentStatusDetailRow
82
- type = { TIMELINE_STATUS . HELM_PACKAGE_GENERATED }
83
- hideVerticalConnector = { ! isHelmManifestPushed }
84
- { ...deploymentStatusDetailRowProps }
85
- />
86
- { isHelmManifestPushed && (
87
- < DeploymentStatusDetailRow
88
- type = { TIMELINE_STATUS . HELM_MANIFEST_PUSHED_TO_HELM_REPO }
89
- hideVerticalConnector
90
- { ...deploymentStatusDetailRowProps }
91
- />
92
- ) }
93
- </ >
94
- ) }
95
- </ div >
96
- </ >
84
+ ) }
85
+ </ >
86
+ ) }
87
+ </ div >
97
88
)
98
89
}
99
90
0 commit comments