-
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
Template variable access for custom links on device page #969
Comments
An important consideration is whether we want to simply expose device attributes to the comment field, or whether an additional model is necessary. The former would offer the most flexibility; the later would be needed to add links or buttons elsewhere on the device page. |
My only input to this is to prefix each of these possibilities with their own prefix, so that eventually both can be supported. And ideally the prefix is not the model's name, because custom fields can be defined on multiple models at the same time. So instead of
This is considered 'oldschool' thinking among my peers, as it robs the user from his freedom to choose how he or she would like to open the linked content. Without the |
Another great use case for this... |
This seems similar to #600. However it is solved, I currently have a custom URL field on my prefixes/aggregates and would love to populate it with a link to ARIN or a routing registry. |
I've started working on this here. Still needs a bit of work, but that should have most of it done. At this point, just needs UIs and some testing. |
I suppose that my idea to allow markdown in services description is somehow connected with this feature request. Would you add a functionality to render hyperlinks to external knowledgeable in each service description? |
I created a new file in netbox/templates/inc and add an include on the device page. This creates a button that includes links to connect to the device, but could also have links to other systems as well. https://gist.github.com/mmahacek/3f69b10d2c6709e8e9ea91768282bca9 |
That is a very clever "hack" @mmahacek . I kind of like it in weird sort-of-way. 😄 |
https://github.com/netbox-community/netbox/wiki/Frequently-Asked-Questions#user-content-why-does-netbox-support-only-image-attachments indicates that this issue is still in progress, but it seems to be done. |
Issue type: feature request
To mirror our conversation on the networktocode slack, I would love to be able to create custom links to external systems that show up on the device pages. Similar to the context surrounding interface graphs, I want access to the templating variables to create the links.
For example, a link to a configuration management system with the context of the given device:
http://my.nms.local/config/?device={{ device.name }}
I would also want access to the custom attributes for the device, as I store important information that would be used in this links.
I was also thinking buttons instead of standard links would be cool but not a strict requirement. I do want control over the
target
attribute for the link, so I can define if it would open in the same window or new tab, etc.The overall goal is to be able to go to a device page in netbox and have a link I can click to go to another related system with that device's context.
Please let me know if more information is needed, happy to discus further.
The text was updated successfully, but these errors were encountered: