Better progress display: “Group xxx” for container group creation, then separate lines for containers.

For single containers, there was a single mixed line now that the group and the container have the same name.
```
 $ ./bin/docker --context acitest run nginx
[+] Running 2/2
⠿ Group strange-bartik  Created         4.2s
⠿ strange-bartik        Done            20.6s
strange-bartik
``
This commit is contained in:
Guillaume Tardif 2020-07-10 14:41:13 +02:00 committed by Djordje Lukic
parent e2b0ee08ac
commit 042fb66ad8
2 changed files with 4 additions and 3 deletions

View File

@ -71,8 +71,9 @@ func createOrUpdateACIContainers(ctx context.Context, aciContext store.AciContex
if err != nil {
return errors.Wrapf(err, "cannot get container group client")
}
groupDisplay := "Group " + *groupDefinition.Name
w.Event(progress.Event{
ID: *groupDefinition.Name,
ID: groupDisplay,
Status: progress.Working,
StatusText: "Waiting",
})
@ -88,7 +89,7 @@ func createOrUpdateACIContainers(ctx context.Context, aciContext store.AciContex
}
w.Event(progress.Event{
ID: *groupDefinition.Name,
ID: groupDisplay,
Status: progress.Done,
StatusText: "Created",
})

View File

@ -132,7 +132,7 @@ func (cs *aciContainerService) List(ctx context.Context, _ bool) ([]containers.C
if _, ok := group.Tags[singleContainerTag]; ok {
if group.Containers == nil || len(*group.Containers) < 1 {
return []containers.Container{}, fmt.Errorf("found no containers in ACI container group %s", *containerGroup.Name)
return []containers.Container{}, fmt.Errorf("no containers found in ACI container group %s", *containerGroup.Name)
}
container := (*group.Containers)[0]
c := getContainer(*containerGroup.Name, group.IPAddress, container)