Merge pull request #3024 from coreos-inc/manageable-robots
Manageable robots epic
This commit is contained in:
commit
6c43b7ff0d
24 changed files with 411 additions and 131 deletions
|
@ -15,6 +15,7 @@ angular.module('quay').directive('createEntityDialog', function () {
|
|||
'entityTitle': '@entityTitle',
|
||||
'entityIcon': '@entityIcon',
|
||||
'entityNameRegex': '@entityNameRegex',
|
||||
'allowEntityDescription': '@allowEntityDescription',
|
||||
|
||||
'entityCreateRequested': '&entityCreateRequested',
|
||||
'entityCreateCompleted': '&entityCreateCompleted'
|
||||
|
@ -41,6 +42,7 @@ angular.module('quay').directive('createEntityDialog', function () {
|
|||
|
||||
$scope.show = function() {
|
||||
$scope.entityName = null;
|
||||
$scope.entityDescription = null;
|
||||
$scope.entity = null;
|
||||
$scope.entityForPermissions = null;
|
||||
$scope.creating = false;
|
||||
|
@ -67,6 +69,7 @@ angular.module('quay').directive('createEntityDialog', function () {
|
|||
$scope.view = 'creating';
|
||||
$scope.entityCreateRequested({
|
||||
'name': $scope.entityName,
|
||||
'description': $scope.entityDescription,
|
||||
'callback': entityCreateCallback
|
||||
});
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
|
|
@ -39,6 +39,9 @@ angular.module('quay').directive('robotsManager', function () {
|
|||
robot['teams_string'] = robot.teams.map(function(team) {
|
||||
return team['name'] || '';
|
||||
}).join(',');
|
||||
|
||||
robot['created_datetime'] = robot.created ? TableService.getReversedTimestamp(robot.created) : null;
|
||||
robot['last_accessed_datetime'] = robot.last_accessed ? TableService.getReversedTimestamp(robot.last_accessed) : null;
|
||||
});
|
||||
|
||||
$scope.orderedRobots = TableService.buildOrderedItems(robots, $scope.options,
|
||||
|
|
Reference in a new issue