diff --git a/lib/App/Netdisco/Web/Device.pm b/lib/App/Netdisco/Web/Device.pm
index 2b987740..924b3fd9 100644
--- a/lib/App/Netdisco/Web/Device.pm
+++ b/lib/App/Netdisco/Web/Device.pm
@@ -19,9 +19,6 @@ set('connected_properties' => [
hook 'before_template' => sub {
my $tokens = shift;
- # allow checking of discoverability of remote connected device
- $tokens->{has_snmp} = sub { not match_to_setting(shift, 'discover_no_type') };
-
my $defaults = var('sidebar_defaults')->{'device_ports'}
or return;
diff --git a/lib/App/Netdisco/Web/Plugin/AdminTask/UndiscoveredNeighbors.pm b/lib/App/Netdisco/Web/Plugin/AdminTask/UndiscoveredNeighbors.pm
index 80ebb966..8b1a27fb 100644
--- a/lib/App/Netdisco/Web/Plugin/AdminTask/UndiscoveredNeighbors.pm
+++ b/lib/App/Netdisco/Web/Plugin/AdminTask/UndiscoveredNeighbors.pm
@@ -16,6 +16,11 @@ register_admin_task(
}
);
+# just to note a problem with this query:
+# using DeviceSkip to see if discover is blocked, but that table only shows
+# blocked actions on backends not permitted, so there may be a backend running
+# that permits the action, we would not know.
+
get '/ajax/content/admin/undiscoveredneighbors' => require_role admin => sub {
my @results
= schema('netdisco')->resultset('Virtual::UndiscoveredNeighbors')->hri->all;
diff --git a/share/views/ajax/device/ports.tt b/share/views/ajax/device/ports.tt
index c5311c35..a69a24ea 100644
--- a/share/views/ajax/device/ports.tt
+++ b/share/views/ajax/device/ports.tt
@@ -294,7 +294,7 @@
[% END %]
[% row.get_column('neighbor_dns').remove(settings.domain_suffix) || row.get_column('neighbor_ip') | html_entity %]
- [% IF row.remote_port and has_snmp(row.remote_type) %]
+ [% IF row.remote_port and row.remote_is_discoverable %]
-
[% row.remote_port | html_entity %]
@@ -308,7 +308,7 @@
[% ' type: '_ row.remote_type IF row.remote_type %])
[% END %]
[% ELSIF row.remote_ip %]
- [% ' ' IF has_snmp(row.remote_type) %]
+ [% ' ' IF row.remote_is_discoverable %]
[% IF row.remote_is_phone %]
[% ELSIF row.remote_is_wap %]
@@ -316,7 +316,7 @@
[% END %]
[% row.remote_ip | html_entity %]
- [% IF row.remote_port and has_snmp(row.remote_type) %]
+ [% IF row.remote_port and row.remote_is_discoverable %]
- [% row.remote_port | html_entity %]
[% END %]
@@ -328,7 +328,7 @@
[% ' type: '_ row.remote_type IF row.remote_type %])
[% END %]
[% ELSE %]
- [% ' (possible uplink)' IF has_snmp(row.remote_type) %]
+ [% ' (possible uplink)' IF row.remote_is_discoverable %]
[% END %]
[% END %]
[% IF params.c_nodes %]