[PR #10801] [MERGED] Closes #9623: Implement saved filters #13696

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/10801
Author: @jeremystretch
Created: 10/31/2022
Status: Merged
Merged: 11/2/2022
Merged by: @jeremystretch

Base: featureHead: 9623-saved-filters


📝 Commits (4)

  • 5700964 Initial work on saved filters
  • 6b5dc7e Return only enabled/shared filters
  • ac58743 Add tests
  • 39bb6d3 Clean up filtering of usable SavedFilters

📊 Changes

37 files changed (+821 additions, -138 deletions)

View changed files

📝 netbox/circuits/forms/filtersets.py (+3 -3)
📝 netbox/dcim/forms/filtersets.py (+25 -25)
📝 netbox/extras/api/nested_serializers.py (+9 -0)
📝 netbox/extras/api/serializers.py (+20 -0)
📝 netbox/extras/api/urls.py (+1 -25)
📝 netbox/extras/api/views.py (+12 -0)
📝 netbox/extras/filtersets.py (+50 -0)
📝 netbox/extras/forms/__init__.py (+1 -1)
📝 netbox/extras/forms/bulk_edit.py (+26 -3)
📝 netbox/extras/forms/bulk_import.py (+14 -0)
📝 netbox/extras/forms/filtersets.py (+45 -16)
📝 netbox/extras/forms/mixins.py (+14 -0)
📝 netbox/extras/forms/model_forms.py (+30 -0)
📝 netbox/extras/graphql/schema.py (+3 -0)
📝 netbox/extras/graphql/types.py (+9 -0)
netbox/extras/migrations/0083_savedfilter.py (+36 -0)
📝 netbox/extras/models/__init__.py (+1 -0)
📝 netbox/extras/models/models.py (+65 -1)
📝 netbox/extras/tables/tables.py (+19 -23)
📝 netbox/extras/tests/test_api.py (+67 -2)

...and 17 more files

📄 Description

Fixes: #9623

  • Introduce the SavedFilter model and relevant views, serializers, etc.
  • Rename extras.forms.customfields to extras.forms.mixins
  • Add a filter field to all filter forms via SavedFiltersMixin
  • Updated applied_filters template tag to accept a context and include a "save" link

🔄 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/10801 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 10/31/2022 **Status:** ✅ Merged **Merged:** 11/2/2022 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `9623-saved-filters` --- ### 📝 Commits (4) - [`5700964`](https://github.com/netbox-community/netbox/commit/57009643fb8d2a8d6f8d8f1812da439617732695) Initial work on saved filters - [`6b5dc7e`](https://github.com/netbox-community/netbox/commit/6b5dc7ed2c1e7ea395eaa7f55dafdfb8d61b98d2) Return only enabled/shared filters - [`ac58743`](https://github.com/netbox-community/netbox/commit/ac587432f9b4844b911ea25cb9cf516401ab958a) Add tests - [`39bb6d3`](https://github.com/netbox-community/netbox/commit/39bb6d3282084e65bc68bf6496bd33ae08dfbfa4) Clean up filtering of usable SavedFilters ### 📊 Changes **37 files changed** (+821 additions, -138 deletions) <details> <summary>View changed files</summary> 📝 `netbox/circuits/forms/filtersets.py` (+3 -3) 📝 `netbox/dcim/forms/filtersets.py` (+25 -25) 📝 `netbox/extras/api/nested_serializers.py` (+9 -0) 📝 `netbox/extras/api/serializers.py` (+20 -0) 📝 `netbox/extras/api/urls.py` (+1 -25) 📝 `netbox/extras/api/views.py` (+12 -0) 📝 `netbox/extras/filtersets.py` (+50 -0) 📝 `netbox/extras/forms/__init__.py` (+1 -1) 📝 `netbox/extras/forms/bulk_edit.py` (+26 -3) 📝 `netbox/extras/forms/bulk_import.py` (+14 -0) 📝 `netbox/extras/forms/filtersets.py` (+45 -16) 📝 `netbox/extras/forms/mixins.py` (+14 -0) 📝 `netbox/extras/forms/model_forms.py` (+30 -0) 📝 `netbox/extras/graphql/schema.py` (+3 -0) 📝 `netbox/extras/graphql/types.py` (+9 -0) ➕ `netbox/extras/migrations/0083_savedfilter.py` (+36 -0) 📝 `netbox/extras/models/__init__.py` (+1 -0) 📝 `netbox/extras/models/models.py` (+65 -1) 📝 `netbox/extras/tables/tables.py` (+19 -23) 📝 `netbox/extras/tests/test_api.py` (+67 -2) _...and 17 more files_ </details> ### 📄 Description ### Fixes: #9623 - Introduce the SavedFilter model and relevant views, serializers, etc. - Rename `extras.forms.customfields` to `extras.forms.mixins` - Add a `filter` field to all filter forms via `SavedFiltersMixin` - Updated `applied_filters` template tag to accept a context and include a "save" link --- <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:20:19 +01:00
adam closed this issue 2025-12-29 23:20:19 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13696