Skip to content

Conversation

@kkthxbye-code
Copy link
Contributor

Fixes: #11914

Seems to display decently in the table and in csv export.

@jeremystretch
Copy link
Member

My only nit with the export display is that it appears to be raw Python rather than JSON (single quotes vs. double quotes):

Name,Content types,User,Description,Enabled,Shared,ID,Slug,Weight,Created,Last updated,Parameters
Filter1,dcim.site,admin,,True,True,2,filter1,100,2023-03-13 12:18,2023-03-13 12:18,"{'status': ['staging'], 'region_id': ['5']}"

IMO we should ensure that the export data is in some standardized format (ideally JSON) so that it is readily usable by the client.

@kkthxbye-code
Copy link
Contributor Author

I totally missed that it wasn't JSON, I'll look into exporting as JSON.

@kkthxbye-code
Copy link
Contributor Author

Made a change, can you check if the solution is the correct way to do it? It results in an export like this:

Name,Content types,User,Description,Enabled,Shared,ID,Slug,Weight,Created,Last updated,Parameters
test,dcim.device,admin,,True,True,1,test,100,2023-03-10 22:44:47,2023-03-10 22:44:47,"{""status"": [""active""], ""role_id"": [""1""], ""site_id"": [""1""]}"

Double quotes are the way the CSV write escapes quotes.

@jeremystretch jeremystretch merged commit 85f40bc into netbox-community:develop Mar 16, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export Saved Filter does not include parameters

2 participants