Extend download information with source, timestamp, and user details #2158
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR extends the dataset download information to provide better traceability and user understanding as requested in issue #2147.
Changes Made
1. Renamed manifest file for clarity
manifest.json
togeneral_metadata.json
for better user comprehensionExportController.cs
2. Added download metadata fields
Extended the
ApiDatasetModel
with three new properties:DownloadSource
: The base URL of the BEXIS2 instance (e.g., "https://www.bexis.uni-jena.de/")DownloadDateTime
: Timestamp when the download was initiatedDownloadedBy
: Username of the authenticated user or "anonymous" for unauthenticated downloads3. Implementation details
HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority)
DateTime.Now
with consistent en-US culture formattingHttpContext.Current.User.Identity.Name
4. Example output
The enhanced
general_metadata.json
now includes:Backward Compatibility
All changes are purely additive - existing functionality remains unchanged and API consumers will continue to work without modification. The new fields provide additional valuable metadata without breaking existing workflows.
Files Modified
Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/Models/API/ApiModels.cs
Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/Helpers/ApiDatasetHelper.cs
Console/BExIS.Web.Shell/Areas/DIM/BExIS.Modules.Dim.UI/Controllers/ExportController.cs
Fixes #2147.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.