feat: Update node label format to Name (Type) without outer parentheses
This commit is contained in:
BIN
inspector.exe
BIN
inspector.exe
Binary file not shown.
@@ -1,5 +1,7 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
// NodeType represents the type of network node
|
// NodeType represents the type of network node
|
||||||
type NodeType string
|
type NodeType string
|
||||||
|
|
||||||
@@ -56,7 +58,7 @@ func (nm *NetworkMap) FindByIP(ip string) *NetworkNode {
|
|||||||
// LabelForIP returns a human-readable label for an IP, or the IP itself if unknown
|
// LabelForIP returns a human-readable label for an IP, or the IP itself if unknown
|
||||||
func (nm *NetworkMap) LabelForIP(ip string) string {
|
func (nm *NetworkMap) LabelForIP(ip string) string {
|
||||||
if node := nm.FindByIP(ip); node != nil {
|
if node := nm.FindByIP(ip); node != nil {
|
||||||
return node.Name
|
return fmt.Sprintf("%s (%s)", node.Name, node.Type)
|
||||||
}
|
}
|
||||||
return ip
|
return ip
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -793,7 +793,7 @@ func (m Model) renderCallDetail() string {
|
|||||||
node := m.networkMap.FindByIP(mediaIP)
|
node := m.networkMap.FindByIP(mediaIP)
|
||||||
label = m.styleForNode(node).Render(label)
|
label = m.styleForNode(node).Render(label)
|
||||||
}
|
}
|
||||||
b.WriteString(fmt.Sprintf(" SDP Media: %s (%s)\n", mediaIP, label))
|
b.WriteString(fmt.Sprintf(" SDP Media: %s %s\n", mediaIP, label))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user