Merge pull request #1576 from coreos-inc/new-repo-error
Fix error display in create repo view
This commit is contained in:
commit
31d5ff0649
2 changed files with 9 additions and 7 deletions
|
@ -53,9 +53,11 @@
|
|||
return true;
|
||||
};
|
||||
|
||||
$scope.createNewRepo = function() {
|
||||
$('#repoName').popover('hide');
|
||||
$scope.$watch('repo.name', function() {
|
||||
$scope.createError = null;
|
||||
});
|
||||
|
||||
$scope.createNewRepo = function() {
|
||||
$scope.creating = true;
|
||||
var repo = $scope.repo;
|
||||
var data = {
|
||||
|
@ -86,10 +88,7 @@
|
|||
$location.path('/repository/' + created.namespace + '/' + created.name);
|
||||
}, function(result) {
|
||||
$scope.creating = false;
|
||||
$scope.createError = result.data ? result.data.message : 'Cannot create repository';
|
||||
$timeout(function() {
|
||||
$('#repoName').popover('show');
|
||||
});
|
||||
$scope.createError = ApiService.getErrorMessage(result);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
Reference in a new issue