Skip to content

Commit 75e60e5

Browse files
committed
fix: move the condition to add success where for argoCD sync if kubectl-apply is there
1 parent f48d7c4 commit 75e60e5

File tree

1 file changed

+6
-6
lines changed
  • src/components/app/details/appDetails

1 file changed

+6
-6
lines changed

src/components/app/details/appDetails/utils.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,12 @@ export const processDeploymentStatusDetailsData = (
544544
}
545545
deploymentData.deploymentError = `Below resources did not become healthy within 10 mins. Resource status shown below was last fetched ${lastFetchedTime}. ${data.statusFetchCount} retries failed.`
546546
} else if (element['status'].includes(TIMELINE_STATUS.KUBECTL_APPLY)) {
547+
if (!isArgoCDAvailable) {
548+
deploymentData.deploymentStatusBreakdown.ARGOCD_SYNC.icon = 'success'
549+
deploymentData.deploymentStatusBreakdown.ARGOCD_SYNC.displaySubText = ''
550+
deploymentData.deploymentStatusBreakdown.ARGOCD_SYNC.time = element['statusTime']
551+
}
552+
547553
if (element?.resourceDetails) {
548554
deploymentPhases.forEach((phase) => {
549555
for (let item of element.resourceDetails) {
@@ -611,12 +617,6 @@ export const processDeploymentStatusDetailsData = (
611617
}
612618
})
613619
}
614-
615-
if (!isArgoCDAvailable) {
616-
deploymentData.deploymentStatusBreakdown.ARGOCD_SYNC.icon = 'success'
617-
deploymentData.deploymentStatusBreakdown.ARGOCD_SYNC.displaySubText = ''
618-
deploymentData.deploymentStatusBreakdown.ARGOCD_SYNC.time = element['statusTime']
619-
}
620620
} else if (element['status'] === TIMELINE_STATUS.KUBECTL_APPLY_SYNCED) {
621621
deploymentData.deploymentStatusBreakdown.KUBECTL_APPLY.resourceDetails = []
622622
deploymentData.deploymentStatusBreakdown.KUBECTL_APPLY.displaySubText = ''

0 commit comments

Comments
 (0)