Fix for netmap links when domain_suffix is set

This commit is contained in:
Oliver Gorwits
2013-12-29 11:14:03 +00:00
parent 424396d55d
commit aae7880311
3 changed files with 10 additions and 4 deletions

View File

@@ -21,9 +21,10 @@
* [#60] Incorrect format string in store_vlans (Robert Kerr)
* Fix form reset icon on ports tab when using custom path (Daniel Tuecks)
* Don't store failed SNMP community in the database
* [#51] Support DBD::Pg default for "host" field as local socket
* [#58] Search by VLAN name now works
* [#51] Support DBD::Pg default for "host" field as local socket (R. Kerr)
* [#58] Search by VLAN name now works (R. Kerr)
* 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

View File

@@ -30,7 +30,11 @@ sub _add_children {
next if exists var('seen')->{$c};
var('seen')->{$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++) {
@@ -66,6 +70,7 @@ get '/ajax/data/device/netmap' => require_login sub {
my %tree = (
ip => $start,
name => _get_name($start),
fullname => (var('devices')->{$start} || $start),
children => [],
);

View File

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