use constants for topology names (missed a few)

This commit is contained in:
Paul Bellamy
2016-01-20 15:34:23 +00:00
parent bfa40f9f4b
commit 77949db711

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