[PR #5321] [CLOSED] Adds Title to Prefix Utilization to create Tooltip #13002

Closed
opened 2025-12-29 22:24:50 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/5321
Author: @jvanderaa
Created: 11/8/2020
Status: Closed

Base: developHead: add_util_tooltip


📝 Commits (10+)

  • fcc5fd6 Adds title to Prefix utilization
  • 07b5080 Update test
  • 26e14bc Updates helper for mutliple types
  • 0c74a9e Moves to tuple return on utilization; updates template
  • 1483716 Updated aggregrate tests
  • a30df92 Fixes syntax
  • d106a2e Updates name present & corresponding variable name
  • ca2b0dd Fixes inconsistent return; adds discrete arguments
  • a07b74a Merge branch 'develop' into add_util_tooltip
  • ce465e6 Updates for multiple objects called

📊 Changes

13 files changed (+105 additions, -46 deletions)

View changed files

📝 netbox/dcim/models/racks.py (+13 -12)
📝 netbox/dcim/tables/template_code.py (+1 -0)
📝 netbox/ipam/models.py (+25 -13)
📝 netbox/ipam/tables.py (+1 -1)
📝 netbox/ipam/tests/test_models.py (+5 -5)
📝 netbox/templates/dcim/device.html (+2 -2)
📝 netbox/templates/dcim/powerfeed.html (+1 -1)
📝 netbox/templates/dcim/rack.html (+1 -2)
📝 netbox/templates/ipam/aggregate.html (+1 -1)
📝 netbox/templates/ipam/prefix.html (+1 -1)
📝 netbox/templates/utilities/templatetags/utilization_graph.html (+2 -1)
📝 netbox/utilities/templatetags/helpers.py (+47 -6)
📝 netbox/utilities/utils.py (+5 -1)

📄 Description

Fixes: #4611

Adds a multi-line tooltip to include:

  • Addresses Used count

  • Total available addresses

  • Modifies the return of the get_utilization function to include the count used, and total available calculated

  • Updates the utilization utility function to pass these values into the template

  • Update the template to include a title to create a tooltip

Screen Shot 2020-11-07 at 21 29 31

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/5321 **Author:** [@jvanderaa](https://github.com/jvanderaa) **Created:** 11/8/2020 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `add_util_tooltip` --- ### 📝 Commits (10+) - [`fcc5fd6`](https://github.com/netbox-community/netbox/commit/fcc5fd6e3152a249c62a999957a6c8d128c3bec9) Adds title to Prefix utilization - [`07b5080`](https://github.com/netbox-community/netbox/commit/07b5080bacc1aff22a28e55f44042085e301ece6) Update test - [`26e14bc`](https://github.com/netbox-community/netbox/commit/26e14bc8e1ca27d4e642f3bd47341c7d0c8cd340) Updates helper for mutliple types - [`0c74a9e`](https://github.com/netbox-community/netbox/commit/0c74a9e82a2090b009b76d1d1233f4e890175038) Moves to tuple return on utilization; updates template - [`1483716`](https://github.com/netbox-community/netbox/commit/14837162420bfcda57e41dcaf5fc9c41d1ab7189) Updated aggregrate tests - [`a30df92`](https://github.com/netbox-community/netbox/commit/a30df92e98cdbc362d87e856cb24ef4ac6d87e24) Fixes syntax - [`d106a2e`](https://github.com/netbox-community/netbox/commit/d106a2e7112b127fa9b13634b089e9bf220b0d95) Updates name present & corresponding variable name - [`ca2b0dd`](https://github.com/netbox-community/netbox/commit/ca2b0dd91c9e03380bced271fb73633a07bb5e69) Fixes inconsistent return; adds discrete arguments - [`a07b74a`](https://github.com/netbox-community/netbox/commit/a07b74a6b6764aaaa882bd1c406cc77cb61a40d7) Merge branch 'develop' into add_util_tooltip - [`ce465e6`](https://github.com/netbox-community/netbox/commit/ce465e63bb6909dd2e4d5f2e04cfc3a3a9afd8d4) Updates for multiple objects called ### 📊 Changes **13 files changed** (+105 additions, -46 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/models/racks.py` (+13 -12) 📝 `netbox/dcim/tables/template_code.py` (+1 -0) 📝 `netbox/ipam/models.py` (+25 -13) 📝 `netbox/ipam/tables.py` (+1 -1) 📝 `netbox/ipam/tests/test_models.py` (+5 -5) 📝 `netbox/templates/dcim/device.html` (+2 -2) 📝 `netbox/templates/dcim/powerfeed.html` (+1 -1) 📝 `netbox/templates/dcim/rack.html` (+1 -2) 📝 `netbox/templates/ipam/aggregate.html` (+1 -1) 📝 `netbox/templates/ipam/prefix.html` (+1 -1) 📝 `netbox/templates/utilities/templatetags/utilization_graph.html` (+2 -1) 📝 `netbox/utilities/templatetags/helpers.py` (+47 -6) 📝 `netbox/utilities/utils.py` (+5 -1) </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be opened for approval prior to filing a pull request. This helps avoid wasting time and effort on something that we might not be able to accept. Please indicate the relevant feature request or bug report below. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ACCEPTED BUG REPORT OR FEATURE REQUEST, IT WILL BE MARKED AS INVALID AND CLOSED. --> ### Fixes: #4611 <!-- Please include a summary of the proposed changes below. --> Adds a multi-line tooltip to include: - Addresses Used count - Total available addresses - Modifies the return of the get_utilization function to include the count used, and total available calculated - Updates the utilization utility function to pass these values into the template - Update the template to include a title to create a tooltip <img width="1202" alt="Screen Shot 2020-11-07 at 21 29 31" src="https://user-images.githubusercontent.com/22228848/98456280-72f23980-2141-11eb-9c57-671744c80a8f.png"> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:24:50 +01:00
adam closed this issue 2025-12-29 22:24:50 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13002