Add TP-Link AP support with wireless client sub-locations
- Add NodeType enum (switch, ap, wireless_client, wired_client) - Poll SNMPv2c and SNMPv3 in parallel to win race with ping - Render APs with bordered sub-locations containing wireless clients - Fall back to parent interface stats when child lacks them - Log when unreachable nodes become reachable via merge Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
7
link.go
7
link.go
@@ -82,6 +82,13 @@ func (n *Nodes) getDirectLinks() []*Link {
|
||||
key := makeLinkKey(lh.node, lh.port, target, targetIface)
|
||||
if !seen[key] {
|
||||
seen[key] = true
|
||||
if target.Type == "" {
|
||||
if lh.node.Type == NodeTypeSwitch {
|
||||
target.Type = NodeTypeWiredClient
|
||||
} else if lh.node.Type == NodeTypeAP {
|
||||
target.Type = NodeTypeWirelessClient
|
||||
}
|
||||
}
|
||||
links = append(links, &Link{
|
||||
ID: newID("link"),
|
||||
NodeA: lh.node,
|
||||
|
||||
Reference in New Issue
Block a user