Skip to content

Commit

Permalink
feat: add size to Layer Details view (wagoodman#522)
Browse files Browse the repository at this point in the history
Refs wagoodman#469 (comment)

Co-authored-by: st-gr <[email protected]>
  • Loading branch information
joschi and st-gr committed Nov 7, 2024
1 parent 0f48a70 commit 6af4fe4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runtime/ui/view/layer_details.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"strings"

"github.com/awesome-gocui/gocui"
"github.com/dustin/go-humanize"
"github.com/sirupsen/logrus"

"github.com/wagoodman/dive/dive/image"
Expand Down Expand Up @@ -82,9 +83,11 @@ func (v *LayerDetails) Render() error {
if len(v.CurrentLayer.Names) > 0 {
tags = strings.Join(v.CurrentLayer.Names, ", ")
}

lines = append(lines, []string{
format.Header("Tags: ") + tags,
format.Header("Id: ") + v.CurrentLayer.Id,
format.Header("Size: ") + humanize.Bytes(v.CurrentLayer.Size),
format.Header("Digest: ") + v.CurrentLayer.Digest,
format.Header("Command:"),
v.CurrentLayer.Command,
Expand Down

0 comments on commit 6af4fe4

Please sign in to comment.