Remove container usage tab and replace with changlog view

Fixes #179
This commit is contained in:
Joseph Schorr 2015-06-28 08:27:39 +03:00
parent cea4ad2d85
commit b8c74bbb17
6 changed files with 28 additions and 56 deletions

View file

@ -118,21 +118,21 @@ def user_view(user):
'super_user': superusers.is_superuser(user.username)
}
@resource('/v1/superuser/usage/')
@resource('/v1/superuser/changelog/')
@internal_only
@show_if(features.SUPER_USERS)
class UsageInformation(ApiResource):
""" Resource for returning the usage information for enterprise customers. """
class ChangeLog(ApiResource):
""" Resource for returning the change log for enterprise customers. """
@require_fresh_login
@verify_not_prod
@nickname('getSystemUsage')
@nickname('getChangeLog')
def get(self):
""" Returns the number of repository handles currently held. """
""" Returns the change log for this installation. """
if SuperUserPermission().can():
return {
'usage': model.get_repository_usage(),
'allowed': app.config.get('MAXIMUM_REPOSITORY_USAGE', 20)
}
with open ('CHANGELOG.md', 'r') as f:
return {
'log': f.read()
}
abort(403)