DockerCLI/cli/command/system
Sebastiaan van Stijn 26e004797b
Make system prune warning filters human-readable
The warning, printed before running `docker system prune` was printing the
filters in JSON format.

This patch attempts to make the output human readable;

- updating the code, and template to print filters individually
- reducing the indentation (which was quite deep)

Before this patch was applied;

```
docker system prune --filter until=24h --filter label=hello-world --filter label!=foo=bar --filter label=bar=baz

WARNING! This will remove:
        - all stopped containers
        - all networks not used by at least one container
        - all dangling images
        - all dangling build cache
        - Elements to be pruned will be filtered with:
        - label={"label":{"bar=baz":true,"hello-world":true},"label!":{"foo=bar":true},"until":{"24h":true}}
Are you sure you want to continue? [y/N]
```

With this patch applied;

```
WARNING! This will remove:
  - all stopped containers
  - all networks not used by at least one container
  - all dangling images
  - all dangling build cache

  Items to be pruned will be filtered with:
  - label!=foo=bar
  - label!=never=remove-me
  - label=bar=baz
  - label=hello-world
  - label=remove=me
  - until=24h

Are you sure you want to continue? [y/N]
```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-03-18 13:57:18 +01:00
..
testdata bump docker/docker to 8aca18d631f3f72d4c6e3dc01b6e5d468ad941b8 2019-03-02 13:41:42 +01:00
client_test.go Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
cmd.go Revert "Disable `docker system dial-stdio` on Windows" 2019-03-12 14:57:52 +00:00
df.go system/df: allow -v with --format 2018-09-13 23:14:58 +00:00
dial_stdio.go dial-stdio: Close the connection 2019-03-12 14:57:40 +00:00
events.go Switch from x/net/context to context 2018-05-11 16:49:43 -07:00
info.go Reformat the output of CLI plugins in `docker system info` 2019-02-25 13:13:51 +00:00
info_test.go Reformat the output of CLI plugins in `docker system info` 2019-02-25 13:13:51 +00:00
inspect.go Use command.Cli interface instead of concrete type… 2018-06-14 16:26:47 +02:00
prune.go Make system prune warning filters human-readable 2019-03-18 13:57:18 +01:00
prune_test.go Make system prune warning filters human-readable 2019-03-18 13:57:18 +01:00
version.go Move versioning variables to a separate package. 2019-01-29 11:26:40 +00:00
version_test.go Extend version-align test with components 2018-07-12 01:31:23 +02:00