diff --git a/render/expected/expected.go b/render/expected/expected.go index da27bcfeb8..b06079e7b7 100644 --- a/render/expected/expected.go +++ b/render/expected/expected.go @@ -131,7 +131,6 @@ var ( Pseudo: false, Shape: square, Stack: true, - NodeCount: 2, Children: report.MakeNodeSet( fixture.Report.Process.Nodes[fixture.ClientProcess1NodeID], fixture.Report.Process.Nodes[fixture.ClientProcess2NodeID], @@ -150,7 +149,6 @@ var ( Pseudo: false, Shape: square, Stack: true, - NodeCount: 1, Children: report.MakeNodeSet( fixture.Report.Process.Nodes[fixture.ServerProcessNodeID], ), @@ -168,7 +166,6 @@ var ( Pseudo: false, Shape: square, Stack: true, - NodeCount: 1, Children: report.MakeNodeSet( fixture.Report.Process.Nodes[fixture.NonContainerProcessNodeID], ), @@ -248,7 +245,6 @@ var ( Pseudo: false, Shape: hexagon, Stack: true, - NodeCount: 1, Children: report.MakeNodeSet( fixture.Report.Process.Nodes[fixture.ClientProcess1NodeID], fixture.Report.Process.Nodes[fixture.ClientProcess2NodeID], @@ -268,7 +264,6 @@ var ( Pseudo: false, Shape: hexagon, Stack: true, - NodeCount: 1, Children: report.MakeNodeSet( fixture.Report.Process.Nodes[fixture.ServerProcessNodeID], fixture.Report.Container.Nodes[fixture.ServerContainerNodeID], @@ -380,7 +375,6 @@ var ( Rank: "ping/pong-a", Pseudo: false, Shape: pentagon, - NodeCount: 1, Children: report.MakeNodeSet( fixture.Report.Process.Nodes[fixture.ClientProcess1NodeID], fixture.Report.Process.Nodes[fixture.ClientProcess2NodeID], @@ -401,7 +395,6 @@ var ( Rank: "ping/pong-b", Pseudo: false, Shape: pentagon, - NodeCount: 1, Children: report.MakeNodeSet( fixture.Report.Process.Nodes[fixture.ServerProcessNodeID], fixture.Report.Container.Nodes[fixture.ServerContainerNodeID], @@ -452,7 +445,6 @@ var ( Pseudo: false, Shape: pentagon, Stack: true, - NodeCount: 2, Children: report.MakeNodeSet( fixture.Report.Process.Nodes[fixture.ClientProcess1NodeID], fixture.Report.Process.Nodes[fixture.ClientProcess2NodeID], diff --git a/render/mapping.go b/render/mapping.go index 0391b834de..be6526634d 100644 --- a/render/mapping.go +++ b/render/mapping.go @@ -514,7 +514,6 @@ func MapCountProcessName(n RenderableNode, _ report.Networks) RenderableNodes { } processes, _ := n.Node.Counters.Lookup(processesKey) - n.NodeCount = processes if processes == 1 { n.LabelMinor = "1 process" } else { @@ -745,7 +744,6 @@ func MapCountContainers(n RenderableNode, _ report.Networks) RenderableNodes { } containers, _ := n.Node.Counters.Lookup(ContainersKey) - n.NodeCount = containers if containers == 1 { n.LabelMinor = "1 container" } else { @@ -762,7 +760,6 @@ func MapCountPods(n RenderableNode, _ report.Networks) RenderableNodes { } pods, _ := n.Node.Counters.Lookup(podsKey) - n.NodeCount = pods if pods == 1 { n.LabelMinor = "1 pod" } else { diff --git a/render/renderable_node.go b/render/renderable_node.go index 56413b9520..c35357cd8d 100644 --- a/render/renderable_node.go +++ b/render/renderable_node.go @@ -17,7 +17,6 @@ type RenderableNode struct { ControlNode string `json:"-"` // ID of node from which to show the controls in the UI Shape string `json:"shape"` // Shape node should be rendered as Stack bool `json:"stack"` // Should UI render this node as a stack? - NodeCount int `json:"node_count,omitempty"` // Number of nodes represented by this stack. report.EdgeMetadata `json:"metadata"` // Numeric sums report.Node @@ -43,7 +42,6 @@ func NewRenderableNode(id string) RenderableNode { EdgeMetadata: report.EdgeMetadata{}, Node: report.MakeNode(), Shape: Circle, - NodeCount: 0, } } @@ -59,7 +57,6 @@ func NewRenderableNodeWith(id, major, minor, rank string, node RenderableNode) R EdgeMetadata: node.EdgeMetadata.Copy(), Node: node.Node.Copy(), Shape: Circle, - NodeCount: 0, } } @@ -76,7 +73,6 @@ func NewDerivedNode(id string, node RenderableNode) RenderableNode { Node: node.Node.Copy(), ControlNode: "", // Do not propagate ControlNode when making a derived node! Shape: Circle, - NodeCount: 0, } } @@ -91,7 +87,6 @@ func newDerivedPseudoNode(id, major string, node RenderableNode) RenderableNode EdgeMetadata: node.EdgeMetadata.Copy(), Node: node.Node.Copy(), Shape: Circle, - NodeCount: 0, } } @@ -133,10 +128,6 @@ func (rn RenderableNode) Merge(other RenderableNode) RenderableNode { panic(result.ID) } - if result.NodeCount == 0 { - result.NodeCount = other.NodeCount - } - result.Stack = result.Stack || rn.Stack result.Children = rn.Children.Merge(other.Children) result.EdgeMetadata = rn.EdgeMetadata.Merge(other.EdgeMetadata) @@ -159,7 +150,6 @@ func (rn RenderableNode) Copy() RenderableNode { ControlNode: rn.ControlNode, Shape: rn.Shape, Stack: rn.Stack, - NodeCount: rn.NodeCount, } }