Switch to using straight docker IDs instead of a hashing scheme
This commit is contained in:
parent
63628678b8
commit
a90aab4665
8 changed files with 51 additions and 54 deletions
|
@ -5757,7 +5757,7 @@ quayApp.directive('tagSpecificImagesView', function () {
|
|||
}
|
||||
|
||||
var currentTag = $scope.repository.tags[$scope.tag];
|
||||
if (image.internal_id == currentTag.internal_id) {
|
||||
if (image.id == currentTag.image_id) {
|
||||
classes += 'tag-image ';
|
||||
}
|
||||
|
||||
|
@ -5767,15 +5767,15 @@ quayApp.directive('tagSpecificImagesView', function () {
|
|||
var forAllTagImages = function(tag, callback, opt_cutoff) {
|
||||
if (!tag) { return; }
|
||||
|
||||
if (!$scope.imageByInternalId) {
|
||||
$scope.imageByInternalId = [];
|
||||
if (!$scope.imageByDockerId) {
|
||||
$scope.imageByDockerId = [];
|
||||
for (var i = 0; i < $scope.images.length; ++i) {
|
||||
var currentImage = $scope.images[i];
|
||||
$scope.imageByInternalId[currentImage.internal_id] = currentImage;
|
||||
$scope.imageByDockerId[currentImage.id] = currentImage;
|
||||
}
|
||||
}
|
||||
|
||||
var tag_image = $scope.imageByInternalId[tag.internal_id];
|
||||
var tag_image = $scope.imageByDockerId[tag.image_id];
|
||||
if (!tag_image) {
|
||||
return;
|
||||
}
|
||||
|
@ -5784,7 +5784,7 @@ quayApp.directive('tagSpecificImagesView', function () {
|
|||
|
||||
var ancestors = tag_image.ancestors.split('/').reverse();
|
||||
for (var i = 0; i < ancestors.length; ++i) {
|
||||
var image = $scope.imageByInternalId[ancestors[i]];
|
||||
var image = $scope.imageByDockerId[ancestors[i]];
|
||||
if (image) {
|
||||
if (image == opt_cutoff) {
|
||||
return;
|
||||
|
@ -5810,7 +5810,7 @@ quayApp.directive('tagSpecificImagesView', function () {
|
|||
var getIdsForTag = function(currentTag) {
|
||||
var ids = {};
|
||||
forAllTagImages(currentTag, function(image) {
|
||||
ids[image.internal_id] = true;
|
||||
ids[image.id] = true;
|
||||
}, $scope.imageCutoff);
|
||||
return ids;
|
||||
};
|
||||
|
@ -5820,8 +5820,8 @@ quayApp.directive('tagSpecificImagesView', function () {
|
|||
for (var currentTagName in $scope.repository.tags) {
|
||||
var currentTag = $scope.repository.tags[currentTagName];
|
||||
if (currentTag != tag) {
|
||||
for (var internal_id in getIdsForTag(currentTag)) {
|
||||
delete toDelete[internal_id];
|
||||
for (var id in getIdsForTag(currentTag)) {
|
||||
delete toDelete[id];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5830,7 +5830,7 @@ quayApp.directive('tagSpecificImagesView', function () {
|
|||
var images = [];
|
||||
for (var i = 0; i < $scope.images.length; ++i) {
|
||||
var image = $scope.images[i];
|
||||
if (toDelete[image.internal_id]) {
|
||||
if (toDelete[image.id]) {
|
||||
images.push(image);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue