From 5b875c4641d4e67b142d319914157167b1637182 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Mon, 13 Jan 2014 17:49:40 +0000 Subject: [PATCH 1/3] tidy connected device+node layout --- Netdisco/share/views/ajax/device/ports.tt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Netdisco/share/views/ajax/device/ports.tt b/Netdisco/share/views/ajax/device/ports.tt index 109f416a..64e41860 100644 --- a/Netdisco/share/views/ajax/device/ports.tt +++ b/Netdisco/share/views/ajax/device/ports.tt @@ -243,9 +243,9 @@ 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 %] [% ' - ' IF row.remote_port %][% row.remote_port | html_entity %]
- [% IF params.neigh_id %] + [% IF params.neigh_id and (row.remote_id or row.remote_type) %] ([% 'id: '_ row.remote_id IF row.remote_id %] - [% ' type: '_ row.remote_type IF row.remote_type %]) + [% ' type: '_ row.remote_type IF row.remote_type %])
[% END %] [% ELSIF row.remote_ip %]   @@ -257,9 +257,9 @@ [% row.remote_ip | html_entity %] [% ' - ' IF row.remote_port %][% row.remote_port | html_entity %]
- [% IF params.neigh_id %] + [% IF params.neigh_id and (row.remote_id or row.remote_type) %] ([% 'id: '_ row.remote_id IF row.remote_id %] - [% ' type: '_ row.remote_type IF row.remote_type %]) + [% ' type: '_ row.remote_type IF row.remote_type %])
[% END %] [% ELSE %]   (possible uplink) From 444bc1e81dbbdc189a11d1ae6bb259c948815233 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Mon, 13 Jan 2014 17:51:54 +0000 Subject: [PATCH 2/3] protect sprintf from undefined remote_type --- Netdisco/lib/App/Netdisco/Core/Discover.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Netdisco/lib/App/Netdisco/Core/Discover.pm b/Netdisco/lib/App/Netdisco/Core/Discover.pm index a546aa39..8ac82e6c 100644 --- a/Netdisco/lib/App/Netdisco/Core/Discover.pm +++ b/Netdisco/lib/App/Netdisco/Core/Discover.pm @@ -733,7 +733,7 @@ sub store_neighbors { foreach my $n (@$remote_ip) { debug sprintf ' [%s] neigh - adding neighbor %s, type [%s], on %s to discovery queue', - $device->ip, $n, $remote_type, $port; + $device->ip, $n, ($remote_type || ''), $port; push @to_discover, [$n, $remote_type]; } } @@ -747,7 +747,7 @@ sub store_neighbors { if (wantarray) { debug sprintf ' [%s] neigh - adding neighbor %s, type [%s], on %s to discovery queue', - $device->ip, $remote_ip, $remote_type, $port; + $device->ip, $remote_ip, ($remote_type || ''), $port; push @to_discover, [$remote_ip, $remote_type]; } @@ -894,7 +894,7 @@ sub discover_new_neighbors { if (not is_discoverable($device, $remote_type)) { debug sprintf ' queue - %s, type [%s] excluded by discover_* config', - $ip, $remote_type; + $ip, ($remote_type || ''); next; } From 571d57dcc7743eefdbc0fa405011d2e628125188 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Mon, 13 Jan 2014 18:20:51 +0000 Subject: [PATCH 3/3] release 2.021000_003 --- Netdisco/META.yml | 2 +- Netdisco/lib/App/Netdisco.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Netdisco/META.yml b/Netdisco/META.yml index baada813..cef58c6d 100644 --- a/Netdisco/META.yml +++ b/Netdisco/META.yml @@ -71,4 +71,4 @@ resources: homepage: http://netdisco.org/ license: http://opensource.org/licenses/bsd-license.php repository: git://git.code.sf.net/p/netdisco/netdisco-ng -version: 2.021000_002 +version: 2.021000_003 diff --git a/Netdisco/lib/App/Netdisco.pm b/Netdisco/lib/App/Netdisco.pm index 50ce7a28..49d5801f 100644 --- a/Netdisco/lib/App/Netdisco.pm +++ b/Netdisco/lib/App/Netdisco.pm @@ -7,7 +7,7 @@ use 5.010_000; use File::ShareDir 'dist_dir'; use Path::Class; -our $VERSION = '2.021000_002'; +our $VERSION = '2.021000_003'; BEGIN { if (not ($ENV{DANCER_APPDIR} || '')