[PR #16889] [MERGED] Closes #16776: Extend PluginTemplateExtension to render custom alerts for objects #14942

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/16889
Author: @jeremystretch
Created: 7/11/2024
Status: Merged
Merged: 7/12/2024
Merged by: @jeremystretch

Base: featureHead: 16776-plugin-alerts


📝 Commits (2)

  • 86cabd0 Closes #16776: Extend PluginTemplateExtension to render custom alerts for objects
  • 4622d5c Fix bug in _get_registered_content()

📊 Changes

6 files changed (+68 additions, -29 deletions)

View changed files

📝 docs/plugins/development/views.md (+3 -2)
📝 netbox/netbox/plugins/templates.py (+34 -15)
📝 netbox/netbox/tests/dummy_plugin/template_content.py (+6 -3)
📝 netbox/templates/base/layout.html (+4 -0)
📝 netbox/templates/generic/object.html (+4 -0)
📝 netbox/utilities/templatetags/plugins.py (+17 -9)

📄 Description

Closes: #16776

  • Add alerts() method on PluginTemplateExtension
  • Add alerts block to layout.html template
  • Extend alerts block in object.html to call new {% plugin_alerts %} template tag
  • Misc reorganization

🔄 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/16889 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 7/11/2024 **Status:** ✅ Merged **Merged:** 7/12/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `16776-plugin-alerts` --- ### 📝 Commits (2) - [`86cabd0`](https://github.com/netbox-community/netbox/commit/86cabd05fa8886afb93ff04db4398219fb7474a7) Closes #16776: Extend PluginTemplateExtension to render custom alerts for objects - [`4622d5c`](https://github.com/netbox-community/netbox/commit/4622d5c510665014c2164503f60f8c2e74897d5f) Fix bug in _get_registered_content() ### 📊 Changes **6 files changed** (+68 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `docs/plugins/development/views.md` (+3 -2) 📝 `netbox/netbox/plugins/templates.py` (+34 -15) 📝 `netbox/netbox/tests/dummy_plugin/template_content.py` (+6 -3) 📝 `netbox/templates/base/layout.html` (+4 -0) 📝 `netbox/templates/generic/object.html` (+4 -0) 📝 `netbox/utilities/templatetags/plugins.py` (+17 -9) </details> ### 📄 Description ### Closes: #16776 - Add `alerts()` method on PluginTemplateExtension - Add `alerts` block to `layout.html` template - Extend `alerts` block in `object.html` to call new `{% plugin_alerts %}` template tag - Misc reorganization --- <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:19:03 +01:00
adam closed this issue 2025-12-30 00:19:03 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14942