Add confirmation for deleting a robot

This commit is contained in:
Joseph Schorr 2015-04-27 14:19:50 -04:00
parent 6581a024bc
commit 4834dbd7c9
2 changed files with 10 additions and 1 deletions

View file

@ -128,6 +128,15 @@ angular.module('quay').directive('robotsManager', function () {
}, ApiService.errorDisplay('Cannot delete robot account'));
};
$scope.askDeleteRobot = function(info) {
bootbox.confirm('Are you sure you want to delete robot ' + info.name + '?', function(resp) {
if (resp) {
$scope.deleteRobot(info);
}
});
};
var update = function() {
if (!$scope.user && !$scope.organization) { return; }
if ($scope.loading || !$scope.isEnabled) { return; }