Signed-off-by: cyli <cyli@twistedmatrix.com>
(cherry picked from commit 2c0613540a25d45069d142542e572bb6338e4155)
Signed-off-by: Victor Vieux <victorvieux@gmail.com>
| ... | ... |
@@ -50,15 +50,14 @@ func runSecretList(dockerCli *command.DockerCli, opts listOptions) error {
|
| 50 | 50 |
fmt.Fprintf(w, "%s\n", s.ID) |
| 51 | 51 |
} |
| 52 | 52 |
} else {
|
| 53 |
- fmt.Fprintf(w, "ID\tNAME\tCREATED\tUPDATED\tSIZE") |
|
| 53 |
+ fmt.Fprintf(w, "ID\tNAME\tCREATED\tUPDATED") |
|
| 54 | 54 |
fmt.Fprintf(w, "\n") |
| 55 | 55 |
|
| 56 | 56 |
for _, s := range secrets {
|
| 57 | 57 |
created := units.HumanDuration(time.Now().UTC().Sub(s.Meta.CreatedAt)) + " ago" |
| 58 | 58 |
updated := units.HumanDuration(time.Now().UTC().Sub(s.Meta.UpdatedAt)) + " ago" |
| 59 |
- size := units.HumanSizeWithPrecision(float64(s.SecretSize), 3) |
|
| 60 | 59 |
|
| 61 |
- fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\n", s.ID, s.Spec.Annotations.Name, created, updated, size) |
|
| 60 |
+ fmt.Fprintf(w, "%s\t%s\t%s\t%s\n", s.ID, s.Spec.Annotations.Name, created, updated) |
|
| 62 | 61 |
} |
| 63 | 62 |
} |
| 64 | 63 |
|
| ... | ... |
@@ -9,9 +9,7 @@ import ( |
| 9 | 9 |
// SecretFromGRPC converts a grpc Secret to a Secret. |
| 10 | 10 |
func SecretFromGRPC(s *swarmapi.Secret) swarmtypes.Secret {
|
| 11 | 11 |
secret := swarmtypes.Secret{
|
| 12 |
- ID: s.ID, |
|
| 13 |
- Digest: s.Digest, |
|
| 14 |
- SecretSize: s.SecretSize, |
|
| 12 |
+ ID: s.ID, |
|
| 15 | 13 |
Spec: swarmtypes.SecretSpec{
|
| 16 | 14 |
Annotations: swarmtypes.Annotations{
|
| 17 | 15 |
Name: s.Spec.Annotations.Name, |