wazuh-dashboard-plugins icon indicating copy to clipboard operation
wazuh-dashboard-plugins copied to clipboard

Split the data in the 'OS' field (exported CSV)

Open mauromalara opened this issue 2 years ago • 3 comments

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

  1. A group must exist

Steps to reproduce

  1. Navigate to 'Management/Groups'
  2. Click on 'Export formatted'

Expected Result

  1. The OS info should be divided into different fields.

Actual Result

  1. 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

mauromalara avatar Apr 20 '22 16:04 mauromalara

We need to further investigate this with @wazuh/framework This has been reproduced in 4.2.6.

gdiazlo avatar Apr 25 '22 14:04 gdiazlo

The API does not export data as CSV, we should investigate this on the dashboard code.

gdiazlo avatar Apr 27 '22 09:04 gdiazlo

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.

gdiazlo avatar Apr 27 '22 12:04 gdiazlo