[PR #2763] [CLOSED] Hide/show available ip addresses and child prefixes in prefix view #12435

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/2763
Author: @Grokzen
Created: 1/9/2019
Status: Closed

Base: developHead: feature/hide-available-ip-addresses-in-prefix-view


📝 Commits (5)

  • 54f3b35 Added buttons and filtering of available IP Addresses and child prefixes in prefix view
  • 58f56f2 Preserve show_available='on' between tabs in the Prefix view
  • 6d8f97e Rebuilt feature to be opt-in instead of opt-out so that default/old behaviour is preserved by default. Added settings flag to controll the wanted default behaviour of the show/hide feature. Added docs for the new settingss value.
  • 85923fd Fix a indent typo
  • 1929d0f Add line in changelog

📊 Changes

5 files changed (+53 additions, -4 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 docs/configuration/optional-settings.md (+8 -0)
📝 netbox/ipam/views.py (+37 -4)
📝 netbox/netbox/settings.py (+1 -0)
📝 netbox/templates/ipam/prefix.html (+6 -0)

📄 Description

Resubmit of #2702 i did earlier. Branch is rebased on top off develop and tested in a fresh installation of Netbox as requested in previous PR.

Fixes:

Closes: #2365
Closes: #2598

Summary:

I pulled up this code from our internal fork as it should be generic enough and solves 2 issues.

  • Add 2 new buttons, Hide available and Show available to Prefix view.
  • Add in logic into the prefix view to only include IP Addresses and child prefixes if we want to show available items.
  • Default behaviour of showing child prefixes and ip addresses is preserved
  • Added new setting HIDE_AVAILABLE_PREFIXES that when set to True will flip the default behaviour to always hide available child items. The added buttons will act as explicit indicators and overwrite this effect.

Examples of the new UI can be seen here https://github.com/digitalocean/netbox/issues/2598#issuecomment-447552918


🔄 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/2763 **Author:** [@Grokzen](https://github.com/Grokzen) **Created:** 1/9/2019 **Status:** ❌ Closed **Base:** `develop` ← **Head:** `feature/hide-available-ip-addresses-in-prefix-view` --- ### 📝 Commits (5) - [`54f3b35`](https://github.com/netbox-community/netbox/commit/54f3b35b4d7f98f6fd195f1226713b422559370a) Added buttons and filtering of available IP Addresses and child prefixes in prefix view - [`58f56f2`](https://github.com/netbox-community/netbox/commit/58f56f2deb49fd1cec67fc4726ff1aedce3b2b87) Preserve show_available='on' between tabs in the Prefix view - [`6d8f97e`](https://github.com/netbox-community/netbox/commit/6d8f97eea5805664b51591f73135820b85bd3f98) Rebuilt feature to be opt-in instead of opt-out so that default/old behaviour is preserved by default. Added settings flag to controll the wanted default behaviour of the show/hide feature. Added docs for the new settingss value. - [`85923fd`](https://github.com/netbox-community/netbox/commit/85923fdc6fb1fbd643ec844c5af55be3715b8778) Fix a indent typo - [`1929d0f`](https://github.com/netbox-community/netbox/commit/1929d0fc88b11e8b2bb90495e62d529500c187bf) Add line in changelog ### 📊 Changes **5 files changed** (+53 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `docs/configuration/optional-settings.md` (+8 -0) 📝 `netbox/ipam/views.py` (+37 -4) 📝 `netbox/netbox/settings.py` (+1 -0) 📝 `netbox/templates/ipam/prefix.html` (+6 -0) </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. --> Resubmit of #2702 i did earlier. Branch is rebased on top off develop and tested in a fresh installation of Netbox as requested in previous PR. ### Fixes: Closes: #2365 Closes: #2598 <!-- Please include a summary of the proposed changes below. --> ### Summary: I pulled up this code from our internal fork as it should be generic enough and solves 2 issues. - Add 2 new buttons, Hide available and Show available to Prefix view. - Add in logic into the prefix view to only include IP Addresses and child prefixes if we want to show available items. - Default behaviour of showing child prefixes and ip addresses is preserved - Added new setting `HIDE_AVAILABLE_PREFIXES` that when set to `True` will flip the default behaviour to always hide available child items. The added buttons will act as explicit indicators and overwrite this effect. Examples of the new UI can be seen here https://github.com/digitalocean/netbox/issues/2598#issuecomment-447552918 --- <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:21:34 +01:00
adam closed this issue 2025-12-29 22:21:34 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12435