Child Prefix Tab on Prefix page #1457

Closed
opened 2025-12-29 16:32:17 +01:00 by adam · 3 comments
Owner

Originally created by @awfki on GitHub (Dec 14, 2017).

Issue type

[X ] Feature request

Environment

  • Python version: 2.7
  • NetBox version: 2.2.4

Description

On the page for a Prefix (https://netbox/ipam/prefixes/7/) there are tabs for Prefix and IP Addresses. Please add an additional tab called "Child Prefixes" between those. The new tab should just link to the Child Prefixes table further down the same page.

Screenshot with arrows showing what I intend.

Reason is that dependent on window size the Child Prefixes list is often hidden so if the user doesn't know it's there they may jump into IP addresses and then wonder why the child prefix doesn't show up.

I don't believe any DB changes or library updates are needed.

Originally created by @awfki on GitHub (Dec 14, 2017). <!-- Before opening a new issue, please search through the existing issues to see if your topic has already been addressed. Note that you may need to remove the "is:open" filter from the search bar to include closed issues. Check the appropriate type for your issue below by placing an x between the brackets. For assistance with installation issues, or for any other issues other than those listed below, please raise your topic for discussion on our mailing list: https://groups.google.com/forum/#!forum/netbox-discuss Please note that issues which do not fall under any of the below categories will be closed. Due to an excessive backlog of feature requests, we are not currently accepting any proposals which extend NetBox's feature scope. Do not prepend any sort of tag to your issue's title. An administrator will review your issue and assign labels as appropriate. ---> ### Issue type [X ] Feature request <!-- An enhancement of existing functionality --> <!-- Please describe the environment in which you are running NetBox. (Be sure to verify that you are running the latest stable release of NetBox before submitting a bug report.) If you are submitting a bug report and have made any changes to the code base, please first validate that your bug can be recreated while running an official release. --> ### Environment * Python version: 2.7 * NetBox version: 2.2.4 <!-- FEATURE REQUESTS must include: * A detailed description of the proposed functionality * A use case for the new feature * A rough description of any necessary changes to the database schema * Any relevant third-party libraries which would be needed --> ### Description On the page for a Prefix (https://netbox/ipam/prefixes/7/) there are tabs for Prefix and IP Addresses. Please add an additional tab called "Child Prefixes" between those. The new tab should just link to the Child Prefixes table further down the same page. [Screenshot with arrows showing what I intend.](https://cl.ly/2M0I24273e1j) Reason is that dependent on window size the Child Prefixes list is often hidden so if the user doesn't know it's there they may jump into IP addresses and then wonder why the child prefix doesn't show up. I don't believe any DB changes or library updates are needed.
adam added the type: feature label 2025-12-29 16:32:17 +01:00
adam closed this issue 2025-12-29 16:32:17 +01:00
Author
Owner

@awfki commented on GitHub (Dec 14, 2017):

Looking at whether I could solve my own problem and it looks like the HTML for the prefix page is here (prefix.html) but it references prefix_header.html and I don't see that file anywhere.

If someone wants to point it out I'll be happy to take a look and see if I can submit a PR. I haven't played with Django at all so it's very possible that it would be beyond me.

NM, I found it. I was looking in the wrong place.

@awfki commented on GitHub (Dec 14, 2017): Looking at whether I could solve my own problem and it looks like the HTML for the prefix page is here ([prefix.html](https://github.com/digitalocean/netbox/blob/252be84bf07a27868c9e5548558834b2fd62e3d8/netbox/templates/ipam/prefix.html)) but it references prefix_header.html ~~and I don't see that file anywhere.~~ ~~If someone wants to point it out~~ I'll be happy to take a look and see if I can submit a PR. I haven't played with Django at all so it's very possible that it would be beyond me. NM, [I found it](https://github.com/digitalocean/netbox/blob/252be84bf07a27868c9e5548558834b2fd62e3d8/netbox/templates/ipam/inc/prefix_header.html). I was looking in the wrong place.
Author
Owner

@ajaydeepsingh commented on GitHub (Dec 14, 2017):

It's possible. Just add another tab to the top and instead of linking to a different page, just have that new tab link to the start of the Child Prefixes section.
screen shot 2017-12-14 at 1 21 01 pm

To get the new tab:
<li role="presentation"><a href="#child">Child Prefixes</a></li>

and then just add an id tag to that portion of the generated page:

<div class="col-md-12" id="child">

@ajaydeepsingh commented on GitHub (Dec 14, 2017): It's possible. Just add another tab to the top and instead of linking to a different page, just have that new tab link to the start of the Child Prefixes section. ![screen shot 2017-12-14 at 1 21 01 pm](https://user-images.githubusercontent.com/22304991/34007942-a9127a38-e0d1-11e7-9e27-65454533ba2a.png) To get the new tab: `<li role="presentation"><a href="#child">Child Prefixes</a></li>` and then just add an id tag to that portion of the generated page: `<div class="col-md-12" id="child">`
Author
Owner

@jeremystretch commented on GitHub (Dec 20, 2017):

I originally added the child prefixes list to the main prefix view so that users wouldn't have to make a second request to view the children, but I like the idea of standardizing on using separate views for related objects.

@jeremystretch commented on GitHub (Dec 20, 2017): I originally added the child prefixes list to the main prefix view so that users wouldn't have to make a second request to view the children, but I like the idea of standardizing on using separate views for related objects.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1457