Repository navigation
Add .CreatedAt placeholder for docker network ls --format - #29900
Merged
Merged
Conversation
This fix tries to add a placeholder `.CreatedAt` for Go format template in `docker network ls --format`. While working on 29226, I noticed that it is not possible to display network's creation time in `docker network ls`, with or without `--format`. We are able to find the timestamp through `docker network inspect` though. However, as we allows networks to be pruned based on the timestamp (see 29226), showing the timestamp in `docker network ls --format` would be much useful now. This fix adds the `.CreatedAt` placeholder for `docker network ls --format`. The default output was not changed for `docker network ls --format`. A test case for unit tests has been added. Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Member
|
SGTM but why not "Created"? |
Member
Author
|
@AkihiroSuda this is mostly to align with |
vdemeester
reviewed
Jan 5, 2017
vdemeester
left a comment
Member
There was a problem hiding this comment.
design LGTM 🐯
/cc @thaJeztah @dnephin
Member
|
Yup, design LGTM |
Member
|
LGTM |
AkihiroSuda
approved these changes
Jan 5, 2017
AkihiroSuda
left a comment
Member
There was a problem hiding this comment.
LGTM, moving to doc review
Member
|
@thaJeztah PTAL? |
chanwit
reviewed
Jan 24, 2017
| `.Internal` | Whether the network is internal or not. | ||
| `.Labels` | All labels assigned to the network. | ||
| `.Label` | Value of a specific label for this network. For example `{{.Label "project.version"}}` | ||
| `.CreatedAt` | Time when the network was created |
There was a problem hiding this comment.
The doc SGTM but I'm wondering why changes are 10 lines instead of 1 insertion?
There was a problem hiding this comment.
Oh my bad. It's from formatting the table.
dnephin
pushed a commit
to dnephin/docker
that referenced
this pull request
Apr 17, 2017
…ted-at Add `.CreatedAt` placeholder for `docker network ls --format`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- What I did
This fix tries to add a placeholder
.CreatedAtfor Go format template indocker network ls --format.While working on #29226, I noticed that it is not possible to display network's creation time in
docker network ls, with or without--format.We are able to find the timestamp of the network through
docker network inspectthough.However, as we allow networks to be pruned based on the timestamp (see #29226), showing the timestamp in
docker network ls --formatwould be much useful now.- How I did it
This fix adds the
.CreatedAtplaceholder fordocker network ls --format.The default output was not changed for
docker network ls --format.- How to verify it
A test case for unit tests has been added.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)
Signed-off-by: Yong Tang yong.tang.github@outlook.com