complete the migration of connected device ID to connected inventory

This commit is contained in:
Oliver Gorwits
2018-03-02 12:42:36 +00:00
parent e1b9f2225e
commit 7b5f8c76f3
7 changed files with 146 additions and 57 deletions

View File

@@ -190,6 +190,9 @@ get '/ajax/content/device/ports' => require_login sub {
'+as' => ['neighbor_ip', 'neighbor_dns'],
}) if param('c_neighbors');
# also get remote LLDP inventory if asked for
$set = $set->with_remote_inventory if param('n_inventory');
# sort ports (empty set would be a 'no records' msg)
my $results = [ sort { &App::Netdisco::Util::Web::sort_port($a->port, $b->port) } $set->all ];
return unless scalar @$results;