parent
d9bafa478b
commit
dcf8922799
5 changed files with 100 additions and 0 deletions
|
@ -22,6 +22,7 @@ angular.module('quay').directive('robotsManager', function () {
|
|||
$scope.shownRobot = null;
|
||||
$scope.showRobotCounter = 0;
|
||||
$scope.Config = Config;
|
||||
$scope.feedback = null;
|
||||
|
||||
// Listen for route changes and update the tabs accordingly.
|
||||
var locationListener = $rootScope.$on('$routeUpdate', function(){
|
||||
|
@ -117,6 +118,10 @@ angular.module('quay').directive('robotsManager', function () {
|
|||
created.teams = [];
|
||||
created.repositories = [];
|
||||
$scope.robots.push(created);
|
||||
$scope.feedback = {
|
||||
'kind': 'info',
|
||||
'message': 'Robot account ' + name + ' was created'
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
|
@ -126,6 +131,10 @@ angular.module('quay').directive('robotsManager', function () {
|
|||
var index = $scope.findRobotIndexByName(info.name);
|
||||
if (index >= 0) {
|
||||
$scope.robots.splice(index, 1);
|
||||
$scope.feedback = {
|
||||
'kind': 'info',
|
||||
'message': 'Robot account ' + info.name + ' was deleted'
|
||||
};
|
||||
}
|
||||
}, ApiService.errorDisplay('Cannot delete robot account'));
|
||||
};
|
||||
|
|
Reference in a new issue