-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow plugins to add columns to tables #14173
Comments
Thank you for your interest in extending NetBox. Unfortunately, the information you have provided does not constitute an actionable feature request. Per our contributing guide, a feature request must include a thorough description of the proposed functionality, including any database changes, new views or API endpoints, and so on. It must also include a detailed use case justifying its implementation. If you would like to elaborate on your proposal, please modify your post above. If sufficient detail is not added, this issue will be closed. |
Apologies – updated the ticket with a longer description. |
to give a very specific example of how this could be used for the netbox-gateways plugin. the plugin could "register" that It should show related gateways objects on the prefix core module. being able to virtually extend the core module tables/api replys with extra data (possibly similar to how custom fields are presented in their own small dictionary) would be a fantastic feature to make plugins feel more connected to the core models they are integrating with. |
I did some quick digging and the base Table class from django-tables2 supports an |
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
The text was updated successfully, but these errors were encountered: