-
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
Enable plugins to inject content within object list views #4751
Comments
Please expand your issue to specify exactly what changes you are proposing, including example code that a plugin would use. |
I would add an additional method to Plugin example code could be: from extras.plugins import PluginTemplateExtension
class DeviceListButton(PluginTemplateExtension):
model = 'dcim.device'
def list_buttons(self):
return self.render('sample_netbox_plugin/inc/device_list_buttons.html')
template_extensions = [DeviceListButton] |
If this would help, I can provide an implementation attempt. |
I too would like to see this feature - along with plugin buttons/areas on the interface view - there are some already on the cable view. |
i think this sounds fantastic. What feedback needs to be gathered still? |
What functionality would the buttons provide? Keep in mind that they would not be part of the object selection list: you would not be able to select a few objects and then perform some plugin action, for instance. Bearing this in mind, maybe generic "list header" and "list footer" inclusions would make more sense? |
In out (maybe a little bit special) use case, we want to add "shortcuts" to the object creation form with a (vie GET-parameters) preseeded, autogenerated object name. So we can easily create the next unused name that follows a special naming convention, without the need to copy&paste things from netbox to netbox. So for this use case a button near the "Add" button makes the most sense. But i think i got you point and if you don't want to support both options (what i could understand) i think list header and footer buttons would make more sense in a more generic point of view. |
A plugin button on the interface view would allow our plugin to pull/push the data for the specific interface (Observium/SNMP) |
I've modified the title of this proposal to be more generic, rather than focusing specifically on buttons. I'm marking this tentatively accepted (pending milestone assignment) with the assumption that its implementation will be limited to extending the current feature to also support list views. |
Environment
Proposed Functionality
It would be nice to give plugins the capability to not only inject buttons in object detail views, but also inject buttons to object list views.
Use Case
My specific use case is to add an additional button to object list view to give options to preseed the object form with automatically generated values, like in our case names, that follows the company's naming convention.
Here a little example screenshot:
Database Changes
None.
External Dependencies
None.
The text was updated successfully, but these errors were encountered: