moby--moby/daemon/cluster/convert
Aaron Lehmann 8a27758364 Hide zero-valued timestamps from service JSON
It was possible to see output like this:

        "UpdateStatus": {
            "State": "updating",
            "StartedAt": "2017-04-14T17:10:03.226607162Z",
            "CompletedAt": "1970-01-01T00:00:00Z",
            "Message": "update in progress"
        }

The timestamp fields were already changed to pointers, and left nil if
the timestamp value was zero. However the zero-value of a timestamp from
gRPC is different from the value Go considers to be zero. gRPC uses the
Unix epoch instead of Go's epoch. Therefore, check that the timestamp
does not match the Unix epoch.

Also, add " ago" to the timestamps as shown in "docker service inspect
--pretty", as they are shown as relative times.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
2017-04-14 10:44:24 -07:00
..
container.go fix gRPC serialization for healthcheck start-period 2017-04-10 17:02:58 -07:00
network.go Allow user to modify ingress network 2017-03-26 15:46:18 -07:00
node.go Fixing #24631, inspect output on swarm object types without labels is empty object {} 2017-02-15 01:25:55 -05:00
secret.go Fixing #24631, inspect output on swarm object types without labels is empty object {} 2017-02-15 01:25:55 -05:00
service.go Hide zero-valued timestamps from service JSON 2017-04-14 10:44:24 -07:00
service_test.go add service convert tests 2017-04-11 14:02:02 -04:00
swarm.go Fixing #24631, inspect output on swarm object types without labels is empty object {} 2017-02-15 01:25:55 -05:00
task.go Fix dropped field in task translation from GRPC to REST 2017-03-07 14:55:15 -08:00