unexpected results when using quick filter of aggregates=>prefixes #10334

Open
opened 2025-12-29 21:30:10 +01:00 by adam · 5 comments
Owner

Originally created by @chatasos on GitHub (Oct 8, 2024).

Deployment Type

Self-hosted

NetBox Version

v4.1.3

Python Version

3.10

Steps to Reproduce

  1. Create an aggregate of 172.16.0.0/12 and import the attached csv files into prefixes.
  2. Go to the aggregates and select the 172.16.0.0/12
  3. Go to prefixes tab and enter "/16" (without quotes) in the quick filter

PS: I replicated this behavior in the demo instance too.
netbox_prefixes.csv
netbox_prefixes2.csv

Expected Behavior

To have the /16 prefixes being returned.

Observed Behavior

A lot of prefixes are returned, without any obvious relationship to the original query.

Also, many of them show as available, while this is not true.

image

Originally created by @chatasos on GitHub (Oct 8, 2024). ### Deployment Type Self-hosted ### NetBox Version v4.1.3 ### Python Version 3.10 ### Steps to Reproduce 1) Create an aggregate of 172.16.0.0/12 and import the attached csv files into prefixes. 2) Go to the aggregates and select the 172.16.0.0/12 3) Go to prefixes tab and enter "/16" (without quotes) in the quick filter PS: I replicated this behavior in the demo instance too. [netbox_prefixes.csv](https://github.com/user-attachments/files/17291725/netbox_prefixes.csv) [netbox_prefixes2.csv](https://github.com/user-attachments/files/17291726/netbox_prefixes2.csv) ### Expected Behavior To have the /16 prefixes being returned. ### Observed Behavior A lot of prefixes are returned, without any obvious relationship to the original query. Also, many of them show as available, while this is not true. ![image](https://github.com/user-attachments/assets/2b368989-8746-4646-ad0c-6129f6ee27b7)
adam added the type: bugstatus: blockednetboxseverity: low labels 2025-12-29 21:30:10 +01:00
Author
Owner

@chatasos commented on GitHub (Oct 8, 2024):

This happens only with specific search queries.
for example:
/15, /17, /18, /19 return nothing.
/16, /20 return something.

@chatasos commented on GitHub (Oct 8, 2024): This happens only with specific search queries. for example: /15, /17, /18, /19 return nothing. /16, /20 return something.
Author
Owner

@github-actions[bot] commented on GitHub (Apr 24, 2025):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Apr 24, 2025): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/main/CONTRIBUTING.md).
Author
Owner

@jeremystretch commented on GitHub (Apr 25, 2025):

The "extra" prefixes are merely representations of unallocated space. These annotations should be excluded when filtering the prefixes list, as the partial results do not reflect the total occupied space.

@jeremystretch commented on GitHub (Apr 25, 2025): The "extra" prefixes are merely representations of unallocated space. These annotations should be excluded when filtering the prefixes list, as the partial results do not reflect the total occupied space.
Author
Owner

@jeremystretch commented on GitHub (Apr 25, 2025):

This is a bit tricky due to the presence of the show assigned / show available / show all selectors at the top of the page. To resolve this, we need to remove the records representing available space from the table when searching. However, that would conflict with the "show available" toggle if it's enabled.

IMO we should restructure the page and move the toggle at the top within the table, similar to the interface filters under the device interface view. This would allow us to reset the toggles in HTMX during a search.

Going to mark this one as blocked for now. However, a simply workaround is to enable the "show assigned" toggle before searching.

@jeremystretch commented on GitHub (Apr 25, 2025): This is a bit tricky due to the presence of the show assigned / show available / show all selectors at the top of the page. To resolve this, we need to remove the records representing available space from the table when searching. However, that would conflict with the "show available" toggle if it's enabled. IMO we should restructure the page and move the toggle at the top within the table, similar to the interface filters under the device interface view. This would allow us to reset the toggles in HTMX during a search. Going to mark this one as blocked for now. However, a simply workaround is to enable the "show assigned" toggle before searching.
Author
Owner

@chatasos commented on GitHub (Apr 26, 2025):

Althought the workaround seems to work for assigned prefixes, the same is not true for available ones.
If i enable the "show available" toggle before searching and then enter "/16" the prefixes returned are totally wrong.

@chatasos commented on GitHub (Apr 26, 2025): Althought the workaround seems to work for assigned prefixes, the same is not true for available ones. If i enable the "show available" toggle before searching and then enter "/16" the prefixes returned are totally wrong.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10334