Revert "Merge pull request #682 from jzelinskie/revertrevert"
This reverts commit627ad25c9c
, reversing changes made to31c392fecc
.
This commit is contained in:
parent
24b7064140
commit
278bc736e3
10 changed files with 65 additions and 212 deletions
|
@ -12,7 +12,11 @@ from util.cache import cache_control_flask_restful
|
|||
|
||||
|
||||
def image_view(image, image_map, include_ancestors=True):
|
||||
command = image.command
|
||||
extended_props = image
|
||||
if image.storage and image.storage.id:
|
||||
extended_props = image.storage
|
||||
|
||||
command = extended_props.command
|
||||
|
||||
def docker_id(aid):
|
||||
if not aid or not aid in image_map:
|
||||
|
@ -22,10 +26,10 @@ def image_view(image, image_map, include_ancestors=True):
|
|||
|
||||
image_data = {
|
||||
'id': image.docker_image_id,
|
||||
'created': format_date(image.created),
|
||||
'comment': image.comment,
|
||||
'created': format_date(extended_props.created),
|
||||
'comment': extended_props.comment,
|
||||
'command': json.loads(command) if command else None,
|
||||
'size': image.storage.image_size,
|
||||
'size': extended_props.image_size,
|
||||
'uploading': image.storage.uploading,
|
||||
'sort_index': len(image.ancestors),
|
||||
}
|
||||
|
|
Reference in a new issue