mirror of
https://github.com/Quiq/docker-registry-ui.git
synced 2025-09-03 22:25:01 +00:00
do not show repo if no tag exist
This commit is contained in:
@@ -183,7 +183,9 @@ func (c *Client) Repositories(useCache bool) map[string][]string {
|
||||
namespace = f[0]
|
||||
repo = f[1]
|
||||
}
|
||||
c.repos[namespace] = append(c.repos[namespace], repo)
|
||||
if len(c.Tags(r.String())) > 0 {
|
||||
c.repos[namespace] = append(c.repos[namespace], repo)
|
||||
}
|
||||
}
|
||||
|
||||
// pagination
|
||||
@@ -249,7 +251,9 @@ func (c *Client) CountTags(interval uint8) {
|
||||
if n != "library" {
|
||||
repoPath = fmt.Sprintf("%s/%s", n, r)
|
||||
}
|
||||
c.tagCounts[fmt.Sprintf("%s/%s", n, r)] = len(c.Tags(repoPath))
|
||||
if len(c.Tags(repoPath)) > 0 {
|
||||
c.tagCounts[fmt.Sprintf("%s/%s", n, r)] = len(c.Tags(repoPath))
|
||||
}
|
||||
}
|
||||
}
|
||||
c.logger.Info("Tags calculation complete.")
|
||||
|
Reference in New Issue
Block a user