mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-02 17:50:39 +00:00
use constants for topology names (missed a few)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user