DockerCLI/cli/command/formatter
Sebastiaan van Stijn e63417a9c0
Add --no-trunc option to docker container stats
This patch adds a `--no-trunc` option to `docker container stats`;

With this patch applied, the default output is:

    CONTAINER ID        NAME                                    CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
    b95a83497c91        awesome_brattain                        0.28%               5.629MiB / 1.952GiB   0.28%               916B / 0B           147kB / 0B          9
    67b2525d8ad1        foobar                                  0.00%               1.727MiB / 1.952GiB   0.09%               2.48kB / 0B         4.11MB / 0B         2
    e5c383697914        test-1951.1.kay7x1lh1twk9c0oig50sd5tr   0.00%               196KiB / 1.952GiB     0.01%               71.2kB / 0B         770kB / 0B          1
    4bda148efbc0        random.1.vnc8on831idyr42slu578u3cr      0.00%               1.672MiB / 1.952GiB   0.08%               110kB / 0B          578kB / 0B          2
    84e3deaa45b2        registry                                0.01%               3.402MiB / 1.952GiB   0.17%               127kB / 378B        233kB / 0B          10
    2ed915778ceb        foo.1.lsmxrefn5yp9c9ijz1hzgdq4u         0.00%               1.727MiB / 1.952GiB   0.09%               166kB / 7.76kB      614kB / 0B          2

Addin the `--no-trunc` option, changes the output to:

    CONTAINER ID                                                       NAME                                    CPU %               MEM USAGE / LIMIT     MEM %               NET I/O             BLOCK I/O           PIDS
    b95a83497c9161c9b444e3d70e1a9dfba0c1840d41720e146a95a08ebf938afc   awesome_brattain                        0.25%               5.75MiB / 1.952GiB    0.29%               648B / 0B           147kB / 0B          10
    67b2525d8ad10bb236a49960e93c09993b0baabeef12c2d46cd5f4fbb6f4808c   foobar                                  0.00%               1.727MiB / 1.952GiB   0.09%               2.35kB / 0B         4.11MB / 0B         2
    e5c383697914b98b10cbbc9d0bd324b7b927099ac584f031057b8208d2fba9b1   test-1951.1.kay7x1lh1twk9c0oig50sd5tr   0.00%               196KiB / 1.952GiB     0.01%               71.1kB / 0B         770kB / 0B          1
    4bda148efbc006b0063373c3678083159af89f8cc83a6a28def14cb0dd171f70   random.1.vnc8on831idyr42slu578u3cr      0.00%               1.672MiB / 1.952GiB   0.08%               110kB / 0B          578kB / 0B          2
    84e3deaa45b2fc363e06167df9b90ab59f88d4f101e3f9b8df03a62a8f6783e1   registry                                0.00%               3.387MiB / 1.952GiB   0.17%               127kB / 378B        233kB / 0B          10
    2ed915778cebddf9ec69263a75cfdcf00962a5198d94d42cda75d5cd45bb82f2   foo.1.lsmxrefn5yp9c9ijz1hzgdq4u         0.00%               1.727MiB / 1.952GiB   0.09%               166kB / 7.76kB      614kB / 0B          2

Which is the same as the default before this patch was applied.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2017-09-27 18:59:25 +02:00
..
testdata Use golden files for tests that expect end-of-line whitespace 2017-09-07 17:50:44 -04:00
checkpoint.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00
checkpoint_test.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00
config.go Add --pretty option to "secret inspect" and "config inspect" 2017-05-16 15:12:20 -07:00
config_test.go Add support for configs 2017-05-11 13:42:49 -07:00
container.go Import DisplayablePorts from moby/moby source 2017-06-23 20:12:30 +02:00
container_test.go Use golden files for tests that expect end-of-line whitespace 2017-09-07 17:50:44 -04:00
custom.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00
custom_test.go Reduce complexity of two formatters 2017-08-28 12:49:07 -04:00
diff.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00
diff_test.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00
disk_usage.go Pin all tools used in the Dockerfiles 2017-07-11 14:23:27 -04:00
disk_usage_test.go Use golden files for tests that expect end-of-line whitespace 2017-09-07 17:50:44 -04:00
formatter.go Import `docker/docker/pkg/templates` to cli 2017-08-08 17:26:24 +02:00
history.go Print timestamp when --human=true 2017-08-12 23:12:47 +03:00
history_test.go Print timestamp when --human=true 2017-08-12 23:12:47 +03:00
image.go Reduce complexity of two formatters 2017-08-28 12:49:07 -04:00
image_test.go Reduce complexity of two formatters 2017-08-28 12:49:07 -04:00
network.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00
network_test.go removed logging from command/formatter package tests 2017-06-15 14:14:59 -04:00
node.go Add --pretty option to "secret inspect" and "config inspect" 2017-05-16 15:12:20 -07:00
node_test.go removed logging from command/formatter package tests 2017-06-15 14:14:59 -04:00
plugin.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00
plugin_test.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00
reflect.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00
reflect_test.go Add unused linter. 2017-06-14 16:54:27 -07:00
search.go Add --format to docker-search 2017-08-23 01:37:54 +03:00
search_test.go Use golden files for tests that expect end-of-line whitespace 2017-09-07 17:50:44 -04:00
secret.go Plugable secret backend 2017-09-07 11:10:44 +03:00
secret_test.go Plugable secret backend 2017-09-07 11:10:44 +03:00
service.go updated vendoring 2017-09-01 19:41:06 -04:00
service_test.go Use golden files for tests that expect end-of-line whitespace 2017-09-07 17:50:44 -04:00
stack.go Add format to docker stack ls 2017-05-03 18:41:19 -07:00
stack_test.go Add format to docker stack ls 2017-05-03 18:41:19 -07:00
stats.go Add --no-trunc option to docker container stats 2017-09-27 18:59:25 +02:00
stats_test.go Add --no-trunc option to docker container stats 2017-09-27 18:59:25 +02:00
task.go Update imports. 2017-04-17 18:07:56 -04:00
task_test.go Use golden files for tests that expect end-of-line whitespace 2017-09-07 17:50:44 -04:00
trust.go trust inspect: add docker trust inspect command with formatting print 2017-09-25 09:34:52 -07:00
trust_test.go tests: use alice/bob/claire conventional names for signers 2017-09-25 09:39:46 -07:00
volume.go Import docker/docker/cli 2017-04-17 17:40:59 -04:00
volume_test.go removed logging from command/formatter package tests 2017-06-15 14:14:59 -04:00