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

Select All check box in device Types Interfaces fails to check all boxes #14945

Closed
xkilian opened this issue Jan 25, 2024 · 3 comments · Fixed by #15027
Closed

Select All check box in device Types Interfaces fails to check all boxes #14945

xkilian opened this issue Jan 25, 2024 · 3 comments · Fixed by #15027
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@xkilian
Copy link

xkilian commented Jan 25, 2024

Deployment Type

Self-hosted

NetBox Version

v3.7.0

Python Version

3.8

Steps to Reproduce

  1. Create a device Template with more than 50 interfaces
  2. Go to Device Types
  3. Click name of device-type
  4. Click on Interfaces
  5. Click on per page widget to allow 100 lines to be displayed
  6. Click on Check box next to name column

Expected Behavior

All the checkboxes should be selected.

Observed Behavior

Only the signle box next to name is selected.

@xkilian xkilian added the type: bug A confirmed report of unexpected behavior in the application label Jan 25, 2024
@xkilian
Copy link
Author

xkilian commented Jan 25, 2024

I also noticed that navigating between Interfaces and Console Ports or Power Ports, the All check box next to Name will start functioning again, but the Number of lines widget setting is not preserved.

@jeremystretch jeremystretch self-assigned this Jan 29, 2024
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation severity: low Does not significantly disrupt application functionality, or a workaround is available labels Jan 29, 2024
@jeremystretch
Copy link
Member

It looks like the "select all" event handler isn't getting reinitialized after the table is re-rendered via an HTMX request (e.g. changing the ordering or pagination length).

@jeremystretch
Copy link
Member

There's a bug in how event handlers are added to the dynamic object list. HTMX controls within the table reference the HTMX container as closest .htmx-container, but this is obviously relative. When initHtmx() attempts to resolves this, it fails. It only works on the regular object list view because the quick search field coincidentally refers to the container by its explicit ID (#object_list); the quick search field is not present on the device type components list.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants