diff --git a/CHANGELOG.md b/CHANGELOG.md index f9e6b7c..4750646 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,11 +7,12 @@ such as those generated by Docker BuildX or manually (thanks to Christoph Honal @StarGate01). So now we support the following formats: Manifest v2 schema 1, Manifest v2 schema 2, Manifest List v2 schema 2 and all their confusing combinations. +* Amend representation of the tag info page. * Change logging library, add "-log-level" argument and put most of the logging into DEBUG mode. * You can define timezone when running container by adding `TZ` env var, e.g. "-e TZ=America/Los_Angeles" (thanks to @gminog). * Fix initial ownership of /opt/data dir in Dockerfile. -* Amend representation of the tag info page. +* Hide repositories with 0 tags count. ### 0.8.2 (2019-07-30) diff --git a/registry/client.go b/registry/client.go index d88292c..5a26028 100644 --- a/registry/client.go +++ b/registry/client.go @@ -302,6 +302,11 @@ func (c *Client) DeleteTag(repo, tag string) { c.logger.Error(errs[0]) } else { // Returns 202 on success. + if !strings.Contains(repo, "/") { + c.tagCounts["library/"+repo]-- + } else { + c.tagCounts[repo]-- + } c.logger.Infof("DELETE %s (tag:%s) %s", uri, tag, resp.Status) } } diff --git a/templates/repositories.html b/templates/repositories.html index de7e195..fd7ac5d 100644 --- a/templates/repositories.html +++ b/templates/repositories.html @@ -56,10 +56,12 @@ {{range repo := repos}} + {{if !isset(tagCounts[namespace+"/"+repo]) || (isset(tagCounts[namespace+"/"+repo]) && tagCounts[namespace+"/"+repo] > 0)}} {{ repo }} {{ tagCounts[namespace+"/"+repo] }} + {{end}} {{end}}