mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 17:51:21 +00:00
Review Feedback
Squash of: - including children in topologies_test.go - report.Node.Prune should prune children also - rewrote ShortLivedInternetConnections test to express its intent - adding tests for detail Summary rendering
This commit is contained in:
@@ -219,8 +219,13 @@ func (n Node) Merge(other Node) Node {
|
||||
// for rendering nodes and edges stripped away. Specifically, that means
|
||||
// cutting out parts of the Node.
|
||||
func (n Node) Prune() Node {
|
||||
prunedChildren := MakeNodeSet()
|
||||
n.Children.ForEach(func(child Node) {
|
||||
prunedChildren = prunedChildren.Add(child.Prune())
|
||||
})
|
||||
return MakeNode().
|
||||
WithID(n.ID).
|
||||
WithTopology(n.Topology).
|
||||
WithAdjacent(n.Adjacency.Copy()...)
|
||||
WithAdjacent(n.Adjacency.Copy()...).
|
||||
WithChildren(prunedChildren)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user