Have tag operations dialog reflect time machine configuration
If a tag deletion is going to remove images, but those images are not going to be removed immediately, we need to message that Fixes https://www.pivotaltracker.com/story/show/143063199
This commit is contained in:
parent
6bef1d1ff3
commit
eb5cebbcdf
3 changed files with 9 additions and 1 deletions
|
@ -379,6 +379,7 @@ class Repository(RepositoryParamResource):
|
||||||
'is_starred': is_starred,
|
'is_starred': is_starred,
|
||||||
'status_token': repo.badge_token if not is_public else '',
|
'status_token': repo.badge_token if not is_public else '',
|
||||||
'trust_enabled': bool(features.SIGNING) and repo.trust_enabled,
|
'trust_enabled': bool(features.SIGNING) and repo.trust_enabled,
|
||||||
|
'tag_expiration_s': repo.namespace_user.removed_tag_expiration_s,
|
||||||
}
|
}
|
||||||
|
|
||||||
if stats is not None:
|
if stats is not None:
|
||||||
|
|
|
@ -122,7 +122,7 @@
|
||||||
|
|
||||||
<div class="tag-specific-images-view" tag="deleteTagInfo.tag" repository="repository"
|
<div class="tag-specific-images-view" tag="deleteTagInfo.tag" repository="repository"
|
||||||
image-loader="imageLoader" style="margin-top: 20px">
|
image-loader="imageLoader" style="margin-top: 20px">
|
||||||
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 <span ng-if="repository.tag_expiration_s == 0">deleted</span><span ng-if="repository.tag_expiration_s != 0">unavailable and deleted in {{ getFormattedTimespan(repository.tag_expiration_s) }}</span>:
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -153,6 +153,13 @@ angular.module('quay').directive('tagOperationsDialog', function () {
|
||||||
}, errorHandler);
|
}, errorHandler);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.getFormattedTimespan = function(seconds) {
|
||||||
|
if (!seconds) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return moment.duration(seconds, "seconds").humanize();
|
||||||
|
};
|
||||||
|
|
||||||
$scope.editLabels = function(info, callback) {
|
$scope.editLabels = function(info, callback) {
|
||||||
var actions = [];
|
var actions = [];
|
||||||
var existingMutableLabels = {};
|
var existingMutableLabels = {};
|
||||||
|
|
Reference in a new issue