Show manifest digests in place of V1 ids in the tag view when possible
This commit is contained in:
parent
814bbb4a96
commit
af743b156b
8 changed files with 88 additions and 11 deletions
|
@ -41,19 +41,22 @@ class ListRepositoryTags(RepositoryParamResource):
|
|||
if tag.lifetime_end_ts > 0:
|
||||
tag_info['end_ts'] = tag.lifetime_end_ts
|
||||
|
||||
if tag.id in manifest_map:
|
||||
tag_info['manifest_digest'] = manifest_map[tag.id].digest
|
||||
|
||||
return tag_info
|
||||
|
||||
specific_tag = parsed_args.get('specificTag') or None
|
||||
|
||||
page = max(1, parsed_args.get('page', 1))
|
||||
limit = min(100, max(1, parsed_args.get('limit', 50)))
|
||||
tags, has_additional = model.tag.list_repository_tag_history(repo, page=page, size=limit,
|
||||
specific_tag=specific_tag)
|
||||
tags, manifest_map, more = model.tag.list_repository_tag_history(repo, page=page, size=limit,
|
||||
specific_tag=specific_tag)
|
||||
|
||||
return {
|
||||
'tags': [tag_view(tag) for tag in tags],
|
||||
'page': page,
|
||||
'has_additional': has_additional,
|
||||
'has_additional': more,
|
||||
}
|
||||
|
||||
|
||||
|
|
Reference in a new issue