DockerCLI/command/formatter
Yong Tang af80020ef2 Fix Windows `docker stats` showing Linux headers
This fix is an attempt to fix issue raised in #28005 where
`docker stats` on Windows shows Linux headers if there is
no containers in stats.

The reason for the issue is that, in case there is no container,
a header is faked in:
https://github.com/docker/docker/blob/v1.13.0/cli/command/formatter/formatter.go#L74-L78
which does not know OS type information (as OS was stored with container stat entries)

This fix tries to fix the issue by moving OS type information
to stats context (instead of individual container stats entry).

Additional unit tests have been added.

This fix fixes #28005.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-02-05 08:55:30 -08:00
..
container.go Add Networks placeholder to ps --format 2016-10-20 07:41:56 -07:00
container_test.go Fix several issues with `go vet` and `go fmt` 2016-11-17 06:31:28 -08:00
custom.go Refactor formatter. 2016-09-13 17:58:12 -04:00
custom_test.go Move api/client -> cli/command 2016-09-08 15:46:29 -04:00
disk_usage.go Ensure proper value is used when computing reclaimable space 2017-01-23 13:57:20 -08:00
formatter.go Move templates to pkg/templates 2016-12-12 09:34:03 +01:00
image.go Merge pull request #30043 from dmcgowan/distribution-reference-update-1 2017-01-24 20:38:20 -08:00
image_test.go Generate api/types:Image from the swagger spec 2016-10-20 13:24:23 -07:00
network.go Add `.CreatedAt` placeholder for `docker network ls --format` 2017-01-04 15:18:44 -08:00
network_test.go Add `.CreatedAt` placeholder for `docker network ls --format` 2017-01-04 15:18:44 -08:00
plugin.go Add docker plugin upgrade 2017-02-03 16:21:12 -05:00
plugin_test.go Add docker plugin upgrade 2017-02-03 16:21:12 -05:00
reflect.go Fix broken JSON support in cli/command/formatter 2016-10-17 08:07:17 +00:00
reflect_test.go Fix broken JSON support in cli/command/formatter 2016-10-17 08:07:17 +00:00
service.go Add `--format` to `docker service ls` 2017-02-01 08:33:19 -08:00
service_test.go Add `--format` to `docker service ls` 2017-02-01 08:33:19 -08:00
stats.go Fix Windows `docker stats` showing Linux headers 2017-02-05 08:55:30 -08:00
stats_test.go Fix Windows `docker stats` showing Linux headers 2017-02-05 08:55:30 -08:00
volume.go Merge pull request #26519 from AkihiroSuda/fix-cli-command-formatter-json-support 2016-10-17 22:44:04 +01:00
volume_test.go Merge pull request #26519 from AkihiroSuda/fix-cli-command-formatter-json-support 2016-10-17 22:44:04 +01:00