Skip to content

Commit

Permalink
Because we filter on image name we need the image name before filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbellamy committed Apr 25, 2016
1 parent 949165d commit a426ca2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions render/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func ContainerImageRenderer(filter Decorator) Renderer {
MakeReduce(
MakeMap(
MapContainer2ContainerImage,
filter(ContainerRenderer),
filter(ContainerWithImageNameRenderer),
),
SelectContainerImage,
),
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion render/detailed/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion render/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func PodRenderer(filter Decorator) Renderer {
},
ColorConnected(MakeMap(
MapContainer2Pod,
filter(ContainerRenderer),
filter(ContainerWithImageNameRenderer),
)),
),
SelectPod,
Expand Down

0 comments on commit a426ca2

Please sign in to comment.