[PR #18756] [MERGED] Closes #17424: Add custom visibility toggle to ViewTab #15434

Closed
opened 2025-12-30 00:21:54 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/18756
Author: @jeremystretch
Created: 2/27/2025
Status: Merged
Merged: 2/27/2025
Merged by: @jeremystretch

Base: featureHead: 17424-ViewTab-visibility


📝 Commits (1)

📊 Changes

1 file changed (+12 additions, -4 deletions)

View changed files

📝 netbox/utilities/views.py (+12 -4)

📄 Description

Fixes: #17424

Adds an option visible parameter to ViewTab. If defined, this function will be used to control whether the tab should be rendered. If it returns true, visibility defers to the existing logic which considers the tab's badge value and hide_if_empty setting.


🔄 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/18756 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 2/27/2025 **Status:** ✅ Merged **Merged:** 2/27/2025 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `17424-ViewTab-visibility` --- ### 📝 Commits (1) - [`98c16a8`](https://github.com/netbox-community/netbox/commit/98c16a8b326be925d84a7e30360f7d9dc3ef20c9) Closes #17424: Add custom visibility toggle to ViewTab ### 📊 Changes **1 file changed** (+12 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `netbox/utilities/views.py` (+12 -4) </details> ### 📄 Description ### Fixes: #17424 Adds an option `visible` parameter to ViewTab. If defined, this function will be used to control whether the tab should be rendered. If it returns true, visibility defers to the existing logic which considers the tab's badge value and `hide_if_empty` setting. --- <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-30 00:21:54 +01:00
adam closed this issue 2025-12-30 00:21:54 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15434