1
0
mirror of https://github.com/docker/docs.git synced 2026-10-31 10:34:26 +03:00

Merge pull request #1724 from nishanttotla/1689-UnknownPendingNodes

Adding default name (unknown) for pending engine
This commit is contained in:
Dongluo Chen
2016-02-01 13:38:26 -08:00

View File

@@ -837,7 +837,11 @@ func (c *Cluster) Info() [][2]string {
sort.Sort(cluster.EngineSorter(engines))
for _, engine := range engines {
info = append(info, [2]string{" " + engine.Name, engine.Addr})
engineName := "(unknown)"
if engine.Name != "" {
engineName = engine.Name
}
info = append(info, [2]string{" " + engineName, engine.Addr})
info = append(info, [2]string{" └ Status", engine.Status()})
info = append(info, [2]string{" └ Containers", fmt.Sprintf("%d", len(engine.Containers()))})
info = append(info, [2]string{" └ Reserved CPUs", fmt.Sprintf("%d / %d", engine.UsedCpus(), engine.TotalCpus())})