Enable specifying columns to include/exclude on embedded tables #64

Closed
opened 2026-04-05 16:21:26 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @jeremystretch on 3/27/2026

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

*Originally created by @jeremystretch on 3/27/2026* ### 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
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#64