Skip to content

Commit

Permalink
Rollback aggNode.nodeCount which was used for the stack shape.
Browse files Browse the repository at this point in the history
We're not using greyed out lower stacks for now.
  • Loading branch information
foot committed Feb 22, 2016
1 parent d77bbdc commit b2423d5
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 21 deletions.
8 changes: 0 additions & 8 deletions render/expected/expected.go
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand All @@ -150,7 +149,6 @@ var (
Pseudo: false,
Shape: square,
Stack: true,
NodeCount: 1,
Children: report.MakeNodeSet(
fixture.Report.Process.Nodes[fixture.ServerProcessNodeID],
),
Expand All @@ -168,7 +166,6 @@ var (
Pseudo: false,
Shape: square,
Stack: true,
NodeCount: 1,
Children: report.MakeNodeSet(
fixture.Report.Process.Nodes[fixture.NonContainerProcessNodeID],
),
Expand Down Expand Up @@ -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],
Expand All @@ -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],
Expand Down Expand Up @@ -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],
Expand All @@ -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],
Expand Down Expand Up @@ -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],
Expand Down
3 changes: 0 additions & 3 deletions render/mapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
10 changes: 0 additions & 10 deletions render/renderable_node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -43,7 +42,6 @@ func NewRenderableNode(id string) RenderableNode {
EdgeMetadata: report.EdgeMetadata{},
Node: report.MakeNode(),
Shape: Circle,
NodeCount: 0,
}
}

Expand All @@ -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,
}
}

Expand All @@ -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,
}
}

Expand All @@ -91,7 +87,6 @@ func newDerivedPseudoNode(id, major string, node RenderableNode) RenderableNode
EdgeMetadata: node.EdgeMetadata.Copy(),
Node: node.Node.Copy(),
Shape: Circle,
NodeCount: 0,
}
}

Expand Down Expand Up @@ -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)
Expand All @@ -159,7 +150,6 @@ func (rn RenderableNode) Copy() RenderableNode {
ControlNode: rn.ControlNode,
Shape: rn.Shape,
Stack: rn.Stack,
NodeCount: rn.NodeCount,
}
}

Expand Down

0 comments on commit b2423d5

Please sign in to comment.