Skip to content

Commit 9f1e412

Browse files
committed
chore: make prop for deployment app type required in status breakdown component
1 parent a8e5055 commit 9f1e412

4 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/Shared/Components/AppStatusModal/AppStatusBody.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ export const AppStatusBody = ({
192192
isVirtualEnvironment={appDetails.isVirtualEnvironment}
193193
appDetails={appDetails}
194194
rootClassName="pb-20"
195+
deploymentAppType={appDetails.deploymentAppType}
195196
/>
196197
)}
197198
</div>

src/Shared/Components/CICDHistory/DeploymentStatusBreakdown.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ const DeploymentStatusDetailBreakdown = ({
6060
{(
6161
[
6262
TIMELINE_STATUS.GIT_COMMIT,
63-
...(appDetails.deploymentAppType === DeploymentAppTypes.ARGO ||
64-
deploymentAppType === DeploymentAppTypes.ARGO
63+
...(deploymentAppType === DeploymentAppTypes.ARGO
6564
? [TIMELINE_STATUS.ARGOCD_SYNC, TIMELINE_STATUS.KUBECTL_APPLY]
6665
: []),
6766
] as DeploymentStatusDetailRowType['type'][]

src/Shared/Components/CICDHistory/types.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ export interface DeploymentStatusDetailBreakdownType {
522522
*/
523523
appDetails: AppDetails | null
524524
rootClassName?: string
525-
deploymentAppType?: DeploymentAppTypes
525+
deploymentAppType: DeploymentAppTypes
526526
}
527527

528528
export interface DeploymentStatusDetailRowType extends Pick<DeploymentStatusDetailBreakdownType, 'appDetails'> {

src/Shared/Components/DeploymentStatusBreakdown/utils.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,17 @@ const processKubeCTLApply = (
230230
* This function processes the deployment status details data and returns a breakdown of the deployment status.
231231
* Cases it handles:
232232
* 1. If timelines are not present, say the case of helm deployment, we will parse the wfrStatus and put the status and basic deployment info [triggeredBy, deploymentStartedOn, deploymentFinishedOn] into the breakdown data and return it.
233-
* 2. In case of gitops:
233+
* 2. In case of argo_cd:
234234
* - There are five timelines in chronological order:
235235
* - Deployment Initiated
236236
* - Git commit
237237
* - ArgoCD Sync
238238
* - Kubectl Apply
239239
* - App Health
240+
* In case of flux_cd
241+
* - Deployment Initiated
242+
* - Git commit
243+
* - App Health
240244
* - Basic flow is we traverse the timelines in order, if find the last status for that specific timeline from response by traversing the timelines in reverse order.
241245
* - If element is found, we will parse the status and set the icon, display text, time, etc. for that timeline and set the next timeline to inprogress.
242246
* - If element is not found, we will parse on basis of factors like:

0 commit comments

Comments
 (0)