Adjust prefix depth when showing child prefixes #5590

Closed
opened 2025-12-29 19:29:52 +01:00 by adam · 7 comments
Owner

Originally created by @HeavenBay on GitHub (Oct 31, 2021).

NetBox version

v3.0.8

Feature type

Change to existing functionality

Proposed functionality

Hi,

We have super-prefix 192.168.0.0/18 in Site1. And prefix 192.168.25.0/24 in Site2. When I filter prefixes by Site2 I see 192.168.25.0/24 as sub-prefix (with dot before it) but I do not see its parent parent-super-prefix from different site. I think that child prefix should not be as child in this case because I did not add super-prefix to its own Site2
netbox_issue_2
netbox_issue_1
.

Use case

For example: I filter my list of prefixes for a Site2 with Depth = 0 and I do not see this child prefix! I also do not see super-prefix from different Site1 because of Site filter. So I started thinking that my Site2 does not have 192.168. prefixes. It is terrible if you try to create summarization for routing.

Thank you.

Database changes

None

External dependencies

None

Originally created by @HeavenBay on GitHub (Oct 31, 2021). ### NetBox version v3.0.8 ### Feature type Change to existing functionality ### Proposed functionality Hi, We have super-prefix 192.168.0.0/18 in Site1. And prefix 192.168.25.0/24 in Site2. When I filter prefixes by Site2 I see 192.168.25.0/24 as sub-prefix (with dot before it) but I do not see its parent parent-super-prefix from different site. I think that child prefix should not be as child in this case because I did not add super-prefix to its own Site2 ![netbox_issue_2](https://user-images.githubusercontent.com/42742929/139578196-8fb2d017-7816-47ff-844b-5afc41db3017.png) ![netbox_issue_1](https://user-images.githubusercontent.com/42742929/139578197-93576fb3-4b15-411e-be15-834ec7b7a9b4.png) . ### Use case For example: I filter my list of prefixes for a Site2 with Depth = 0 and I do not see this child prefix! I also do not see super-prefix from different Site1 because of Site filter. So I started thinking that my Site2 does not have 192.168. prefixes. It is terrible if you try to create summarization for routing. Thank you. ### Database changes None ### External dependencies None
adam added the type: featurestatus: needs ownerpending closure labels 2025-12-29 19:29:52 +01:00
adam closed this issue 2025-12-29 19:29:52 +01:00
Author
Owner

@jeremystretch commented on GitHub (Nov 11, 2021):

This looks like we just need a more flexible way to indicate when a prefix should be listed in the table with or without its hierarchical depth.

Actually, we already have both the prefix and prefix_flat columns in PrefixTable. It should be sufficient to only show prefix_flat as appropriate.

@jeremystretch commented on GitHub (Nov 11, 2021): This looks like we just need a more flexible way to indicate when a prefix should be listed in the table with or without its hierarchical depth. Actually, we already have both the `prefix` and `prefix_flat` columns in PrefixTable. It should be sufficient to only show `prefix_flat` as appropriate.
Author
Owner

@DanSheps commented on GitHub (Nov 15, 2021):

Another option, could we have it check and see if there is a "parent" view and just subtract the two depths?

@DanSheps commented on GitHub (Nov 15, 2021): Another option, could we have it check and see if there is a "parent" view and just subtract the two depths?
Author
Owner

@jeremystretch commented on GitHub (Nov 15, 2021):

@DanSheps that's a clever idea. Just need to be sure we're passing sufficient context to the table under each view.

@jeremystretch commented on GitHub (Nov 15, 2021): @DanSheps that's a clever idea. Just need to be sure we're passing sufficient context to the table under each view.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 7, 2022):

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. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Mar 7, 2022): 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. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@DanSheps commented on GitHub (Mar 17, 2022):

I am going to take this up, when I have time (hopefully soon) unless someone else wants to get to it.

@DanSheps commented on GitHub (Mar 17, 2022): I am going to take this up, when I have time (hopefully soon) unless someone else wants to get to it.
Author
Owner

@github-actions[bot] commented on GitHub (Sep 26, 2022):

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 (Sep 26, 2022): 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/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Oct 27, 2022):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (Oct 27, 2022): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5590