diff --git a/Netdisco/share/views/ajax/device/ports.tt b/Netdisco/share/views/ajax/device/ports.tt
index 4ee3e4b5..5ce64983 100644
--- a/Netdisco/share/views/ajax/device/ports.tt
+++ b/Netdisco/share/views/ajax/device/ports.tt
@@ -187,18 +187,19 @@
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 | html_entity %]
([% row.remote_port | html_entity %])
- [% ELSIF row.is_uplink %]
- N (probable neighbor)
- [% ELSE %]
+ [% ELSIF row.remote_ip AND row.remote_port %]
N
[% row.remote_ip | html_entity %] (port: [% row.remote_port | html_entity %]
- id: [% (row.remote_type _ ' / ') IF row.remote_type %][% row.remote_id | html_entity %])
+ [% ' id: '_ row.remote_type IF row.remote_type%]
+ [% ' type: '_ row.remote_id IF row.remote_id%])
+ [% ELSE %]
+ N (probable neighbor)
[% END %]
[% END %]
[% IF params.c_nodes %]
[% FOREACH node IN row.$nodes %]
- [% '
' IF row.remote_ip OR NOT loop.first %]
+ [% '
' IF (row.remote_ip OR row.is_uplink) OR NOT loop.first %]
[% 'A ' IF NOT node.active %]
[% node.net_mac.$mac_format_call | html_entity %]