Skip to content

Commit

Permalink
extract label from id when summarising un[contained,managed]
Browse files Browse the repository at this point in the history
I missed this in #2998.
  • Loading branch information
rade committed Dec 28, 2017
1 parent 5a6a6df commit 3d1a44a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion render/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const (
)

// UncontainedIDPrefix is the prefix of uncontained pseudo nodes
var UncontainedIDPrefix = MakePseudoNodeID(UncontainedID)
var UncontainedIDPrefix = MakePseudoNodeID(UncontainedID, "")

// ContainerRenderer is a Renderer which produces a renderable container
// graph by merging the process graph and the container topology.
Expand Down
4 changes: 2 additions & 2 deletions render/detailed/summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,13 @@ func pseudoNodeSummary(base BasicNodeSummary, n report.Node) BasicNodeSummary {
case strings.HasPrefix(n.ID, render.UncontainedIDPrefix):
// render as an uncontained node
base.Label = render.UncontainedMajor
base.LabelMinor = report.ExtractHostID(n)
base.LabelMinor = n.ID[len(render.UncontainedIDPrefix):]
base.Shape = report.Square
base.Stack = true
case strings.HasPrefix(n.ID, render.UnmanagedIDPrefix):
// render as an unmanaged node
base.Label = render.UnmanagedMajor
base.LabelMinor = report.ExtractHostID(n)
base.LabelMinor = n.ID[len(render.UnmanagedIDPrefix):]
base.Shape = report.Square
base.Stack = true
default:
Expand Down
2 changes: 1 addition & 1 deletion render/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const (
)

// UnmanagedIDPrefix is the prefix of unmanaged pseudo nodes
var UnmanagedIDPrefix = MakePseudoNodeID(UnmanagedID)
var UnmanagedIDPrefix = MakePseudoNodeID(UnmanagedID, "")

func renderKubernetesTopologies(rpt report.Report) bool {
// Render if any k8s topology has any nodes
Expand Down

0 comments on commit 3d1a44a

Please sign in to comment.