[PR #16800] [MERGED] Closes #15621: User notifications #14916

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/16800
Author: @jeremystretch
Created: 7/3/2024
Status: Merged
Merged: 7/15/2024
Merged by: @jeremystretch

Base: featureHead: 15621-notifications


📝 Commits (10+)

📊 Changes

59 files changed (+1913 additions, -90 deletions)

View changed files

docs/models/extras/notification.md (+17 -0)
docs/models/extras/notificationgroup.md (+17 -0)
docs/models/extras/subscription.md (+15 -0)
📝 mkdocs.yml (+3 -0)
📝 netbox/account/urls.py (+2 -0)
📝 netbox/account/views.py (+31 -1)
📝 netbox/core/apps.py (+1 -1)
netbox/core/events.py (+33 -0)
📝 netbox/core/models/jobs.py (+0 -1)
📝 netbox/extras/api/serializers.py (+1 -0)
netbox/extras/api/serializers_/notifications.py (+82 -0)
📝 netbox/extras/api/urls.py (+3 -0)
📝 netbox/extras/api/views.py (+21 -0)
📝 netbox/extras/choices.py (+2 -0)
📝 netbox/extras/constants.py (+9 -12)
📝 netbox/extras/events.py (+48 -30)
📝 netbox/extras/filtersets.py (+45 -0)
📝 netbox/extras/forms/bulk_edit.py (+15 -0)
📝 netbox/extras/forms/bulk_import.py (+25 -2)
📝 netbox/extras/forms/filtersets.py (+15 -0)

...and 39 more files

📄 Description

Closes: #15621

  • Implement dynamic registration for event types
  • Add event types for job failures and errors
  • Alter event handling logic to enqueue events by canonical type rather than by the corresponding ObjectChange action type
  • Introduce three new models: Subscription, NotificationGroup, and Notification
  • Add post_save signal receiver to automatically generate notification for subscribed users
  • Extend EvenRule to support sending notifications
  • Add notifications dropdown in top navigation bar
  • Provide user views for subscriptions & notifications
  • Add model documentation

🔄 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/16800 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 7/3/2024 **Status:** ✅ Merged **Merged:** 7/15/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `15621-notifications` --- ### 📝 Commits (10+) - [`865619b`](https://github.com/netbox-community/netbox/commit/865619baca1141cd14c4cd4c7e6aa428671e64ca) Initial work on #15621 - [`b0e37bc`](https://github.com/netbox-community/netbox/commit/b0e37bc12d3f2d6af4b19b1c52da858f2404c866) Signal receiver should ignore models which don't support notifications - [`896c174`](https://github.com/netbox-community/netbox/commit/896c174088086ed7f4a5fc6a798190d233a60dea) Flesh out NotificationGroup functionality - [`a21d4fe`](https://github.com/netbox-community/netbox/commit/a21d4fecbc2be5e3edbcccf74604e4a44dbaa9f9) Add NotificationGroup filters for users & groups - [`9c87571`](https://github.com/netbox-community/netbox/commit/9c875716f75cfb4abffa37595c4df211c1bc4fc4) Separate read & dimiss actions - [`29675d6`](https://github.com/netbox-community/netbox/commit/29675d6e455208743fbe7249a93d3d8d520ce01b) Enable one-click dismissals from notifications list - [`1c81183`](https://github.com/netbox-community/netbox/commit/1c8118304fe6f1dfd2bb779a284fc98c3836b62e) Include total notification count in dropdown - [`8065d7c`](https://github.com/netbox-community/netbox/commit/8065d7c1278b5c3d21f4e057a4d340d358f6e35b) Drop 'kind' field from Notification model - [`8c0693f`](https://github.com/netbox-community/netbox/commit/8c0693fb36029260ea3f68f6474eda33c837e6da) Register event types in the registry; add colors & icons - [`71860ba`](https://github.com/netbox-community/netbox/commit/71860ba985f86f38eb4a9eb477183f7e87d07d6e) Enable event rules to target notification groups ### 📊 Changes **59 files changed** (+1913 additions, -90 deletions) <details> <summary>View changed files</summary> ➕ `docs/models/extras/notification.md` (+17 -0) ➕ `docs/models/extras/notificationgroup.md` (+17 -0) ➕ `docs/models/extras/subscription.md` (+15 -0) 📝 `mkdocs.yml` (+3 -0) 📝 `netbox/account/urls.py` (+2 -0) 📝 `netbox/account/views.py` (+31 -1) 📝 `netbox/core/apps.py` (+1 -1) ➕ `netbox/core/events.py` (+33 -0) 📝 `netbox/core/models/jobs.py` (+0 -1) 📝 `netbox/extras/api/serializers.py` (+1 -0) ➕ `netbox/extras/api/serializers_/notifications.py` (+82 -0) 📝 `netbox/extras/api/urls.py` (+3 -0) 📝 `netbox/extras/api/views.py` (+21 -0) 📝 `netbox/extras/choices.py` (+2 -0) 📝 `netbox/extras/constants.py` (+9 -12) 📝 `netbox/extras/events.py` (+48 -30) 📝 `netbox/extras/filtersets.py` (+45 -0) 📝 `netbox/extras/forms/bulk_edit.py` (+15 -0) 📝 `netbox/extras/forms/bulk_import.py` (+25 -2) 📝 `netbox/extras/forms/filtersets.py` (+15 -0) _...and 39 more files_ </details> ### 📄 Description ### Closes: #15621 - Implement dynamic registration for event types - Add event types for job failures and errors - Alter event handling logic to enqueue events by canonical type rather than by the corresponding ObjectChange action type - Introduce three new models: Subscription, NotificationGroup, and Notification - Add `post_save` signal receiver to automatically generate notification for subscribed users - Extend EvenRule to support sending notifications - Add notifications dropdown in top navigation bar - Provide user views for subscriptions & notifications - Add model documentation --- <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:27:27 +01:00
adam closed this issue 2025-12-29 23:27:27 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14916