|
55 | 55 | > |
56 | 56 | {% for int in interfaces %} |
57 | 57 | <a |
58 | | - href="{{int.get_absolute_url}}trace/" |
| 58 | + href="{{int.get_absolute_url}}" |
59 | 59 | class="device-view-port |
60 | 60 | {% if cable_colors == "on" and int.cable.color == "" or cable_colors == "on" and int.cable == None %} |
61 | 61 | nocolor |
|
81 | 81 | {% endif %} |
82 | 82 | {% endfor %} |
83 | 83 | {% endif %} |
| 84 | + <hr><a href='{{int.get_absolute_url}}trace/'>Trace</a> |
84 | 85 | " |
85 | 86 | style="grid-area: {{ int.stylename }}{% if cable_colors == 'on' and int.cable.color != '' %}; background-color: #{{ int.cable.color }}{% endif %}" |
86 | 87 | data-bs-toggle="tooltip" |
|
115 | 116 | { |
116 | 117 | device: "{{ device }}", |
117 | 118 | stylename: "{{ int.stylename }}", |
118 | | - url: "{{ int.get_absolute_url }}trace/", |
| 119 | + detailUrl: "{{ int.get_absolute_url }}", |
| 120 | + traceUrl: "{{ int.get_absolute_url }}trace/", |
119 | 121 | name: "{{ int.name|escapejs }}", |
120 | 122 | enabled: {% if int.enabled or int.is_port %}true{% else %}false{% endif %}, |
121 | 123 | connected: {% if int.connected_endpoints|length > 0 or int.is_port and int.link_peers|length > 0 %}true{% else %}false{% endif %}, |
|
165 | 167 |
|
166 | 168 | g.setAttribute("role", "link"); |
167 | 169 | g.style.cursor = "pointer"; |
168 | | - g.addEventListener("click", function () { window.location.href = p.url; }); |
| 170 | + g.addEventListener("click", function () { window.location.href = p.detailUrl; }); |
169 | 171 | g.addEventListener("keydown", function (e) { |
170 | | - if (e.key === "Enter" || e.key === " ") { window.location.href = p.url; } |
| 172 | + if (e.key === "Enter" || e.key === " ") { window.location.href = p.detailUrl; } |
171 | 173 | }); |
172 | 174 |
|
173 | 175 | var title = p.name; |
174 | 176 | var peers = p.connectedEndpoints.length > 0 ? p.connectedEndpoints : p.linkPeers; |
175 | 177 | if (peers.length > 0) { title += "<hr>" + peers.join("<br>"); } |
| 178 | + title += '<hr><a href="' + p.traceUrl + '">Trace</a>'; |
176 | 179 | g.setAttribute("data-bs-html", "true"); |
177 | 180 | g.setAttribute("data-bs-custom-class", "device-view-tooltip"); |
178 | 181 | g.setAttribute("title", title); |
|
0 commit comments