1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
Commit graph

8 commits

Author SHA1 Message Date
Yong Tang
ea61dac9e6 Allow --format to use different delim in table format
This fix is an attempt to address
https://github.com/docker/docker/pull/28213#issuecomment-273840405

Currently when specify table format with table `--format "table {{.ID}}..."`,
the delimiter in the header section of the table is always `"\t"`.
That is actually different from the content of the table as the delimiter
could be anything (or even contatenated with `.`, for example):
```
$ docker service ps web --format 'table {{.Name}}.{{.ID}}' --no-trunc

NAME                ID
web.1.inyhxhvjcijl0hdbu8lgrwwh7
 \_ web.1.p9m4kx2srjqmfms4igam0uqlb
```

This fix is an attampt to address the skewness of the table when delimiter
is not `"\t"`.

The basic idea is that, when header consists of `table` key, the header section
will be redendered the same way as content section. A map mapping each
placeholder name to the HEADER entry name is used for the context of the header.

Unit tests have been updated and added to cover the changes.

This fix is related to #28313.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2017-02-10 19:34:50 -08:00
Derek McGowan
3a1279393f
Use distribution reference
Remove forked reference package. Use normalized named values
everywhere and familiar functions to convert back to familiar
strings for UX and storage compatibility.

Enforce that the source repository in the distribution metadata
is always a normalized string, ignore invalid values which are not.
Update distribution tests to use normalized values.

Signed-off-by: Derek McGowan <derek@mcgstyle.net> (github: dmcgowan)
2017-02-07 11:08:37 -08:00
Kenfe-Mickael Laventure
dcc1b4baf6 Ensure proper value is used when computing reclaimable space
When Size was reverted to be equal to VirtualSize, the df command
formatter was not correctly updated to account for the change.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2017-01-23 13:57:20 -08:00
Akihiro Suda
26013fcdd6 Fix broken JSON support in cli/command/formatter
How to test (it should not print `{}`, and just returns JSON with the actual data):

   $ docker images --format '{{json .}}'
   $ docker container stats --format '{{json .}}'

Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2017-01-19 09:51:13 +00:00
kaiwentan
b8155bd5be correct all the formate to formatter
Signed-off-by: kaiwentan <kaiwentan@harmonycloud.cn>
2017-01-19 11:26:49 +08:00
Daniel Nephin
b06c352783 Generate api/types:Image from the swagger spec
and rename it to a more appropriate name ImageSummary.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-20 13:24:23 -07:00
Kenfe-Mickael Laventure
d36952749d Move types.Volumes optional fields under a new type
This allows us to hide those fields when they are not filled.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-10-11 11:49:26 -07:00
Kenfe-Mickael Laventure
b650a7bd27 Add new df subcomand to the system command
This command display the state of the data usage of the docker daemon.

Signed-off-by: Kenfe-Mickael Laventure <mickael.laventure@gmail.com>
2016-09-30 14:35:23 -07:00