Closed csmig closed 3 months ago
Issues
1 New issue
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
I've reviewed the code and used my smaller sets of data for testing. All looks good to me !
Looks good to me. Seems to perform a lot better: Imported 400 ckls into a collection of 264 assets: Old way, with the big GET: ~2:10 New, with targeted GETs: ~1:10
Resolves #124 Resolves #118
This PR refactors
cargo.js
andapi.js
to support more efficient fetches of Assets from the STIG Manager API. Instead of each batch fetching all the Assets for the target Collection, each batch will fetch only those Assets which are targets of the batch's parsed results.In addition, the error handling for
apiRequest()
was refactrored to align with the real-world behavior of the API, which returns 422 upon duplicate name collisions and 503 when the service is unavailable.