release 2.010002

This commit is contained in:
Oliver Gorwits
2013-07-24 00:00:19 +01:00
parent c2f392b72d
commit eee6598c95
16 changed files with 88 additions and 51 deletions

View File

@@ -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} || '')

View File

@@ -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;

View File

@@ -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;

View File

@@ -0,0 +1,5 @@
BEGIN;
-- ALTER TABLE device_port ALTER COLUMN remote_id TYPE bytea USING remote_id::bytea;
COMMIT;

View File

@@ -0,0 +1,5 @@
BEGIN;
-- ALTER TABLE device_port ALTER COLUMN remote_id TYPE text USING remote_id::text;
COMMIT;

View File

@@ -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'),