mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-23 07:16:47 +00:00
don't bother tracking the orignal node topology
We always join with the original renderer and hence all the nodes produced by ipToNode will get their other data, including topology, via that route.
This commit is contained in:
@@ -43,7 +43,6 @@ var ContainerRenderer = MakeFilter(
|
||||
var mapEndpoint2IP = MakeMap(endpoint2IP, SelectEndpoint)
|
||||
|
||||
const originalNodeID = "original_node_id"
|
||||
const originalNodeTopology = "original_node_topology"
|
||||
|
||||
// ConnectionJoin joins the given renderer with connections from the
|
||||
// endpoints topology, using the toIPs function to extract IPs from
|
||||
@@ -55,8 +54,7 @@ func ConnectionJoin(toIPs func(report.Node) []string, r Renderer) Renderer {
|
||||
result[ip] = NewDerivedNode(ip, n).
|
||||
WithTopology(IP).
|
||||
WithLatests(map[string]string{
|
||||
originalNodeID: n.ID,
|
||||
originalNodeTopology: n.Topology,
|
||||
originalNodeID: n.ID,
|
||||
}).
|
||||
WithCounters(map[string]int{IP: 1})
|
||||
}
|
||||
@@ -94,15 +92,8 @@ func ipToNode(n report.Node, _ report.Networks) report.Nodes {
|
||||
if !ok {
|
||||
return report.Nodes{}
|
||||
}
|
||||
topology, ok := n.Latest.Lookup(originalNodeTopology)
|
||||
if !ok {
|
||||
return report.Nodes{}
|
||||
}
|
||||
|
||||
return report.Nodes{
|
||||
id: NewDerivedNode(id, n).
|
||||
WithTopology(topology),
|
||||
}
|
||||
return report.Nodes{id: NewDerivedNode(id, n)}
|
||||
}
|
||||
|
||||
// endpoint2IP maps endpoint nodes to their IP address, for joining
|
||||
|
||||
Reference in New Issue
Block a user