Merge commit '77949db'

This commit is contained in:
Paul Bellamy
2016-01-22 09:41:40 +00:00

View File

@@ -44,11 +44,11 @@ type NodeSummary struct {
// MakeNodeSummary summarizes a node, if possible.
func MakeNodeSummary(n report.Node) (NodeSummary, bool) {
renderers := map[string]func(report.Node) NodeSummary{
"process": processNodeSummary,
"container": containerNodeSummary,
"container_image": containerImageNodeSummary,
"pod": podNodeSummary,
"host": hostNodeSummary,
report.Process: processNodeSummary,
report.Container: containerNodeSummary,
report.ContainerImage: containerImageNodeSummary,
report.Pod: podNodeSummary,
report.Host: hostNodeSummary,
}
if renderer, ok := renderers[n.Topology]; ok {
return renderer(n), true