Skip to content

Allow plugins to add columns to tablesΒ #14173

@rixx

Description

@rixx

NetBox version

dev / v3.6.3

Feature type

New functionality

Proposed functionality

Allow plugins to register columns for built-in NetBox tables.

Use case

NetBox comes with admirably configurable tables and filters for all its built-in models, and makes it easy for plugins to provide tables like that, too. Some plugins manage fairly separate data, like DNS. However, when plugins connect to built-in models (instead of just providing separate models), the additional data cannot be seen from the built-in tables.

This is especially jarring for users when the data can be shown on the detail pages (by way of the template_extensions mechanism). Naturally, users tend to ask for ways to use the data displayed on the detail pages in the list/table views. As a plugin developer, I frequently build models that attach to existing NetBox models, and I get those requests a lot ("why do I have to go to the detail page of the Tenant to see the new data, can't you show it in the Tenant list?").

(I realise that there are technically ways to add columns to the tables right now: You can subclass/extend the built-in tables and provide them at a different URL, or, worst-of-all-worlds, patch something in. However, I think both of these are terrible in terms of maintainability and generally not good practice.)

An example could be a plugin that extends the customer management side of NetBox with additional data on Contacts, Tenants, or Sites, and would like to a) show the added data in those tables (e.g. the Site table), but also in other tables that can show Site information, e.g. the Device table.

I realise this isn't a trivial request. If you think this is generally worthwhile, I'd be happy to work on this feature!

Database changes

No response

External dependencies

No response

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtopic: pluginsRelates to the plugins frameworktype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions