[PR #19101] [MERGED] Closes #14591: Saved table configurations #15530

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/19101
Author: @jeremystretch
Created: 4/7/2025
Status: Merged
Merged: 4/10/2025
Merged by: @jnovinger

Base: featureHead: 14591-saved-table-configs


📝 Commits (10+)

  • 0033c08 Add SavedTableConfig
  • 475dd72 Update table configuration logic to support TableConfigs
  • 2f425fd Update table config link when updating table
  • 2e52014 Correct docstring
  • 00ab899 Misc cleanup
  • e6b2a03 Use multi-select widgets for column selection
  • ca12f39 Return null config params for tables with no model
  • 08d56cd Fix auto-selection of selected columns
  • a1f0c3a Update migration
  • e128198 Clean up template

📊 Changes

32 files changed (+856 additions, -102 deletions)

View changed files

docs/models/extras/tableconfig.md (+43 -0)
📝 mkdocs.yml (+1 -0)
📝 netbox/extras/api/serializers.py (+1 -0)
netbox/extras/api/serializers_/tableconfigs.py (+22 -0)
📝 netbox/extras/api/urls.py (+1 -0)
📝 netbox/extras/api/views.py (+11 -0)
📝 netbox/extras/filtersets.py (+54 -0)
📝 netbox/extras/forms/bulk_edit.py (+29 -0)
📝 netbox/extras/forms/filtersets.py (+31 -0)
📝 netbox/extras/forms/model_forms.py (+62 -0)
📝 netbox/extras/graphql/filters.py (+14 -0)
📝 netbox/extras/graphql/schema.py (+3 -0)
📝 netbox/extras/graphql/types.py (+11 -0)
netbox/extras/migrations/0127_tableconfig.py (+56 -0)
📝 netbox/extras/models/models.py (+117 -0)
📝 netbox/extras/tables/tables.py (+31 -0)
📝 netbox/extras/urls.py (+3 -0)
📝 netbox/extras/utils.py (+18 -0)
📝 netbox/extras/views.py (+68 -25)
📝 netbox/netbox/navigation/menu.py (+1 -0)

...and 12 more files

📄 Description

Closes: #14591

  • Introduce the TableConfig model (similar to SavedFilter)
  • Introduce SharedObjectViewMixin for queryset resolution
  • Overhaul the application of table config & ordering logic
  • Add the configuration & config_params properties on BaseTable
  • Extend the HTMX template for tables to update the "save" link
  • Update the frontend JS to provide a select-all CSS class

🔄 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/19101 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 4/7/2025 **Status:** ✅ Merged **Merged:** 4/10/2025 **Merged by:** [@jnovinger](https://github.com/jnovinger) **Base:** `feature` ← **Head:** `14591-saved-table-configs` --- ### 📝 Commits (10+) - [`0033c08`](https://github.com/netbox-community/netbox/commit/0033c08c2509f3ac9e0e5971540e6ce36ceb42f5) Add SavedTableConfig - [`475dd72`](https://github.com/netbox-community/netbox/commit/475dd7247bb947a44afddae18b065d9fe3b053d6) Update table configuration logic to support TableConfigs - [`2f425fd`](https://github.com/netbox-community/netbox/commit/2f425fda3489b604dff52366742ca218ef671012) Update table config link when updating table - [`2e52014`](https://github.com/netbox-community/netbox/commit/2e52014828defffb2574635d3fa330e33f471dbb) Correct docstring - [`00ab899`](https://github.com/netbox-community/netbox/commit/00ab899604456b082e49520703ade6ccc7471829) Misc cleanup - [`e6b2a03`](https://github.com/netbox-community/netbox/commit/e6b2a0363399cae47abac170e0a30a75a6016dde) Use multi-select widgets for column selection - [`ca12f39`](https://github.com/netbox-community/netbox/commit/ca12f39c1ab46f0ee400bd82b620b4cda4b27fa2) Return null config params for tables with no model - [`08d56cd`](https://github.com/netbox-community/netbox/commit/08d56cd19f5c8603e5179a5b2e1bae1217b3aca5) Fix auto-selection of selected columns - [`a1f0c3a`](https://github.com/netbox-community/netbox/commit/a1f0c3a37d0bbe31f70057fc3320b9f7c348d55b) Update migration - [`e128198`](https://github.com/netbox-community/netbox/commit/e128198ec473f94b21ec8d190a023081ad871c45) Clean up template ### 📊 Changes **32 files changed** (+856 additions, -102 deletions) <details> <summary>View changed files</summary> ➕ `docs/models/extras/tableconfig.md` (+43 -0) 📝 `mkdocs.yml` (+1 -0) 📝 `netbox/extras/api/serializers.py` (+1 -0) ➕ `netbox/extras/api/serializers_/tableconfigs.py` (+22 -0) 📝 `netbox/extras/api/urls.py` (+1 -0) 📝 `netbox/extras/api/views.py` (+11 -0) 📝 `netbox/extras/filtersets.py` (+54 -0) 📝 `netbox/extras/forms/bulk_edit.py` (+29 -0) 📝 `netbox/extras/forms/filtersets.py` (+31 -0) 📝 `netbox/extras/forms/model_forms.py` (+62 -0) 📝 `netbox/extras/graphql/filters.py` (+14 -0) 📝 `netbox/extras/graphql/schema.py` (+3 -0) 📝 `netbox/extras/graphql/types.py` (+11 -0) ➕ `netbox/extras/migrations/0127_tableconfig.py` (+56 -0) 📝 `netbox/extras/models/models.py` (+117 -0) 📝 `netbox/extras/tables/tables.py` (+31 -0) 📝 `netbox/extras/urls.py` (+3 -0) 📝 `netbox/extras/utils.py` (+18 -0) 📝 `netbox/extras/views.py` (+68 -25) 📝 `netbox/netbox/navigation/menu.py` (+1 -0) _...and 12 more files_ </details> ### 📄 Description ### Closes: #14591 - Introduce the TableConfig model (similar to SavedFilter) - Introduce SharedObjectViewMixin for queryset resolution - Overhaul the application of table config & ordering logic - Add the `configuration` & `config_params` properties on BaseTable - Extend the HTMX template for tables to update the "save" link - Update the frontend JS to provide a `select-all` CSS class --- <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:22:30 +01:00
adam closed this issue 2025-12-30 00:22:30 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15530