[PR #10096] [MERGED] Fixes #6454 - Adds warning for prerequisite models #13555

Closed
opened 2025-12-29 23:19:32 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/10096
Author: @arthanson
Created: 8/22/2022
Status: Merged
Merged: 8/22/2022
Merged by: @jeremystretch

Base: developHead: art-6454


📝 Commits (6)

📊 Changes

16 files changed (+112 additions, -2 deletions)

View changed files

📝 netbox/circuits/models/circuits.py (+5 -0)
📝 netbox/dcim/models/devices.py (+14 -0)
📝 netbox/dcim/models/power.py (+9 -0)
📝 netbox/dcim/models/racks.py (+9 -0)
📝 netbox/dcim/models/sites.py (+4 -0)
📝 netbox/ipam/models/ip.py (+8 -0)
📝 netbox/ipam/models/l2vpn.py (+5 -0)
📝 netbox/netbox/models/__init__.py (+8 -0)
📝 netbox/netbox/views/generic/bulk_views.py (+6 -2)
📝 netbox/netbox/views/generic/object_views.py (+4 -0)
netbox/netbox/views/generic/utils.py (+12 -0)
📝 netbox/templates/generic/object_edit.html (+4 -0)
📝 netbox/templates/generic/object_list.html (+5 -0)
netbox/templates/inc/missing_prerequisites.html (+6 -0)
📝 netbox/virtualization/models.py (+8 -0)
📝 netbox/wireless/models.py (+5 -0)

📄 Description

Fixes: #6454

Adds warnings to list and detail view screens if pre-requisite models have not been created. Fox example, if you try to create a device without having any site objects it will warn you that you first need to create at least one site and provides the Add button to go there (see screenshot):

screencap-aug-22


🔄 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/10096 **Author:** [@arthanson](https://github.com/arthanson) **Created:** 8/22/2022 **Status:** ✅ Merged **Merged:** 8/22/2022 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `art-6454` --- ### 📝 Commits (6) - [`eb3d3dc`](https://github.com/netbox-community/netbox/commit/eb3d3dcbc4b65c819a0cb92de4794491f59f7687) #6454 add prerequisite alert - [`928dff6`](https://github.com/netbox-community/netbox/commit/928dff6b6879bf56c8953e0b137bbdaaa0a065e8) #6454 add prerequisite alert - [`38a8ddc`](https://github.com/netbox-community/netbox/commit/38a8ddcd778897e59fe2daf0dfc8e2403fc464cf) #6454 fix merge conflicts - [`c65a291`](https://github.com/netbox-community/netbox/commit/c65a29169878ef44e131a7601578781c595c8cf3) #6454 add L2VPN check - [`a972174`](https://github.com/netbox-community/netbox/commit/a972174706c2b4e857ca7019b4524c7216520fac) #6454 changes from PR review - [`25ec624`](https://github.com/netbox-community/netbox/commit/25ec624e4e97026088950e213bc5ec6dcd1d0bff) #6454 suggested review changes ### 📊 Changes **16 files changed** (+112 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `netbox/circuits/models/circuits.py` (+5 -0) 📝 `netbox/dcim/models/devices.py` (+14 -0) 📝 `netbox/dcim/models/power.py` (+9 -0) 📝 `netbox/dcim/models/racks.py` (+9 -0) 📝 `netbox/dcim/models/sites.py` (+4 -0) 📝 `netbox/ipam/models/ip.py` (+8 -0) 📝 `netbox/ipam/models/l2vpn.py` (+5 -0) 📝 `netbox/netbox/models/__init__.py` (+8 -0) 📝 `netbox/netbox/views/generic/bulk_views.py` (+6 -2) 📝 `netbox/netbox/views/generic/object_views.py` (+4 -0) ➕ `netbox/netbox/views/generic/utils.py` (+12 -0) 📝 `netbox/templates/generic/object_edit.html` (+4 -0) 📝 `netbox/templates/generic/object_list.html` (+5 -0) ➕ `netbox/templates/inc/missing_prerequisites.html` (+6 -0) 📝 `netbox/virtualization/models.py` (+8 -0) 📝 `netbox/wireless/models.py` (+5 -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. --> ### Fixes: #6454 <!-- Please include a summary of the proposed changes below. --> Adds warnings to list and detail view screens if pre-requisite models have not been created. Fox example, if you try to create a device without having any site objects it will warn you that you first need to create at least one site and provides the Add button to go there (see screenshot): ![screencap-aug-22](https://user-images.githubusercontent.com/99642/185958644-16b2b7cd-b3a1-465d-8da8-cf167fdd67ff.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 23:19:32 +01:00
adam closed this issue 2025-12-29 23:19:32 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13555