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

Add tally of remaining Available IPs in web UI views #4611

Closed
schmitmd opened this issue May 8, 2020 · 16 comments
Closed

Add tally of remaining Available IPs in web UI views #4611

schmitmd opened this issue May 8, 2020 · 16 comments
Labels
pending closure Requires immediate attention to avoid being closed for inactivity status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation type: feature Introduction of new functionality to the application

Comments

@schmitmd
Copy link

schmitmd commented May 8, 2020

Environment

  • Python version: 3.6.8
  • NetBox version: 2.7.11

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.

Proposed Functionality

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.

Use Case

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.

Database Changes

As far as I'm aware, this would not require a database change.

External Dependencies

As far as I'm aware, this would not require any external dependencies.

@kobayashi
Copy link
Contributor

I think total cound of available ips is almost same as Utilization. So putting either one is okay but both may redundant.

@kobayashi kobayashi added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label May 10, 2020
@jeremystretch
Copy link
Member

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.

@fgadot
Copy link

fgadot commented May 11, 2020

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.

@schmitmd
Copy link
Author

schmitmd commented May 11, 2020

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)?

@fgadot
Copy link

fgadot commented May 11, 2020

Just do something easy:
"Utilization of IP range: 50% (2,345 out of 4,690)"

This presents two good points:

  • a percentage, because it is easier in the human brain to represent portions of things in percentages. 50% for example is quicker to assimilate to the brain than "2,345 out of 4,690)

  • A number, because when we already have a number in our head about the numbers of IP we are going to need (for example "I need to assign 382 IPs to a rack tomorrow", it is easier to see that 328 can work with "2,235 IP left" versus "12% of 900 is free"

@DanSheps
Copy link
Member

DanSheps commented May 12, 2020

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.

@fgadot
Copy link

fgadot commented May 12, 2020

@DanSheps Yes, that would help @schmitmd

@schmitmd
Copy link
Author

schmitmd commented Jun 8, 2020

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.

@AllenEllis
Copy link

AllenEllis commented Jul 22, 2020

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:

Screen Shot 2020-07-21 at 11 46 26 PM

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"

@jeremystretch jeremystretch added type: feature Introduction of new functionality to the application status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Jul 24, 2020
@stale
Copy link

stale bot commented Sep 7, 2020

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.

@stale stale bot added the pending closure Requires immediate attention to avoid being closed for inactivity label Sep 7, 2020
@schmitmd
Copy link
Author

schmitmd commented Sep 7, 2020

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.

@stale stale bot removed the pending closure Requires immediate attention to avoid being closed for inactivity label Sep 7, 2020
@jvanderaa
Copy link
Contributor

@jeremystretch this is one that I think I could take some work to do so.

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Oct 21, 2020
@jvanderaa jvanderaa removed their assignment Apr 1, 2021
@jeremystretch jeremystretch removed the status: accepted This issue has been accepted for implementation label Apr 15, 2021
@jeremystretch jeremystretch added the status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation label May 21, 2021
@jeremystretch
Copy link
Member

With configure tables now in place, this can easily be implemented by adding an optional column to display the number of available IP addresses.

@github-actions
Copy link
Contributor

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 github-actions bot added the pending closure Requires immediate attention to avoid being closed for inactivity label Jul 21, 2021
@schmitmd
Copy link
Author

I would still like to see this feature implemented, but I understand if it's too low-pri.

@jeremystretch
Copy link
Member

See #7044 for a proposed alternative implementation.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pending closure Requires immediate attention to avoid being closed for inactivity status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants