From a0fb2e1d735cd54d7837534ddf7269e134f8faff Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Wed, 5 Jul 2017 12:48:55 +0100 Subject: [PATCH 1/2] cosmetic(ish) --- render/detailed/node.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/render/detailed/node.go b/render/detailed/node.go index 1d620338a..dabb90bd1 100644 --- a/render/detailed/node.go +++ b/render/detailed/node.go @@ -135,7 +135,6 @@ var nodeSummaryGroupSpecs = []struct { topologyID: report.Pod, NodeSummaryGroup: NodeSummaryGroup{ Label: "Pods", - Columns: []Column{ {ID: kubernetes.State, Label: "State"}, {ID: report.Container, Label: "# Containers", Datatype: "number"}, @@ -155,7 +154,8 @@ var nodeSummaryGroupSpecs = []struct { { topologyID: report.Container, NodeSummaryGroup: NodeSummaryGroup{ - Label: "Containers", Columns: []Column{ + Label: "Containers", + Columns: []Column{ {ID: docker.CPUTotalUsage, Label: "CPU", Datatype: "number"}, {ID: docker.MemoryUsage, Label: "Memory", Datatype: "number"}, }, @@ -164,7 +164,8 @@ var nodeSummaryGroupSpecs = []struct { { topologyID: report.Process, NodeSummaryGroup: NodeSummaryGroup{ - Label: "Processes", Columns: []Column{ + Label: "Processes", + Columns: []Column{ {ID: process.PID, Label: "PID", Datatype: "number"}, {ID: process.CPUUsage, Label: "CPU", Datatype: "number"}, {ID: process.MemoryUsage, Label: "Memory", Datatype: "number"}, @@ -174,8 +175,7 @@ var nodeSummaryGroupSpecs = []struct { { topologyID: report.ContainerImage, NodeSummaryGroup: NodeSummaryGroup{ - TopologyID: "containers-by-image", - Label: "Container Images", + Label: "Container Images", Columns: []Column{ {ID: report.Container, Label: "# Containers", DefaultSort: true, Datatype: "number"}, }, From 0f4d17d868b60a82d6665cb0fc3ce32619b1d17b Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Wed, 5 Jul 2017 13:02:00 +0100 Subject: [PATCH 2/2] don't show container count in host detail panel image list The figure is inaccurate since it counts containers across all hosts. Getting the count correct is non-trivial, so it's better to not show the figure at all. NB: the count still shows up on mouse-over of the link, but that is defensible and not (very) confusing since the link represents the image, not the image on a particular host, and it's the same count that show up as the minor label in the container images view. Fixes #2681. --- render/detailed/node.go | 6 ++---- render/detailed/node_test.go | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/render/detailed/node.go b/render/detailed/node.go index dabb90bd1..8e211b813 100644 --- a/render/detailed/node.go +++ b/render/detailed/node.go @@ -175,10 +175,8 @@ var nodeSummaryGroupSpecs = []struct { { topologyID: report.ContainerImage, NodeSummaryGroup: NodeSummaryGroup{ - Label: "Container Images", - Columns: []Column{ - {ID: report.Container, Label: "# Containers", DefaultSort: true, Datatype: "number"}, - }, + Label: "Container Images", + Columns: []Column{}, }, }, } diff --git a/render/detailed/node_test.go b/render/detailed/node_test.go index 7ea17631d..d7c213ae4 100644 --- a/render/detailed/node_test.go +++ b/render/detailed/node_test.go @@ -132,10 +132,8 @@ func TestMakeDetailedHostNode(t *testing.T) { { Label: "Container Images", TopologyID: "containers-by-image", - Columns: []detailed.Column{ - {ID: report.Container, Label: "# Containers", DefaultSort: true, Datatype: "number"}, - }, - Nodes: []detailed.NodeSummary{containerImageNodeSummary}, + Columns: []detailed.Column{}, + Nodes: []detailed.NodeSummary{containerImageNodeSummary}, }, }, Connections: []detailed.ConnectionsSummary{