Add UI for viewing and setting the description of a robot account
This commit is contained in:
parent
254cdfe43a
commit
96fafcdffb
5 changed files with 24 additions and 3 deletions
|
@ -19,7 +19,7 @@ angular.module('quay').directive('createRobotDialog', function () {
|
|||
$scope.robotCreated({'robot': robot});
|
||||
};
|
||||
|
||||
$scope.createRobot = function(name, callback) {
|
||||
$scope.createRobot = function(name, description, callback) {
|
||||
var organization = $scope.info.namespace;
|
||||
if (!UserService.isOrganization(organization)) {
|
||||
organization = null;
|
||||
|
@ -29,11 +29,15 @@ angular.module('quay').directive('createRobotDialog', function () {
|
|||
'robot_shortname': name
|
||||
};
|
||||
|
||||
var data = {
|
||||
'description': description
|
||||
};
|
||||
|
||||
var errorDisplay = ApiService.errorDisplay('Cannot create robot account', function() {
|
||||
callback(null);
|
||||
});
|
||||
|
||||
ApiService.createRobot(organization, null, params).then(function(resp) {
|
||||
ApiService.createRobot(organization, data, params).then(function(resp) {
|
||||
callback(resp);
|
||||
}, errorDisplay);
|
||||
};
|
||||
|
|
Reference in a new issue