Make merging of node children conditional in addToResults

Some operations won't want this.
This commit is contained in:
Bryan Boreham
2017-11-21 21:45:16 +00:00
committed by Matthias Radestock
parent e475c2af1d
commit db41cab0af
4 changed files with 11 additions and 9 deletions
+3 -3
View File
@@ -94,7 +94,7 @@ func (e endpoints2Processes) Render(rpt report.Report) Nodes {
// Nodes without a hostid are treated as pseudo nodes
if hostNodeID, ok := n.Latest.Lookup(report.HostNodeID); !ok {
if id, ok := pseudoNodeID(n, local); ok {
ret.addToResults(n, id, newPseudoNode)
ret.addToResults(n, id, true, newPseudoNode)
}
} else {
pid, timestamp, ok := n.Latest.LookupEntry(process.PID)
@@ -111,7 +111,7 @@ func (e endpoints2Processes) Render(rpt report.Report) Nodes {
hostID, _, _ := report.ParseNodeID(hostNodeID)
id := report.MakeProcessNodeID(hostID, pid)
ret.addToResults(n, id, func(id string) report.Node {
ret.addToResults(n, id, true, func(id string) report.Node {
if processNode, found := processes.Nodes[id]; found {
return processNode
}
@@ -137,7 +137,7 @@ func processes2Names(processes Nodes) Nodes {
} else {
name, timestamp, ok := n.Latest.LookupEntry(process.Name)
if ok {
ret.addToResults(n, name, func(id string) report.Node {
ret.addToResults(n, name, true, func(id string) report.Node {
return report.MakeNode(id).WithTopology(MakeGroupNodeTopology(n.Topology, process.Name)).
WithLatest(process.Name, timestamp, name)
}, n.Topology)