From e5b96b078168f620b6a8dfadb896efe43b95d05a Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Sat, 30 Dec 2017 14:55:00 +0000 Subject: [PATCH] tidy and refactor --- .../Netdisco/Web/Plugin/Device/Neighbors.pm | 2 - share/views/ajax/device/netmap.tt | 338 ++++++++++-------- 2 files changed, 191 insertions(+), 149 deletions(-) diff --git a/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm b/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm index 3725c087..62077891 100644 --- a/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm +++ b/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm @@ -98,7 +98,6 @@ ajax '/ajax/data/device/netmap' => require_login sub { ]) : ()) }, { columns => [qw/left_ip speed right_ip/], - '+select' => [\'row_number() over()'], '+as' => ['row_number'], result_class => 'DBIx::Class::ResultClass::HashRefInflator', }); @@ -118,7 +117,6 @@ ajax '/ajax/data/device/netmap' => require_login sub { FROMID => $link->{left_ip}, TOID => $link->{right_ip}, SPEED => $link->{speed}, - ID => $link->{row_number}, }; ++$ok_dev{$link->{left_ip}}; diff --git a/share/views/ajax/device/netmap.tt b/share/views/ajax/device/netmap.tt index 5ab8cf9e..96584e23 100644 --- a/share/views/ajax/device/netmap.tt +++ b/share/views/ajax/device/netmap.tt @@ -1,87 +1,8 @@