Merge pull request #1248 from weaveworks/1247-no-blank-connection-ports

better detection of endpoint children, to avoid including MapX2IP results
This commit is contained in:
Tom Wilkie
2016-04-07 16:41:20 +01:00

View File

@@ -137,7 +137,7 @@ func outgoingConnectionsTable(topologyID string, n report.Node, ns report.Nodes)
func endpointChildrenOf(n report.Node) []report.Node {
result := []report.Node{}
n.Children.ForEach(func(child report.Node) {
if _, _, _, ok := report.ParseEndpointNodeID(child.ID); ok {
if child.Topology == report.Endpoint {
result = append(result, child)
}
})
@@ -147,7 +147,7 @@ func endpointChildrenOf(n report.Node) []report.Node {
func endpointChildIDsOf(n report.Node) report.IDList {
result := report.MakeIDList()
n.Children.ForEach(func(child report.Node) {
if _, _, _, ok := report.ParseEndpointNodeID(child.ID); ok {
if child.Topology == report.Endpoint {
result = result.Add(child.ID)
}
})