-
Hello I am exploring the custom links options and i have been able to make the links work when i reference a direct object. But i have a use case where i am interested in using the custom links where several objects are seen and i wanted to know if this is possible.
Will it be possible to create one link for each lag interface? I am still a newbie in the jinja2 templating so i am sure that my code can be improved, but i am not sure if netbox is ready to provide a different object for each interface that can be used in the link URL section. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
A custom link only generates one button, and it can only have one URL target. However, you could create a custom link on (*) In v2.11.7, filtering the list of interfaces is only provided by name, not by type or other attributes. However if the interfaces have names like "lag 1", "lag 2" etc then typing "lag" in the filter box will work. The error occurs during your 'link text' expansion:
... but you'd still have the same problem when expanding the URL. You could use |
Beta Was this translation helpful? Give feedback.
-
It seems i cannot use this validation on the custom link that is working in the nbshell()
In the link Text i have:
|
Beta Was this translation helpful? Give feedback.
-
Is there anyway that i can place the link in the middle?
|
Beta Was this translation helpful? Give feedback.
A custom link only generates one button, and it can only have one URL target.
However, you could create a custom link on
DCIM > interface
instead of onDCIM > device
. Starting at https://netboxhost/dcim/devices/201/interfaces/, the user could filter this down to LAGs(*), click on the interface of interest which would take them to (say) https://netboxhost/dcim/interfaces/1234/, and the custom link button would be there.(*) In v2.11.7, filtering the list of interfaces is only provided by name, not by type or other attributes. However if the interfaces have names like "lag 1", "lag 2" etc then typing "lag" in the filter box will work.
The error occurs during your 'link text' expansion: