From a426ca256d71f0431e94fc4e9b614393289d22ce Mon Sep 17 00:00:00 2001 From: Paul Bellamy Date: Mon, 25 Apr 2016 10:53:39 +0100 Subject: [PATCH] Because we filter on image name we need the image name before filtering --- render/container.go | 4 ++-- render/detailed/node_test.go | 2 +- render/pod.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/render/container.go b/render/container.go index 3c04e0c62c..f74cfaa46c 100644 --- a/render/container.go +++ b/render/container.go @@ -149,7 +149,7 @@ func ContainerImageRenderer(filter Decorator) Renderer { MakeReduce( MakeMap( MapContainer2ContainerImage, - filter(ContainerRenderer), + filter(ContainerWithImageNameRenderer), ), SelectContainerImage, ), @@ -163,7 +163,7 @@ func ContainerHostnameRenderer(filter Decorator) Renderer { MakeReduce( MakeMap( MapContainer2Hostname, - filter(ContainerRenderer), + filter(ContainerWithImageNameRenderer), ), // Grab *all* the hostnames, so we can count the number which were empty // for accurate stats. diff --git a/render/detailed/node_test.go b/render/detailed/node_test.go index 386685ab14..a340c67ceb 100644 --- a/render/detailed/node_test.go +++ b/render/detailed/node_test.go @@ -305,7 +305,7 @@ func TestMakeDetailedPodNode(t *testing.T) { } have := detailed.MakeNode("pods", fixture.Report, renderableNodes, renderableNode) - containerNodeSummary := child(t, render.ContainerRenderer, fixture.ServerContainerNodeID) + containerNodeSummary := child(t, render.ContainerWithImageNameRenderer, fixture.ServerContainerNodeID) serverProcessNodeSummary := child(t, render.ProcessRenderer, fixture.ServerProcessNodeID) serverProcessNodeSummary.Linkable = true // Temporary workaround for: https://github.com/weaveworks/scope/issues/1295 want := detailed.Node{ diff --git a/render/pod.go b/render/pod.go index 469bab5c95..de37de7d3f 100644 --- a/render/pod.go +++ b/render/pod.go @@ -26,7 +26,7 @@ func PodRenderer(filter Decorator) Renderer { }, ColorConnected(MakeMap( MapContainer2Pod, - filter(ContainerRenderer), + filter(ContainerWithImageNameRenderer), )), ), SelectPod,