feat: Add colored node labels by type and clean up display format

This commit is contained in:
Jose Luis Montañes Ojados
2026-01-19 14:48:03 +01:00
parent 7375539def
commit 7cb29c45e3
3 changed files with 163 additions and 2 deletions

View File

@@ -56,7 +56,7 @@ func (nm *NetworkMap) FindByIP(ip string) *NetworkNode {
// LabelForIP returns a human-readable label for an IP, or the IP itself if unknown
func (nm *NetworkMap) LabelForIP(ip string) string {
if node := nm.FindByIP(ip); node != nil {
return node.Name + " (" + string(node.Type) + ")"
return node.Name
}
return ip
}