FE: NMS-17004: Update the login events item in Usage Stats, add link to download CSV file #7598
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.
Description
A new item, “CSV output of Login events for the past 60 days”, has been added to the usage stats list.
The “Latest Value” column will contain Base64-encoded file contents.
Update the column to display a download link labeled “Download CSV file”. The link should decode the Base64 content and trigger the file download.
The implementation should be generic, based on the datatype value (file|csv) provided in the metadata.
If the datatype starts with "file", split it using | to extract the file type (e.g., csv in this case) and handle the file appropriately.
Metadata:
{
"key": "loginsPast60Days",
"name": "CSV output of Login events for the past 60 days",
"description": "CSV output containing the date, username login events for the past 60 days",
"datatype": "file|csv"
}
External References