We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The artifacts list view should include tags as well, it help out getting an overview if you have security issues on tagged versions.
diff --git a/pkg/views/artifact/list/view.go b/pkg/views/artifact/list/view.go index 3b851ae..4632b0d 100644 --- a/pkg/views/artifact/list/view.go +++ b/pkg/views/artifact/list/view.go @@ -9,11 +9,13 @@ import ( "github.com/goharbor/harbor-cli/pkg/views/base/tablelist" "os" "strconv" + "strings" ) var columns = []table.Column{ {Title: "ID", Width: 6}, {Title: "Artifact Digest", Width: 20}, + {Title: "Tags", Width: 20}, {Title: "Type", Width: 12}, {Title: "Size", Width: 12}, {Title: "Vulnerabilities", Width: 15}, @@ -29,9 +31,16 @@ func ListArtifacts(artifacts []*models.Artifact) { for _, scan := range artifact.ScanOverview { totalVulnerabilities += scan.Summary.Total } + tags := []string{} + if artifact.Tags != nil { + for _, tag := range artifact.Tags { + tags = append(tags, tag.Name) + } + } rows = append(rows, table.Row{ strconv.FormatInt(int64(artifact.ID), 10), artifact.Digest[:16], + strings.Join(tags, ", "), artifact.Type, artifactSize, strconv.FormatInt(totalVulnerabilities, 10),
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The artifacts list view should include tags as well, it help out getting an overview if you have security issues on tagged versions.
The text was updated successfully, but these errors were encountered: