When linking to devices, use the DNS name in preference to the IP
This commit is contained in:
@@ -14,10 +14,10 @@
|
||||
<td>[% row.alias %]</a>
|
||||
<td>[% row.dns.remove(settings.domain_suffix) %]</a>
|
||||
<td class="center_cell"><a class="nd_linkcell"
|
||||
href="[% device_ports %]&q=[% row.ip %]&f=[% row.port %]">[% row.port %]</a></td>
|
||||
href="[% device_ports %]&q=[% params.q | uri %]&f=[% row.port | uri %]">[% row.port %]</a></td>
|
||||
<td>[% row.device_port.name %]</td>
|
||||
<td><a class="nd_linkcell"
|
||||
href="[% search_device %]&ip=[% row.subnet %]">[% row.subnet %]</a></td>
|
||||
href="[% search_device %]&ip=[% row.subnet | uri %]">[% row.subnet %]</a></td>
|
||||
</tr>
|
||||
[% END %]
|
||||
</tbody>
|
||||
|
||||
@@ -60,7 +60,7 @@ function to_class(name) { return 'nd_' + name.replace(/\./g, "_") }
|
||||
|
||||
// handler for clicking on a circle - redirect to that device's netmap
|
||||
function circleClick(d) {
|
||||
window.location = '[% uri_for('/device') %]?tab=netmap&q=' + d.ip;
|
||||
window.location = '[% uri_for('/device') %]?tab=netmap&q=' + (d.name || d.ip);
|
||||
}
|
||||
|
||||
// handler for mouseover on a circle - show that device's real neighbors
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
[% IF params.c_neighbors AND row.remote_ip %]
|
||||
[% IF row.neighbor %]
|
||||
<a href="[% uri_for('/device',
|
||||
self_options) %]&q=[% row.neighbor.ip | uri %]&f=[% row.remote_port | uri %]">
|
||||
self_options) %]&q=[% row.neighbor.dns || row.neighbor.ip | uri %]&f=[% row.remote_port | uri %]">
|
||||
[% row.neighbor.dns.remove(settings.domain_suffix) || row.neighbor.ip %]
|
||||
([% row.remote_port | html_entity %])</a>
|
||||
[% ELSE %]
|
||||
|
||||
Reference in New Issue
Block a user