diff --git a/Netdisco/lib/Netdisco/Web/Device.pm b/Netdisco/lib/Netdisco/Web/Device.pm
index 6eed5c1d..b736fd0b 100644
--- a/Netdisco/lib/Netdisco/Web/Device.pm
+++ b/Netdisco/lib/Netdisco/Web/Device.pm
@@ -54,7 +54,7 @@ ajax '/ajax/content/device/:thing' => sub {
# device interface addresses
ajax '/ajax/content/device/addresses' => sub {
- my $ip = param('ip');
+ my $ip = param('q');
return unless $ip;
my $set = schema('netdisco')->resultset('DeviceIp')->search({ip => $ip}, { order_by => 'alias' });
@@ -68,13 +68,13 @@ ajax '/ajax/content/device/addresses' => sub {
# device ports with a description (er, name) matching
ajax '/ajax/content/device/ports' => sub {
- my $ip = param('ip');
+ my $ip = param('q');
return unless $ip;
my $set = schema('netdisco')->resultset('DevicePort')->by_ip($ip);
# refine by ports if requested
- my $q = param('q');
+ my $q = param('f');
if ($q) {
if ($q =~ m/^\d+$/) {
$set = $set->by_vlan($q);
@@ -107,7 +107,7 @@ ajax '/ajax/content/device/ports' => sub {
# device details table
ajax '/ajax/content/device/details' => sub {
- my $ip = param('ip');
+ my $ip = param('q');
return unless $ip;
my $device = schema('netdisco')->resultset('Device')->find($ip);
@@ -120,7 +120,7 @@ ajax '/ajax/content/device/details' => sub {
};
get '/device' => sub {
- my $ip = NetAddr::IP::Lite->new(param('ip'));
+ my $ip = NetAddr::IP::Lite->new(param('q'));
if (! $ip) {
redirect uri_for('/', {nosuchdevice => 1});
return;
diff --git a/Netdisco/views/ajax/device/addresses.tt b/Netdisco/views/ajax/device/addresses.tt
index 5d6e55d8..6bfbe499 100644
--- a/Netdisco/views/ajax/device/addresses.tt
+++ b/Netdisco/views/ajax/device/addresses.tt
@@ -14,7 +14,7 @@
[% row.alias %]
| [% row.dns.remove(settings.domain_suffix) %]
| [% row.port %] |
+ href="[% uri_for('/device') %]?tab=ports&q=[% row.ip %]&f=[% row.port %]">[% row.port %]
[% row.device_port.name %] |
[% row.subnet %] |
diff --git a/Netdisco/views/ajax/device/ports.tt b/Netdisco/views/ajax/device/ports.tt
index bfa023e8..6db3b375 100644
--- a/Netdisco/views/ajax/device/ports.tt
+++ b/Netdisco/views/ajax/device/ports.tt
@@ -85,7 +85,7 @@
[% IF row.remote_ip %]
[% IF row.neighbor %]
-
+
[% row.neighbor.dns.remove(settings.domain_suffix) || row.neighbor.ip %]
([% row.remote_port | html_entity %])
[% ELSE %]
diff --git a/Netdisco/views/ajax/search/device.tt b/Netdisco/views/ajax/search/device.tt
index 995a05af..df074841 100644
--- a/Netdisco/views/ajax/search/device.tt
+++ b/Netdisco/views/ajax/search/device.tt
@@ -14,7 +14,7 @@
[% WHILE (row = results.next) %]
|
- | [% row.dns.remove(settings.domain_suffix) %] |
+ [% row.dns.remove(settings.domain_suffix) %] |
[% row.contact %] |
[% row.location %] |
[% row.name %] |
diff --git a/Netdisco/views/ajax/search/node_by_ip.tt b/Netdisco/views/ajax/search/node_by_ip.tt
index e25a939a..2ad75a90 100644
--- a/Netdisco/views/ajax/search/node_by_ip.tt
+++ b/Netdisco/views/ajax/search/node_by_ip.tt
@@ -38,7 +38,7 @@
|
[% END %]
Switch Port |
- [% node.switch %] [ [% node.port %] ]
+ | [% node.switch %] [ [% node.port %] ]
[% ' (' _ node.device.dns.remove(settings.domain_suffix) _ ')' IF node.device.dns %]
[% ' a' IF NOT node.active %]
|
diff --git a/Netdisco/views/ajax/search/node_by_mac.tt b/Netdisco/views/ajax/search/node_by_mac.tt
index b57775a4..da7850eb 100644
--- a/Netdisco/views/ajax/search/node_by_mac.tt
+++ b/Netdisco/views/ajax/search/node_by_mac.tt
@@ -66,7 +66,7 @@
[% END %]
Switch Port |
- [% node.switch %] [ [% node.port %] ]
+ | [% node.switch %] [ [% node.port %] ]
[% ' (' _ node.device.dns.remove(settings.domain_suffix) _ ')' IF node.device.dns %]
[% ' a' IF NOT node.active %]
|
@@ -97,7 +97,7 @@
[% END %]
Switch Port |
- [% port.ip %] [ [% port.port %] ]
+ | [% port.ip %] [ [% port.port %] ]
[% ' (' _ port.device.dns.remove(settings.domain_suffix) _ ')' IF port.device.dns %]
|
[% IF params.stamps %]
diff --git a/Netdisco/views/ajax/search/port.tt b/Netdisco/views/ajax/search/port.tt
index abcdb4ee..74581600 100644
--- a/Netdisco/views/ajax/search/port.tt
+++ b/Netdisco/views/ajax/search/port.tt
@@ -11,7 +11,7 @@
[% WHILE (row = results.next) %]
| [% row.name %] |
- [% row.ip %] [ [% row.port %] ]
+ | [% row.ip %] [ [% row.port %] ]
[% ' (' _ row.device.dns.remove(settings.domain_suffix) _ ')' IF row.device.dns %]
|
[% row.descr %] |
diff --git a/Netdisco/views/ajax/search/vlan.tt b/Netdisco/views/ajax/search/vlan.tt
index d01f90b2..59b8151d 100644
--- a/Netdisco/views/ajax/search/vlan.tt
+++ b/Netdisco/views/ajax/search/vlan.tt
@@ -13,17 +13,17 @@
[% WHILE (row = results.next) %]
| [% row.vlan.vlan %] |
+ href="[% uri_for('/device') %]?tab=ports&q=[% row.ip %]&f=[% row.vlan.vlan %]">[% row.vlan.vlan %]
[% row.dns %] |
+ href="[% uri_for('/device') %]?tab=ports&q=[% row.ip %]&f=[% row.vlan.vlan %]">[% row.dns %]
[% row.vlan.description %] |
+ href="[% uri_for('/device') %]?tab=ports&q=[% row.ip %]&f=[% row.vlan.vlan %]">[% row.vlan.description %]
[% row.model %] |
+ href="[% uri_for('/device') %]?tab=ports&q=[% row.ip %]&f=[% row.vlan.vlan %]">[% row.model %]
[% row.os %] |
+ href="[% uri_for('/device') %]?tab=ports&q=[% row.ip %]&f=[% row.vlan.vlan %]">[% row.os %]
[% row.vendor %] |
+ href="[% uri_for('/device') %]?tab=ports&q=[% row.ip %]&f=[% row.vlan.vlan %]">[% row.vendor %]
[% END %]
diff --git a/Netdisco/views/device.tt b/Netdisco/views/device.tt
index 8dd5f277..b9d58b5e 100644
--- a/Netdisco/views/device.tt
+++ b/Netdisco/views/device.tt
@@ -17,8 +17,8 @@
[% CATCH %]
-
+
[% END %]
diff --git a/Netdisco/views/js/device.js b/Netdisco/views/js/device.js
index 94e0fb99..0f725d8f 100644
--- a/Netdisco/views/js/device.js
+++ b/Netdisco/views/js/device.js
@@ -47,7 +47,7 @@
});
// show or hide sweeping brush icon when field has content
- var sweep = $('#ports_form').find("input[name=q]");
+ var sweep = $('#ports_form').find("input[name=f]");
if (sweep.val() === "") {
$('.field_clear_icon').hide();
diff --git a/Netdisco/views/sidebar/device/ports.tt b/Netdisco/views/sidebar/device/ports.tt
index 080a4533..e96e471f 100644
--- a/Netdisco/views/sidebar/device/ports.tt
+++ b/Netdisco/views/sidebar/device/ports.tt
@@ -1,12 +1,12 @@
Port Filter Options
-
+