Custom links with MAC address #14553
-
I'm trying to set up a custom link that incorporates a device's MAC address in order to link to an external monitoring GUI. I have this so far:
This almost works, but there are two hurdles:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
What's your Netbox version? I remember seeing there was a change in URL encoding recently. I think it's #13011. Maybe you need to make a feature request to allow this character as well. (FWIW, exclamation mark is a "sub-delim" in rfc3986. I think reserved character escaping should be done inside Regarding database queries: the interface you are using is the Django ORM, so you can look at the Django documentation for this. For finding the first interface with a MAC address you probably want something like The reason your The best way to test all this interactively is using nbshell.
but:
Note that unlike
|
Beta Was this translation helpful? Give feedback.
What's your Netbox version? I remember seeing there was a change in URL encoding recently. I think it's #13011. Maybe you need to make a feature request to allow this character as well. (FWIW, exclamation mark is a "sub-delim" in rfc3986. I think reserved character escaping should be done inside
{{ .. }}
expansions, but not in the static part of a URL)Regarding database queries: the interface you are using is the Django ORM, so you can look at the Django documentation for this.
For finding the first interface with a MAC address you probably want something like
o…