Skip to content

Commit

Permalink
Merge pull request #355 from usnistgov/fix/zipfile-naming
Browse files Browse the repository at this point in the history
Set RPA data cart zip file names to be more human-oriented
  • Loading branch information
RayPlante authored Jan 21, 2025
2 parents 78107e6 + acd639d commit 7ac10f5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions angular/src/app/datacart/cart.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,20 @@ export class CartService {
).subscribe(
(result) => {
let data = {};
// Extract the dataset ID to use as the display name
const datasetId = result.metadata[0]?.aipid || cartName;
result.metadata.forEach((d) => {
let key = cartName + '/' + d.filePath;
d['key'] = key;
d["isSelected"] = true;
data[key] = d;
});
let out: DataCart = new DataCart(cartName, data, null, 0);
// Set the display name to the dataset ID
out.setDisplayName(datasetId);

// Save the cart
out.save();
subscriber.next(out);
subscriber.complete();
},
Expand Down

0 comments on commit 7ac10f5

Please sign in to comment.