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

Fixes: #14567 - Export current view of IP Addresses #15659

Conversation

Julio-Oliveira-Encora
Copy link
Contributor

Fixes: #14567

It added a script in "table_controls_htmx.html" to add the parameters to the URL (changing the htmx behavior).

Another script was created in "export.html" to append the parameters to the HREF to export the current view.

It was tested exporting devices, IP Address, and IP Range, with and without a quick search.

netbox/templates/inc/table_controls_htmx.html Outdated Show resolved Hide resolved
netbox/templates/inc/table_controls_htmx.html Outdated Show resolved Hide resolved
netbox/templates/inc/table_controls_htmx.html Outdated Show resolved Hide resolved
Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Getting closer!

netbox/project-static/src/search.ts Outdated Show resolved Hide resolved
netbox/project-static/src/search.ts Outdated Show resolved Hide resolved
netbox/project-static/src/search.ts Outdated Show resolved Hide resolved
netbox/templates/inc/table_controls_htmx.html Outdated Show resolved Hide resolved
netbox/project-static/src/search.ts Outdated Show resolved Hide resolved
netbox/project-static/src/search.ts Show resolved Hide resolved
netbox/project-static/src/search.ts Outdated Show resolved Hide resolved
netbox/project-static/src/search.ts Outdated Show resolved Hide resolved
netbox/project-static/src/search.ts Outdated Show resolved Hide resolved
netbox/project-static/src/search.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@arthanson arthanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still getting the whole table when I'm exporting. See screenshot, I only have one Address that is in the table, but export I get all.
Monosnap IP Addresses | NetBox 2024-05-30 12-42-52

@Julio-Oliveira-Encora
Copy link
Contributor Author

I tested it. When I exported, I got only one IP address.

ip_addr
export_IP_addr

@arthanson
Copy link
Collaborator

Note: Need to clear and update browser cache before trying, not sure why this is needed.

@Julio-Oliveira-Encora
Copy link
Contributor Author

I checked out to another branch and exported the current view. Then, I went back to the branch that fixed the export current view. Refreshing the page was necessary for it to work correctly.

Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeremystretch jeremystretch merged commit 3acf3b5 into netbox-community:develop Jun 6, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Export current view of IP Addresses
3 participants