@@ -174,6 +174,7 @@ export class MultiClusterGridComponent implements OnInit, OnDestroy {
174
174
filteredCount : number = 0 ;
175
175
context ;
176
176
hasDiffManager : boolean = false ;
177
+ pendingTaskNum : number = 0 ;
177
178
178
179
get clusterCount ( ) {
179
180
return this . clusterData . clusters ! . length ;
@@ -192,15 +193,17 @@ export class MultiClusterGridComponent implements OnInit, OnDestroy {
192
193
}
193
194
194
195
set finishedNum ( value : number ) {
195
- if ( value === this . clusterCount && this . taskQueue . length === 0 ) {
196
- let componentVersions = this . rowData . map ( data => {
197
- data . component_versions ;
198
- } ) ;
199
- this . hasDiffManager = componentVersions . some ( ( ver ) => ver !== componentVersions [ 0 ] ) ;
196
+ if ( value === this . clusterCount && this . pendingTaskNum === 0 ) {
197
+ let componentVersions = this . rowData
198
+ . map ( data => data . component_versions )
199
+ . flatMap ( data => data ) ;
200
+ this . hasDiffManager = componentVersions . some (
201
+ ver => ver !== componentVersions [ 0 ]
202
+ ) ;
200
203
if ( this . hasDiffManager ) {
201
204
this . notificationService . open (
202
205
this . translate . instant ( 'multiCluster.HAS_INCOMPATIBLE_VERSION' ) ,
203
- GlobalConstant . NOTIFICATION_TYPE . ERROR
206
+ GlobalConstant . NOTIFICATION_TYPE . WARNING
204
207
) ;
205
208
}
206
209
}
@@ -268,6 +271,7 @@ export class MultiClusterGridComponent implements OnInit, OnDestroy {
268
271
} ;
269
272
270
273
this . _activeTaskNum = 0 ;
274
+ this . pendingTaskNum = 0 ;
271
275
this . finishedNum = 0 ;
272
276
}
273
277
@@ -280,6 +284,8 @@ export class MultiClusterGridComponent implements OnInit, OnDestroy {
280
284
) {
281
285
this . updateRow4Error ( rowNode , '' ) ;
282
286
this . _activeTaskNum -- ;
287
+ this . pendingTaskNum -- ;
288
+ this . finishedNum ++ ;
283
289
} else {
284
290
const params =
285
291
cluster . clusterType === MapConstant . FED_ROLES . MASTER
@@ -290,6 +296,8 @@ export class MultiClusterGridComponent implements OnInit, OnDestroy {
290
296
res => {
291
297
this . updateRow4Success ( index , rowNode , res ) ;
292
298
this . _activeTaskNum -- ;
299
+ this . pendingTaskNum -- ;
300
+ this . finishedNum ++ ;
293
301
} ,
294
302
error => {
295
303
console . error ( error ) ;
@@ -298,6 +306,8 @@ export class MultiClusterGridComponent implements OnInit, OnDestroy {
298
306
this . translate . instant ( 'multiCluster.messages.SCORE_UNAVAILIBlE' )
299
307
) ;
300
308
this . _activeTaskNum -- ;
309
+ this . pendingTaskNum -- ;
310
+ this . finishedNum ++ ;
301
311
}
302
312
) ;
303
313
}
@@ -333,6 +343,7 @@ export class MultiClusterGridComponent implements OnInit, OnDestroy {
333
343
this . taskQueue = this . _taskQueue ;
334
344
if ( task ) {
335
345
this . _activeTaskNum ++ ;
346
+ this . pendingTaskNum ++ ;
336
347
this . updateSummaryForRow ( task . rowNode , task . cluster , task . index ) ;
337
348
}
338
349
}
0 commit comments