@@ -91,7 +91,7 @@ const ProgressiveSyncStatus = ({application}: {application: models.Application})
91
91
< div className = 'application-status-panel__item' >
92
92
{ sectionHeader ( {
93
93
title : 'PROGRESSIVE SYNC' ,
94
- helpContent : 'Shows the current status of progressive sync for applications managed by an ApplicationSet with RollingSync strategy .'
94
+ helpContent : 'Shows the current status of progressive sync for applications managed by an ApplicationSet.'
95
95
} ) }
96
96
< div className = 'application-status-panel__item-value' >
97
97
< i className = 'fa fa-exclamation-triangle' style = { { color : COLORS . sync . unknown } } /> Error
@@ -101,7 +101,14 @@ const ProgressiveSyncStatus = ({application}: {application: models.Application})
101
101
) ;
102
102
} }
103
103
load = { async ( ) => {
104
- const appSet = await services . applications . getApplicationSet ( appSetRef . name , application . metadata . namespace ) ;
104
+ // Find ApplicationSet by searching all namespaces dynamically
105
+ const appSetList = await services . applications . listApplicationSets ( ) ;
106
+ const appSet = appSetList . items ?. find ( item => item . metadata . name === appSetRef . name ) ;
107
+
108
+ if ( ! appSet ) {
109
+ throw new Error ( `ApplicationSet ${ appSetRef . name } not found in any namespace` ) ;
110
+ }
111
+
105
112
// Only return the ApplicationSet if it has a strategy (Progressive Sync enabled)
106
113
if ( appSet ?. spec ?. strategy ) {
107
114
return appSet ;
@@ -111,7 +118,7 @@ const ProgressiveSyncStatus = ({application}: {application: models.Application})
111
118
} } >
112
119
{ ( appSet : models . ApplicationSet | 'NO_STRATEGY' ) => {
113
120
if ( appSet === 'NO_STRATEGY' ) {
114
- // If the ApplicationSet has no strategy (Progressive Sync disabled), don't show Progressive Sync at all
121
+ // If the ApplicationSet has no strategy (Progressive Sync disabled), don't show Progressive Sync panel
115
122
return null ;
116
123
}
117
124
@@ -125,13 +132,16 @@ const ProgressiveSyncStatus = ({application}: {application: models.Application})
125
132
) ;
126
133
}
127
134
135
+ // Determine strategy type and display accordingly
136
+ const strategyType = appSet . spec ?. strategy ?. type || 'AllAtOnce' ;
137
+
128
138
// If no application status is found, show a default status
129
139
if ( ! appResource && ! appResourceFromResources ) {
130
140
return (
131
141
< div className = 'application-status-panel__item' >
132
142
{ sectionHeader ( {
133
143
title : 'PROGRESSIVE SYNC' ,
134
- helpContent : ' Shows the current status of progressive sync for applications managed by an ApplicationSet with RollingSync strategy.'
144
+ helpContent : ` Shows the current status of progressive sync for applications managed by an ApplicationSet with ${ strategyType } strategy.`
135
145
} ) }
136
146
< div className = 'application-status-panel__item-value' >
137
147
< i className = 'fa fa-clock' style = { { color : COLORS . sync . out_of_sync } } /> Waiting
@@ -140,9 +150,6 @@ const ProgressiveSyncStatus = ({application}: {application: models.Application})
140
150
</ div >
141
151
) ;
142
152
}
143
-
144
- // Determine strategy type and display accordingly
145
- const strategyType = appSet . spec ?. strategy ?. type || 'AllAtOnce' ;
146
153
const isRollingSync = strategyType === 'RollingSync' ;
147
154
148
155
// Use the appropriate resource based on strategy
0 commit comments