wazuh-dashboard-plugins
wazuh-dashboard-plugins copied to clipboard
Split the data in the 'OS' field (exported CSV)
Wazuh | Elastic | Rev | Security |
---|---|---|---|
4.3 (rc6) | 7.x | 4xxx | Basic, ODFE, Xpack |
Browser |
---|
Firefox |
Description When exporting the table in CSV format the 'OS' field data is all contained in a single JSON, it will be more useful if the JSON keys are separated into different fields.
Preconditions
- A group must exist
Steps to reproduce
- Navigate to 'Management/Groups'
- Click on 'Export formatted'
Expected Result
- The OS info should be divided into different fields.
Actual Result
- The 'OS' field data is all contained in a single JSON
Screenshots
https://user-images.githubusercontent.com/39094716/164277302-ded78be5-5226-45bf-9e0f-2d7528c54baf.mp4
We need to further investigate this with @wazuh/framework This has been reproduced in 4.2.6.
The API does not export data as CSV, we should investigate this on the dashboard code.
Seems the component which transforms JSON to CSV does not handle correctly nested objects. There are some parts of the applications with special code to handle this. Which leads to inconsistencies in JSON to CSV transformations across the application.
The proposed solution would create a component in charge of this format conversion and all parts of the application must use it. There are off-the-selves components which handle this as libraries widely used by the node community.