Note: I'm aware that 2.7.11 is not the latest stable version, but the functionality being requested is not in the latest version of the code either. If I need to deploy 2.8.3 to see the same and update this issue, I can do that.
Add a count of the number of remaining Available IPs in Prefix views (and any others that seem logical). For instance, this could be under https://netbox.example.com/ipam/prefixes/1/ in a field, but it would also be nice to have a tally next to the Utilization percentage bar in the https://netbox.example.com/ipam/prefixes/ listing view as well.
Showing a prefix to a particular user or tenant with a tally of remaining available IPs would make understanding the data easier and simpler without the need to look through the Prefix definition to find out how many are available. I understand that this is easily done in the API, but the UI is all that some of my consumers see.
As far as I'm aware, this would not require a database change.
As far as I'm aware, this would not require any external dependencies.
I think total cound of available ips is almost same as Utilization. So putting either one is okay but both may redundant.
I don't follow. NetBox already display the utilization of each prefix as a percentage. Are you proposing to display this same information as an absolute count as well? I agree with @kobayashi; seems redundant, especially for larger prefixes. For example, IMO it makes sense to say that a /16 is 32% utilized but not that it has 44,564 IPs available.
It's a little redundant, but some people are not comfortable with maths. Typical scenario, someone has to add 327 new servers, and the view shows "88% used". -> We know that 12% is free, but how much IPs is this really? Just my 2 cents.
I hear you on the redundancy comments and I think you're right. In my particular use case though, I actually would indeed prefer to see "44,564 available" next to a /16 instead of "32%"
Do you think maybe a setting toggle would be workable? Something that shows count or percentage based on something in configuration.py (or the new user settings functionality, maybe)?
Just do something easy:
"Utilization of IP range: 50% (2,345 out of 4,690)"
This presents two good points:
I can see a benefit to this, but I do agree most of the time it will be redundant. the "IP Addresses" tab already has this mostly available. I imagine we could make get_utilization return a tuple(percentage, used, total) instead of just the percentage.
@DanSheps Yes, that would help @schmitmd
I think fgadot and DanSheps' feedback is in line with what I was hoping to get out of this. Are we still looking for additional feedback? Looks like almost a month since discussion stopped.
Just to chime in, perhaps a tooltip is a way to achieve this result without crowding the UI.
Most web applications that I interact with these days that show relative dates ("6 days ago") will show the full date/time as a tooltip when you hover over them.
Example with GitHub:
That sets a precedent for a similar behavior here. Keep the existing UI as just showing "33% used", as it's a predictable & compact size. When you hover it would say "44,564 available out of 65,534 total"
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.
Is there anything I can do to be helpful toward this? I'm not much of a Python dev, but I could give it a shot, maybe? I might be able to set get_utilization to return a tuple, but I don't even know where I'd start if the tooltip is the way to go.
@jeremystretch this is one that I think I could take some work to do so.
Most helpful comment
Just do something easy:
"Utilization of IP range: 50% (2,345 out of 4,690)"
This presents two good points: