From 57d308196b036a5355a69079e6dbe756a8a15e35 Mon Sep 17 00:00:00 2001 From: Oliver Gorwits Date: Mon, 1 Jan 2018 01:07:56 +0000 Subject: [PATCH] better tooltip for netmap --- lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm b/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm index 5330ab3e..71c4bbd2 100644 --- a/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm +++ b/lib/App/Netdisco/Web/Plugin/Device/Neighbors.pm @@ -74,13 +74,14 @@ sub to_speed { sub make_node_infostring { my $node = shift or return ''; - my $fmt = ('Serial: %s
Vendor/Model: %s / %s
' - .'OS/Version: %s / %s
Uptime: %s
' - .'Location: %s
Contact: %s'); - return sprintf $fmt, + my $fmt = ('%s is %s %s %s
running %s %s
Serial: %s
' + .'Uptime: %s
Location: %s
Contact: %s'); + return sprintf $fmt, $node->ip, + ((($node->vendor || '') =~ m/^[aeiou]/i) ? 'an' : 'a'), + ucfirst($node->vendor || ''), map {defined $_ ? $_ : ''} map {$node->$_} - (qw/serial vendor model os os_ver uptime_age location contact/); + (qw/model os os_ver serial uptime_age location contact/); } sub make_link_infostring {