Merge branch 'master' of ssh://bitbucket.org/yackob03/quay
This commit is contained in:
commit
1ce5a519e1
2 changed files with 15 additions and 4 deletions
|
@ -523,16 +523,24 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
|
||||||
|
|
||||||
$scope.deleteTag = function(tagName) {
|
$scope.deleteTag = function(tagName) {
|
||||||
if (!$scope.repo.can_admin) { return; }
|
if (!$scope.repo.can_admin) { return; }
|
||||||
$('#confirmdeleteTagModal').modal('hide');
|
|
||||||
|
|
||||||
var params = {
|
var params = {
|
||||||
'repository': namespace + '/' + name,
|
'repository': namespace + '/' + name,
|
||||||
'tag': tagName
|
'tag': tagName
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var errorHandler = ApiService.errorDisplay('Cannot delete tag', function() {
|
||||||
|
$('#confirmdeleteTagModal').modal('hide');
|
||||||
|
$scope.deletingTag = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
$scope.deletingTag = true;
|
||||||
|
|
||||||
ApiService.deleteFullTag(null, params).then(function() {
|
ApiService.deleteFullTag(null, params).then(function() {
|
||||||
loadViewInfo();
|
loadViewInfo();
|
||||||
}, ApiService.errorDisplay('Cannot delete tag'));
|
$('#confirmdeleteTagModal').modal('hide');
|
||||||
|
$scope.deletingTag = false;
|
||||||
|
}, errorHandler);
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.getImagesForTagBySize = function(tag) {
|
$scope.getImagesForTagBySize = function(tag) {
|
||||||
|
|
|
@ -391,7 +391,10 @@
|
||||||
</span>?
|
</span>?
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body" ng-show="deletingTag">
|
||||||
|
<div class="quay-spinner"></div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body" ng-show="!deletingTag">
|
||||||
Are you sure you want to delete tag
|
Are you sure you want to delete tag
|
||||||
<span class="label tag" ng-class="tagToDelete == currentTag.name ? 'label-success' : 'label-default'">
|
<span class="label tag" ng-class="tagToDelete == currentTag.name ? 'label-success' : 'label-default'">
|
||||||
{{ tagToDelete }}
|
{{ tagToDelete }}
|
||||||
|
@ -401,7 +404,7 @@
|
||||||
The following images and any other images not referenced by a tag will be deleted:
|
The following images and any other images not referenced by a tag will be deleted:
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer" ng-show="!deletingTag">
|
||||||
<button type="button" class="btn btn-primary" ng-click="deleteTag(tagToDelete)">Delete Tag</button>
|
<button type="button" class="btn btn-primary" ng-click="deleteTag(tagToDelete)">Delete Tag</button>
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
Reference in a new issue