File tree 1 file changed +1
-6
lines changed
src/views/portfolio/projects
1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -429,16 +429,14 @@ export default {
429
429
try {
430
430
let allDependencies = [];
431
431
let page = 1 ;
432
- let pageSize = 100 ; // Adjust based on API limits
433
- // Step 1: Fetch all dependencies and handling pagination
432
+ let pageSize = 100 ;
434
433
while (true ) {
435
434
let response = await this .axios .get (` ${ getDependenciesUrl} ?page=${ page} &size=${ pageSize} ` );
436
435
let dependencies = response .data ;
437
436
if (! dependencies || dependencies .length === 0 ) break ;
438
437
allDependencies = allDependencies .concat (dependencies);
439
438
page++ ;
440
439
}
441
- // Step 2: Delete dependencies in batches
442
440
let batchSize = 50 ;
443
441
let lengthAllDependencies = allDependencies .length ;
444
442
if (lengthAllDependencies !== 0 ) {
@@ -452,12 +450,9 @@ export default {
452
450
await Promise .all (deletePromises);
453
451
this .$refs .table .refresh ({ silent: true });
454
452
}
455
- // Step 3: Delete the BOM after all its components are removed
456
453
await this .axios .delete (deleteBomUrl);
457
454
this .$toastr .s (this .$t (" message.bom_deleted" ));
458
- // Step 4: Refresh the table
459
455
this .$refs .table .removeAll ();
460
- // Step 5: Refresh the metrics
461
456
await this .axios .get (` /api/v1/metrics/project/${ this .uuid } /refresh` );
462
457
}
463
458
else {
You can’t perform that action at this time.
0 commit comments