When linking to devices, use the DNS name in preference to the IP

This commit is contained in:
Oliver Gorwits
2013-02-10 15:31:55 +00:00
parent b7e971074f
commit 4d832cb2a5
14 changed files with 41 additions and 29 deletions

View File

@@ -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 %]