mirror of
https://github.com/Quiq/docker-registry-ui.git
synced 2025-07-17 15:51:27 +00:00
use temporary map to prevent UI disruption during tags calculation (#60)
This commit is contained in:
parent
19d15065ed
commit
905e8f793b
@ -179,10 +179,11 @@ func (c *Client) Repositories(useCache bool) map[string][]string {
|
|||||||
linkRegexp := regexp.MustCompile("^<(.*?)>;.*$")
|
linkRegexp := regexp.MustCompile("^<(.*?)>;.*$")
|
||||||
scope := "registry:catalog:*"
|
scope := "registry:catalog:*"
|
||||||
uri := "/v2/_catalog"
|
uri := "/v2/_catalog"
|
||||||
c.repos = map[string][]string{}
|
tmp := map[string][]string{}
|
||||||
for {
|
for {
|
||||||
data, resp := c.callRegistry(uri, scope, "manifest.v2")
|
data, resp := c.callRegistry(uri, scope, "manifest.v2")
|
||||||
if data == "" {
|
if data == "" {
|
||||||
|
c.repos = tmp
|
||||||
return c.repos
|
return c.repos
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,7 +195,7 @@ func (c *Client) Repositories(useCache bool) map[string][]string {
|
|||||||
namespace = f[0]
|
namespace = f[0]
|
||||||
repo = f[1]
|
repo = f[1]
|
||||||
}
|
}
|
||||||
c.repos[namespace] = append(c.repos[namespace], repo)
|
tmp[namespace] = append(tmp[namespace], repo)
|
||||||
}
|
}
|
||||||
|
|
||||||
// pagination
|
// pagination
|
||||||
@ -208,6 +209,7 @@ func (c *Client) Repositories(useCache bool) map[string][]string {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
c.repos = tmp
|
||||||
return c.repos
|
return c.repos
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user