Fix tag reversion UI (#3295)
* Remove unused check The tags returned from the tag history endpoint did not have an image_id field until https://github.com/quay/quay/pull/3238 (tags pagination), so the condition was never met. After #3238, the tags returned from the tag history endpoints have an image_id field, which is equal to its docker_image_id field, to allow the same behavior from consumers getting tags from the repository endpoint (e.g repo-view). * watch repositoryTags instead of repository in repo-tag-history
This commit is contained in:
parent
defd4b3b20
commit
df639750f1
4 changed files with 5 additions and 8 deletions
|
@ -111,7 +111,7 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tag-operations-dialog" repository="repository"
|
<div class="tag-operations-dialog" repository="repository" repository-tags="repositoryTags"
|
||||||
image-loader="imageLoader"
|
image-loader="imageLoader"
|
||||||
action-handler="tagActionHandler"></div>
|
action-handler="tagActionHandler"></div>
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ angular.module('quay').directive('repoTagHistory', function () {
|
||||||
restrict: 'C',
|
restrict: 'C',
|
||||||
scope: {
|
scope: {
|
||||||
'repository': '=repository',
|
'repository': '=repository',
|
||||||
|
'repositoryTags': '=repositoryTags',
|
||||||
'filter': '=filter',
|
'filter': '=filter',
|
||||||
'isEnabled': '=isEnabled',
|
'isEnabled': '=isEnabled',
|
||||||
'imageLoader': '=imageLoader'
|
'imageLoader': '=imageLoader'
|
||||||
|
@ -34,7 +35,7 @@ angular.module('quay').directive('repoTagHistory', function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.$watch('isEnabled', loadTimeline);
|
$scope.$watch('isEnabled', loadTimeline);
|
||||||
$scope.$watch('repository', loadTimeline);
|
$scope.$watch('repositoryTags', loadTimeline);
|
||||||
|
|
||||||
var processTags = function(tags) {
|
var processTags = function(tags) {
|
||||||
var entries = [];
|
var entries = [];
|
||||||
|
@ -176,4 +177,4 @@ angular.module('quay').directive('repoTagHistory', function () {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return directiveDefinitionObject;
|
return directiveDefinitionObject;
|
||||||
});
|
});
|
||||||
|
|
|
@ -389,11 +389,6 @@ angular.module('quay').directive('tagOperationsDialog', function () {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tag.image_id == image_id) {
|
|
||||||
bootbox.alert('This is the current image for the tag');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.restoreTagInfo = {
|
$scope.restoreTagInfo = {
|
||||||
'tag': tag,
|
'tag': tag,
|
||||||
'image_id': image_id,
|
'image_id': image_id,
|
||||||
|
|
|
@ -89,6 +89,7 @@
|
||||||
<h3 class="tab-header">Tag History</h3>
|
<h3 class="tab-header">Tag History</h3>
|
||||||
<div class="repo-tag-history"
|
<div class="repo-tag-history"
|
||||||
repository="viewScope.repository"
|
repository="viewScope.repository"
|
||||||
|
repository-tags="viewScope.repositoryTags"
|
||||||
filter="viewScope.historyFilter"
|
filter="viewScope.historyFilter"
|
||||||
image-loader="viewScope.imageLoader"
|
image-loader="viewScope.imageLoader"
|
||||||
is-enabled="historyShown"></div>
|
is-enabled="historyShown"></div>
|
||||||
|
|
Reference in a new issue