Fix for netmap links when domain_suffix is set
This commit is contained in:
@@ -21,9 +21,10 @@
|
|||||||
* [#60] Incorrect format string in store_vlans (Robert Kerr)
|
* [#60] Incorrect format string in store_vlans (Robert Kerr)
|
||||||
* Fix form reset icon on ports tab when using custom path (Daniel Tuecks)
|
* Fix form reset icon on ports tab when using custom path (Daniel Tuecks)
|
||||||
* Don't store failed SNMP community in the database
|
* Don't store failed SNMP community in the database
|
||||||
* [#51] Support DBD::Pg default for "host" field as local socket
|
* [#51] Support DBD::Pg default for "host" field as local socket (R. Kerr)
|
||||||
* [#58] Search by VLAN name now works
|
* [#58] Search by VLAN name now works (R. Kerr)
|
||||||
* Make "Not" option work for vlan number search in Device Ports
|
* Make "Not" option work for vlan number search in Device Ports
|
||||||
|
* [#48] Fix for netmap links when domain_suffix is set (R. Kerr)
|
||||||
|
|
||||||
2.020002 - 2013-12-11
|
2.020002 - 2013-12-11
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,11 @@ sub _add_children {
|
|||||||
next if exists var('seen')->{$c};
|
next if exists var('seen')->{$c};
|
||||||
var('seen')->{$c}++;
|
var('seen')->{$c}++;
|
||||||
push @legit, $c;
|
push @legit, $c;
|
||||||
push @{$ptr}, { name => _get_name($c), ip => $c };
|
push @{$ptr}, {
|
||||||
|
name => _get_name($c),
|
||||||
|
fullname => (var('devices')->{$c} || $c),
|
||||||
|
ip => $c,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
for (my $i = 0; $i < @legit; $i++) {
|
for (my $i = 0; $i < @legit; $i++) {
|
||||||
@@ -66,6 +70,7 @@ get '/ajax/data/device/netmap' => require_login sub {
|
|||||||
my %tree = (
|
my %tree = (
|
||||||
ip => $start,
|
ip => $start,
|
||||||
name => _get_name($start),
|
name => _get_name($start),
|
||||||
|
fullname => (var('devices')->{$start} || $start),
|
||||||
children => [],
|
children => [],
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ function to_class(name) { return 'nd_' + name.replace(/\./g, "_") }
|
|||||||
|
|
||||||
// handler for clicking on a circle - redirect to that device's netmap
|
// handler for clicking on a circle - redirect to that device's netmap
|
||||||
function circleClick(d) {
|
function circleClick(d) {
|
||||||
window.location = '[% uri_for('/device') %]?tab=netmap&q=' + (d.name || d.ip);
|
window.location = '[% uri_for('/device') %]?tab=netmap&q=' + d.fullname;
|
||||||
}
|
}
|
||||||
|
|
||||||
// handler for mouseover on a circle - show that device's real neighbors
|
// handler for mouseover on a circle - show that device's real neighbors
|
||||||
|
|||||||
Reference in New Issue
Block a user