Add the image view page with the changes view, filterable by typing into a field. Still needs pagination or some other mechanism for getting an overview
This commit is contained in:
parent
8274d9af97
commit
0afea3a779
7 changed files with 239 additions and 7 deletions
|
@ -364,10 +364,24 @@ def list_repository_images(namespace, repository):
|
|||
abort(403)
|
||||
|
||||
|
||||
@app.route('/api/repository/<path:repository>/image/<image_id>',
|
||||
methods=['GET'])
|
||||
@parse_repository_name
|
||||
def get_image(namespace, repository, image_id):
|
||||
permission = ReadRepositoryPermission(namespace, repository)
|
||||
if permission.can() or model.repository_is_public(namespace, repository):
|
||||
image = model.get_repo_image(namespace, repository, image_id)
|
||||
if not image:
|
||||
abort(404)
|
||||
|
||||
return jsonify(image_view(image))
|
||||
abort(403)
|
||||
|
||||
|
||||
@app.route('/api/repository/<path:repository>/image/<image_id>/changes',
|
||||
methods=['GET'])
|
||||
@parse_repository_name
|
||||
def get_repository_changes(namespace, repository, image_id):
|
||||
def get_image_changes(namespace, repository, image_id):
|
||||
permission = ReadRepositoryPermission(namespace, repository)
|
||||
if permission.can() or model.repository_is_public(namespace, repository):
|
||||
diffs_path = store.image_file_diffs_path(namespace, repository, image_id)
|
||||
|
|
Reference in a new issue