NetBox version
v4.5.5
Feature type
New functionality
Proposed functionality
Provide a mechanism to include or exclude specific table columns when embedding a table within an object view. I anticipate two changes are needed to implement this functionality.
1. Add kwargs to ObjectsTablePanel
Add two new keyword arguments, include_columns and exclude_columns, to the netbox.ui.panels.ObjectsTablePanel class. If present, these will be appended to the URL parameters sent with the HTMX request to render the table.
2. Implement column toggling in TableMixin
Extend views.generic.mixins.TableMixin to recognize these parameters when attached to the request, and show/hide columns accordingly.
If columns are specified for inclusion/exclusion, this should override any user preference for the embedded table.
Use case
Consider for example the locations table under the site view. This table includes the "site" column by default, which is redundant as the set of locations is limited to those belonging to the site being viewed. Passing ?exclude_columns=site would omit this column from the table, freeing up screen space for more relevant data.
Database changes
N/A
External dependencies
N/A
NetBox version
v4.5.5
Feature type
New functionality
Proposed functionality
Provide a mechanism to include or exclude specific table columns when embedding a table within an object view. I anticipate two changes are needed to implement this functionality.
1. Add kwargs to ObjectsTablePanel
Add two new keyword arguments,
include_columnsandexclude_columns, to thenetbox.ui.panels.ObjectsTablePanelclass. If present, these will be appended to the URL parameters sent with the HTMX request to render the table.2. Implement column toggling in TableMixin
Extend
views.generic.mixins.TableMixinto recognize these parameters when attached to the request, and show/hide columns accordingly.If columns are specified for inclusion/exclusion, this should override any user preference for the embedded table.
Use case
Consider for example the locations table under the site view. This table includes the "site" column by default, which is redundant as the set of locations is limited to those belonging to the site being viewed. Passing
?exclude_columns=sitewould omit this column from the table, freeing up screen space for more relevant data.Database changes
N/A
External dependencies
N/A