Merge pull request #908 from containous/fix-swarm-panic

Fix Swarm panic
This commit is contained in:
Emile Vauge 2016-11-29 14:47:51 +01:00 committed by GitHub
commit 4e527304d0

View file

@ -560,6 +560,10 @@ func parseContainer(container dockertypes.ContainerJSON) dockerData {
if container.ContainerJSONBase.HostConfig != nil { if container.ContainerJSONBase.HostConfig != nil {
dockerData.NetworkSettings.NetworkMode = container.ContainerJSONBase.HostConfig.NetworkMode dockerData.NetworkSettings.NetworkMode = container.ContainerJSONBase.HostConfig.NetworkMode
} }
if container.State != nil && container.State.Health != nil {
dockerData.Health = container.State.Health.Status
}
} }
if container.Config != nil && container.Config.Labels != nil { if container.Config != nil && container.Config.Labels != nil {
@ -583,10 +587,6 @@ func parseContainer(container dockertypes.ContainerJSON) dockerData {
} }
if container.State != nil && container.State.Health != nil {
dockerData.Health = container.State.Health.Status
}
return dockerData return dockerData
} }