mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 01:31:17 +00:00
Show container image details for containers.
This commit is contained in:
@@ -131,8 +131,8 @@ func MapContainerIdentity(m RenderableNode, _ report.Networks) RenderableNodes {
|
||||
|
||||
node := NewRenderableNodeWith(id, major, minor, rank, m)
|
||||
if imageID, ok := m.Metadata[docker.ImageID]; ok {
|
||||
scope, _, _ := report.ParseContainerNodeID(m.ID)
|
||||
node.Origins = node.Origins.Add(report.MakeContainerNodeID(scope, imageID))
|
||||
hostID, _, _ := report.ParseContainerNodeID(m.ID)
|
||||
node.Origins = node.Origins.Add(report.MakeContainerNodeID(hostID, imageID))
|
||||
}
|
||||
return RenderableNodes{id: node}
|
||||
}
|
||||
|
||||
@@ -121,10 +121,10 @@ func ParseEndpointNodeID(endpointNodeID string) (hostID, address, port string, o
|
||||
return fields[0], fields[1], fields[2], true
|
||||
}
|
||||
|
||||
// ParseContainerNodeID produces the host ID, and container id from an container
|
||||
// ParseContainerNodeID produces the host and container id from an container
|
||||
// node ID.
|
||||
func ParseContainerNodeID(containerNodeID string) (hostID, containerID string, ok bool) {
|
||||
fields := strings.SplitN(containerNodeID, ScopeDelim, 3)
|
||||
fields := strings.SplitN(containerNodeID, ScopeDelim, 2)
|
||||
if len(fields) != 2 {
|
||||
return "", "", false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user