Skip to content

Commit 91015a1

Browse files
committed
feat: Update processKubeCTLApply to handle resource details from KUBECTL_APPLY_STARTED timeline
1 parent c1151ca commit 91015a1

File tree

1 file changed

+8
-2
lines changed
  • src/Shared/Components/DeploymentStatusBreakdown

1 file changed

+8
-2
lines changed

src/Shared/Components/DeploymentStatusBreakdown/utils.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,16 @@ const processKubeCTLApply = (
130130
currentTableData: [{ icon: 'success', message: 'Started by Argo CD' }],
131131
}
132132

133-
if (element.resourceDetails) {
133+
// Resource details are present in KUBECTL_APPLY_STARTED timeline alone
134+
const resourceDetails = data?.timelines?.find(
135+
(item) => item.status === TIMELINE_STATUS.KUBECTL_APPLY_STARTED,
136+
)?.resourceDetails
137+
138+
if (resourceDetails) {
139+
// TODO: Confirm this logic since, can have duplication
134140
// Used to parse resource details base struct with current phase as last phase
135141
DEPLOYMENT_PHASES.forEach((phase) => {
136-
element.resourceDetails.forEach((item) => {
142+
resourceDetails.forEach((item) => {
137143
if (phase === item.resourcePhase) {
138144
tableData.currentPhase = phase
139145
tableData.currentTableData.push({

0 commit comments

Comments
 (0)