render sensible labels for swarm service nodes with little/no metadata

We fall back to using the service ID as the label.
This commit is contained in:
Matthias Radestock
2017-12-21 17:47:22 +00:00
parent 9aed0792ac
commit 5e099640eb

View File

@@ -323,6 +323,9 @@ func ecsServiceNodeSummary(base NodeSummary, n report.Node) (NodeSummary, bool)
func swarmServiceNodeSummary(base NodeSummary, n report.Node) (NodeSummary, bool) {
base.Label, _ = n.Latest.Lookup(docker.ServiceName)
if base.Label == "" {
base.Label, _ = report.ParseSwarmServiceNodeID(n.ID)
}
return base, true
}