feat: add volume `CreatedAt` field to volumes panel

This commit adds the CreatedAt timestamp value of a Docker
volume to the volumes panel.

Signed-off-by: Michael Mead <mmead.developer@gmail.com>
pull/501/head
Michael Mead 6 months ago
parent 80af149b02
commit 8885dcc5d8

@ -17,6 +17,7 @@ type Volume struct {
OSCommand *OSCommand
Log *logrus.Entry
DockerCommand LimitedDockerCommand
CreatedAt string
}
// RefreshVolumes gets the volumes and stores them
@ -38,6 +39,7 @@ func (c *DockerCommand) RefreshVolumes() ([]*Volume, error) {
OSCommand: c.OSCommand,
Log: c.Log,
DockerCommand: c,
CreatedAt: volume.CreatedAt,
}
}

@ -66,6 +66,7 @@ func (gui *Gui) volumeConfigStr(volume *commands.Volume) string {
output += utils.WithPadding("Mountpoint: ", padding) + volume.Volume.Mountpoint + "\n"
output += utils.WithPadding("Labels: ", padding) + utils.FormatMap(padding, volume.Volume.Labels) + "\n"
output += utils.WithPadding("Options: ", padding) + utils.FormatMap(padding, volume.Volume.Options) + "\n"
output += utils.WithPadding("CreatedAt: ", padding) + volume.Volume.CreatedAt + "\n"
output += utils.WithPadding("Status: ", padding)
if volume.Volume.Status != nil {

Loading…
Cancel
Save