Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ?columns also for CSV and JSON exports #1011

Open
gbin2265 opened this issue Apr 25, 2024 · 3 comments
Open

Support ?columns also for CSV and JSON exports #1011

gbin2265 opened this issue Apr 25, 2024 · 3 comments
Labels
area/export Affects exports to other formats enhancement New feature or improvement ref/NC

Comments

@gbin2265
Copy link

Proposal for export's CSV/PDF/JSON

If you now request a CSV export, it provides all the columns that exist.
Wouldn't it be possible to include an additional parameter where you specify which columns you want to see only in the CSV/PDF/EXPORT export?

Describe the solution you'd like

add parameter like printcolums=...

You can then use this parameter as a filter when printing the columns.

example

printcolumns=host.id,host.display_name,host.vars.os,host.address,host.name,host.vars.local_var

Result

id,display_name,address,name,vars.os,vars.local_var
"1370166c5ea3a961e81ecf3ace578e19dac2184e","host.com","1.1.1.1","obj_host","rhel9","city1"

@nilmerg
Copy link
Member

nilmerg commented Apr 25, 2024

Hi,

for PDF this is already possible by using ?columns= in the hosts and services list. This just needs to be supported for the CSV and JSON export.

@nilmerg nilmerg added enhancement New feature or improvement area/export Affects exports to other formats labels Apr 25, 2024
@nilmerg nilmerg changed the title Feature request : print only requested columns for CSV/PDF/JSON Export Support ?columns also for CSV and JSON exports Apr 25, 2024
@gbin2265
Copy link
Author

Hi,

Added value was from printcolumns that you can give additional columns like the IDs in the export but not on the screen.

But tell you that the columns option is the fastest/easiest way, I will be very happy already.

@Nathaniel-Donahue
Copy link

ref/NC/816326

@nilmerg nilmerg added the ref/NC label Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/export Affects exports to other formats enhancement New feature or improvement ref/NC
Projects
None yet
Development

No branches or pull requests

3 participants