cleaner display for remote phones and aps without SNMP

This commit is contained in:
Oliver Gorwits
2018-03-02 13:00:55 +00:00
parent 7b5f8c76f3
commit 0806a3c321
2 changed files with 12 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ use Dancer::Plugin::Auth::Extensible;
use URI ();
use URL::Encode 'url_params_mixed';
use App::Netdisco::Util::Device 'match_devicetype';
# build view settings for port connected nodes and devices
set('connected_properties' => [
@@ -17,6 +18,10 @@ set('connected_properties' => [
hook 'before_template' => sub {
my $tokens = shift;
# allow checking of discoverability of remote connected device
$tokens->{has_snmp} = sub { not match_devicetype(shift, 'discover_no_type') };
my $defaults = var('sidebar_defaults')->{'device_ports'}
or return;