Start on new tag view
This commit is contained in:
parent
581a284744
commit
afc8e95e19
103 changed files with 148505 additions and 458 deletions
|
@ -1450,6 +1450,18 @@ def set_image_size(docker_image_id, namespace_name, repository_name, image_size,
|
|||
|
||||
image.storage.image_size = image_size
|
||||
image.storage.uncompressed_size = uncompressed_size
|
||||
|
||||
ancestors = image.ancestors.split('/')[1:-1]
|
||||
if ancestors:
|
||||
try:
|
||||
parent_image = Image.get(Image.id == ancestors[-1])
|
||||
total_size = image_size + parent_image.storage.aggregate_size
|
||||
image.storage.aggregate_size = total_size
|
||||
except Image.DoesNotExist:
|
||||
pass
|
||||
else:
|
||||
image.storage.aggregate_size = image_size
|
||||
|
||||
image.storage.save()
|
||||
|
||||
return image
|
||||
|
@ -2209,8 +2221,8 @@ def log_action(kind_name, user_or_organization_name, performer=None,
|
|||
kind = LogEntryKind.get(LogEntryKind.name == kind_name)
|
||||
account = User.get(User.username == user_or_organization_name)
|
||||
LogEntry.create(kind=kind, account=account, performer=performer,
|
||||
repository=repository, ip=ip,
|
||||
metadata_json=json.dumps(metadata), datetime=timestamp)
|
||||
repository=repository, ip=ip, metadata_json=json.dumps(metadata),
|
||||
datetime=timestamp)
|
||||
|
||||
|
||||
def create_build_trigger(repo, service_name, auth_token, user, pull_robot=None):
|
||||
|
|
Reference in a new issue