diff --git a/Netdisco/Changes b/Netdisco/Changes index aaab50b6..2d54a8cd 100644 --- a/Netdisco/Changes +++ b/Netdisco/Changes @@ -1,4 +1,22 @@ -2.009000_001 - +2.010002 - 2013-07-23 + + [ENHANCEMENTS] + + * Nullify unused schema changes + + [BUG FIXES] + + * Fix FF bug with forms embedded in tables + * Fix bugs in topo update code + +2.010001_003 - 2013-06-20 + + [BUG FIXES] + + * Pass event param to all js functions which require it + * Handle UTF-8 data in the device port remote_id + +2.010000 - 2013-06-16 [NEW FEATURES] diff --git a/Netdisco/MANIFEST b/Netdisco/MANIFEST index 26c7c076..fd20ace8 100644 --- a/Netdisco/MANIFEST +++ b/Netdisco/MANIFEST @@ -96,6 +96,8 @@ lib/App/Netdisco/DB/schema_versions/App-Netdisco-DB-19-20-PostgreSQL.sql lib/App/Netdisco/DB/schema_versions/App-Netdisco-DB-2-3-PostgreSQL.sql lib/App/Netdisco/DB/schema_versions/App-Netdisco-DB-2-PostgreSQL.sql lib/App/Netdisco/DB/schema_versions/App-Netdisco-DB-20-21-PostgreSQL.sql +lib/App/Netdisco/DB/schema_versions/App-Netdisco-DB-21-22-PostgreSQL.sql +lib/App/Netdisco/DB/schema_versions/App-Netdisco-DB-22-23-PostgreSQL.sql lib/App/Netdisco/DB/schema_versions/App-Netdisco-DB-3-4-PostgreSQL.sql lib/App/Netdisco/DB/schema_versions/App-Netdisco-DB-4-5-PostgreSQL.sql lib/App/Netdisco/DB/schema_versions/App-Netdisco-DB-5-6-PostgreSQL.sql diff --git a/Netdisco/META.yml b/Netdisco/META.yml index 3cacbd08..98fc99ec 100644 --- a/Netdisco/META.yml +++ b/Netdisco/META.yml @@ -60,4 +60,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.010000 +version: 2.010002 diff --git a/Netdisco/bin/netdisco-web-fg b/Netdisco/bin/netdisco-web-fg index 81dca43e..fed7e417 100755 --- a/Netdisco/bin/netdisco-web-fg +++ b/Netdisco/bin/netdisco-web-fg @@ -3,6 +3,12 @@ use strict; use warnings FATAL => 'all'; +BEGIN { + if ($ENV{_} and $ENV{_} =~ m/netdisco-web-fg$/) { + die "You probably want: '~/bin/localenv starman $0 --workers=1 --disable-keepalive'\n"; + } +} + use FindBin; FindBin::again(); use Path::Class 'dir'; diff --git a/Netdisco/lib/App/Netdisco.pm b/Netdisco/lib/App/Netdisco.pm index 68a47ec6..4590027a 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.010000'; +our $VERSION = '2.010002'; BEGIN { if (not ($ENV{DANCER_APPDIR} || '') diff --git a/Netdisco/lib/App/Netdisco/Core/Discover.pm b/Netdisco/lib/App/Netdisco/Core/Discover.pm index fc80922d..cd17a897 100644 --- a/Netdisco/lib/App/Netdisco/Core/Discover.pm +++ b/Netdisco/lib/App/Netdisco/Core/Discover.pm @@ -6,6 +6,7 @@ use Dancer::Plugin::DBIC 'schema'; use App::Netdisco::Util::Device qw/get_device is_discoverable/; use App::Netdisco::Util::DNS ':all'; use NetAddr::IP::Lite ':lower'; +use Encode; use Try::Tiny; use base 'Exporter'; @@ -611,7 +612,7 @@ sub store_neighbors { my $remote_ipad = NetAddr::IP::Lite->new($remote_ip); my $remote_port = undef; my $remote_type = $c_platform->{$entry}; - my $remote_id = $c_id->{$entry}; + my $remote_id = Encode::decode('UTF-8', $c_id->{$entry}); next unless $remote_ip; diff --git a/Netdisco/lib/App/Netdisco/DB.pm b/Netdisco/lib/App/Netdisco/DB.pm index ee928630..b40ebbab 100644 --- a/Netdisco/lib/App/Netdisco/DB.pm +++ b/Netdisco/lib/App/Netdisco/DB.pm @@ -8,7 +8,7 @@ use base 'DBIx::Class::Schema'; __PACKAGE__->load_namespaces; -our $VERSION = 21; # schema version used for upgrades, keep as integer +our $VERSION = 23; # schema version used for upgrades, keep as integer use Path::Class; use File::Basename; diff --git a/Netdisco/lib/App/Netdisco/DB/schema_versions/App-Netdisco-DB-21-22-PostgreSQL.sql b/Netdisco/lib/App/Netdisco/DB/schema_versions/App-Netdisco-DB-21-22-PostgreSQL.sql new file mode 100644 index 00000000..c29fbd5a --- /dev/null +++ b/Netdisco/lib/App/Netdisco/DB/schema_versions/App-Netdisco-DB-21-22-PostgreSQL.sql @@ -0,0 +1,5 @@ +BEGIN; + +-- ALTER TABLE device_port ALTER COLUMN remote_id TYPE bytea USING remote_id::bytea; + +COMMIT; diff --git a/Netdisco/lib/App/Netdisco/DB/schema_versions/App-Netdisco-DB-22-23-PostgreSQL.sql b/Netdisco/lib/App/Netdisco/DB/schema_versions/App-Netdisco-DB-22-23-PostgreSQL.sql new file mode 100644 index 00000000..8eaf1718 --- /dev/null +++ b/Netdisco/lib/App/Netdisco/DB/schema_versions/App-Netdisco-DB-22-23-PostgreSQL.sql @@ -0,0 +1,5 @@ +BEGIN; + +-- ALTER TABLE device_port ALTER COLUMN remote_id TYPE text USING remote_id::text; + +COMMIT; diff --git a/Netdisco/lib/App/Netdisco/Web/Plugin/AdminTask/Topology.pm b/Netdisco/lib/App/Netdisco/Web/Plugin/AdminTask/Topology.pm index f0ac8b78..75533869 100644 --- a/Netdisco/lib/App/Netdisco/Web/Plugin/AdminTask/Topology.pm +++ b/Netdisco/lib/App/Netdisco/Web/Plugin/AdminTask/Topology.pm @@ -5,6 +5,9 @@ use Dancer::Plugin::Ajax; use Dancer::Plugin::DBIC; use App::Netdisco::Web::Plugin; +use App::Netdisco::Util::Device 'get_device'; + +use Try::Tiny; use NetAddr::IP::Lite ':lower'; register_admin_task({ @@ -50,7 +53,8 @@ ajax '/ajax/control/admin/topology/add' => sub { return unless ($left->in_storage and $right->in_storage); $left->ports - ->single({port => param('port1')}, {for => 'update'}) + ->search({port => param('port1')}, {for => 'update'}) + ->single() ->update({ remote_ip => param('dev2'), remote_port => param('port2'), @@ -61,7 +65,8 @@ ajax '/ajax/control/admin/topology/add' => sub { }); $right->ports - ->single({port => param('port2')}, {for => 'update'}) + ->search({port => param('port2')}, {for => 'update'}) + ->single() ->update({ remote_ip => param('dev1'), remote_port => param('port1'), diff --git a/Netdisco/share/views/ajax/admintask/jobqueue.tt b/Netdisco/share/views/ajax/admintask/jobqueue.tt index bdc8f6d5..479d5793 100644 --- a/Netdisco/share/views/ajax/admintask/jobqueue.tt +++ b/Netdisco/share/views/ajax/admintask/jobqueue.tt @@ -40,10 +40,8 @@