From 1b554baa91177be5aea1e8af2e1ab91efa6339b4 Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Mon, 8 Feb 2016 11:32:10 +0000 Subject: [PATCH] Reorder the children tables in the details panel The Container images was first on hosts, but is probably the least useful, so this moves it to the bottom. In general, it needs more thought put into the detail panel contents, but this is a quick fix to re-prioritize the data. --- render/detailed/node.go | 2 +- render/detailed/node_test.go | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/render/detailed/node.go b/render/detailed/node.go index 9b03cf9b4..f3f5504bd 100644 --- a/render/detailed/node.go +++ b/render/detailed/node.go @@ -85,9 +85,9 @@ var ( }{ {report.Host, NodeSummaryGroup{TopologyID: "hosts", Label: "Hosts", Columns: []string{host.CPUUsage, host.MemoryUsage}}}, {report.Pod, NodeSummaryGroup{TopologyID: "pods", Label: "Pods", Columns: []string{}}}, - {report.ContainerImage, NodeSummaryGroup{TopologyID: "containers-by-image", Label: "Container Images", Columns: []string{render.ContainersKey}}}, {report.Container, NodeSummaryGroup{TopologyID: "containers", Label: "Containers", Columns: []string{docker.CPUTotalUsage, docker.MemoryUsage}}}, {report.Process, NodeSummaryGroup{TopologyID: "processes", Label: "Processes", Columns: []string{process.PID, process.CPUUsage, process.MemoryUsage}}}, + {report.ContainerImage, NodeSummaryGroup{TopologyID: "containers-by-image", Label: "Container Images", Columns: []string{render.ContainersKey}}}, } ) diff --git a/render/detailed/node_test.go b/render/detailed/node_test.go index 200265143..7c97a7f3f 100644 --- a/render/detailed/node_test.go +++ b/render/detailed/node_test.go @@ -82,12 +82,6 @@ func TestMakeDetailedHostNode(t *testing.T) { Pseudo: false, Controls: []detailed.ControlInstance{}, Children: []detailed.NodeSummaryGroup{ - { - Label: "Container Images", - TopologyID: "containers-by-image", - Columns: []string{render.ContainersKey}, - Nodes: []detailed.NodeSummary{containerImageNodeSummary}, - }, { Label: "Containers", TopologyID: "containers", @@ -100,6 +94,12 @@ func TestMakeDetailedHostNode(t *testing.T) { Columns: []string{process.PID, process.CPUUsage, process.MemoryUsage}, Nodes: []detailed.NodeSummary{process1NodeSummary, process2NodeSummary}, }, + { + Label: "Container Images", + TopologyID: "containers-by-image", + Columns: []string{render.ContainersKey}, + Nodes: []detailed.NodeSummary{containerImageNodeSummary}, + }, }, } if !reflect.DeepEqual(want, have) {