diff --git a/data/model/service_keys.py b/data/model/service_keys.py
index a02d49b9f..c323a71eb 100644
--- a/data/model/service_keys.py
+++ b/data/model/service_keys.py
@@ -102,8 +102,6 @@ def update_service_key(kid, name=None, metadata=None):
except ServiceKey.DoesNotExist:
raise ServiceKeyDoesNotExist
- _gc_expired(key.service)
-
def delete_service_key(kid):
try:
diff --git a/endpoints/api/superuser.py b/endpoints/api/superuser.py
index c0a1b787b..cf37fc88a 100644
--- a/endpoints/api/superuser.py
+++ b/endpoints/api/superuser.py
@@ -533,7 +533,7 @@ class SuperUserServiceKeyManagement(ApiResource):
}
@verify_not_prod
- @nickname('getServiceKeys')
+ @nickname('listServiceKeys')
@require_scope(scopes.SUPERUSER)
def get(self):
if SuperUserPermission().can():
@@ -655,8 +655,6 @@ class SuperUserServiceKey(ApiResource):
except model.service_keys.ServiceKeyDoesNotExist:
abort(404)
- user = get_authenticated_user()
-
key_log_metadata = {
'kid': key.kid,
'service': key.service,
diff --git a/static/directives/service-keys-manager.html b/static/directives/service-keys-manager.html
index dfad5c032..2cb957b40 100644
--- a/static/directives/service-keys-manager.html
+++ b/static/directives/service-keys-manager.html
@@ -75,7 +75,7 @@
- Does not expire
+ Does not expire
diff --git a/static/js/directives/ui/service-keys-manager.js b/static/js/directives/ui/service-keys-manager.js
index 7e4e58ab7..d71a862ed 100644
--- a/static/js/directives/ui/service-keys-manager.js
+++ b/static/js/directives/ui/service-keys-manager.js
@@ -51,7 +51,7 @@ angular.module('quay').directive('serviceKeysManager', function () {
var loadServiceKeys = function() {
$scope.options.filter = null;
$scope.now = new Date();
- $scope.keysResource = ApiService.getServiceKeysAsResource().get(function(resp) {
+ $scope.keysResource = ApiService.listServiceKeysAsResource().get(function(resp) {
$scope.keys = resp['keys'];
buildOrderedKeys();
});
@@ -91,23 +91,28 @@ angular.module('quay').directive('serviceKeysManager', function () {
return {'className': 'warning', 'icon': 'fa-warning'};
}
- return {'className': 'info', 'icon': 'fa-info-circle'};
+ return {'className': 'info', 'icon': 'fa-check'};
};
$scope.showChangeName = function(key) {
- bootbox.prompt('Enter a friendly name for key ' + $scope.getKeyTitle(key), function(value) {
- if (value) {
- var data = {
- 'name': value
- };
+ bootbox.prompt({
+ 'size': 'small',
+ 'title': 'Enter a friendly name for key ' + $scope.getKeyTitle(key),
+ 'value': key.name || '',
+ 'callback': function(value) {
+ if (value != null) {
+ var data = {
+ 'name': value
+ };
- var params = {
- 'kid': key.kid
- };
+ var params = {
+ 'kid': key.kid
+ };
- ApiService.updateServiceKey(data, params).then(function(resp) {
- loadServiceKeys();
- }, ApiService.errorDisplay('Could not update service key'));
+ ApiService.updateServiceKey(data, params).then(function(resp) {
+ loadServiceKeys();
+ }, ApiService.errorDisplay('Could not update service key'));
+ }
}
});
};
|