netbox
netbox copied to clipboard
Allow Custom Links to be enabled/disabled seperately for object view and table view
NetBox version
v3.6.1
Feature type
New functionality
Proposed functionality
I propose the replacement of the "Enabled" checkbox on the Custom Links model to replaced with two checkboxes:
- Enabled link in object view
- Enabled link in table view
Enabling the link in the object view makes will make the link appear on the top of the model view, along with all the buttons.
Enabling the link in the list view will make the link optionally selectable in the "Configure Table" section.
Use case
Sometimes it's useful to be able to create a custom link to allow a column to be added to a column field, without neccessarilly wanting to add more stuff to the object view itself.
For example, see this: https://github.com/netbox-community/netbox/issues/13743#issuecomment-1715788852
Adding this option will make it possible to create custom links that are usable as table columns without also adding them to the model view itself.
Database changes
The Custom Link model will need to be changed to split the "enabled" field out into "enabled for table view" and "enabled for list view". Migrations will need to take into account migrating existing values so that both of the new columns are set to the same value as the old one.
For backwards compatibility, an alternate approach might be to leave the existing "enabled" field alone and add a new checkbox labelled "show in table view only" or something to that effect.
External dependencies
None.
An alternative simpler approach would be to add a new choice to the "Button class". It could just say "No button". Then I think no database changes would be neccessary, and hiding the button could be done conditional on that special case of the Button Class, or even in CSS.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.
This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.