When linking to devices, use the DNS name in preference to the IP

This commit is contained in:
Oliver Gorwits
2013-02-10 15:31:55 +00:00
parent b7e971074f
commit 4d832cb2a5
14 changed files with 41 additions and 29 deletions

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.ip;
window.location = '[% uri_for('/device') %]?tab=netmap&q=' + (d.name || d.ip);
}
// handler for mouseover on a circle - show that device's real neighbors