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
|
@ -493,7 +493,7 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
|
|||
};
|
||||
|
||||
$scope.findImageForTag = function(tag) {
|
||||
return tag && $scope.imageByInternalId && $scope.imageByInternalId[tag.internal_id];
|
||||
return tag && $scope.imageByDockerId && $scope.imageByDockerId[tag.image_id];
|
||||
};
|
||||
|
||||
$scope.createOrMoveTag = function(image, tagName, opt_invalid) {
|
||||
|
@ -681,9 +681,9 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
|
|||
};
|
||||
|
||||
var forAllTagImages = function(tag, callback) {
|
||||
if (!tag || !$scope.imageByInternalId) { return; }
|
||||
if (!tag || !$scope.imageByDockerId) { return; }
|
||||
|
||||
var tag_image = $scope.imageByInternalId[tag.internal_id];
|
||||
var tag_image = $scope.imageByDockerId[tag.image_id];
|
||||
if (!tag_image) { return; }
|
||||
|
||||
// Callback the tag's image itself.
|
||||
|
@ -693,7 +693,7 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
|
|||
if (!tag_image.ancestors) { return; }
|
||||
var ancestors = tag_image.ancestors.split('/');
|
||||
for (var i = 0; i < ancestors.length; ++i) {
|
||||
var image = $scope.imageByInternalId[ancestors[i]];
|
||||
var image = $scope.imageByDockerId[ancestors[i]];
|
||||
if (image) {
|
||||
callback(image);
|
||||
}
|
||||
|
@ -782,10 +782,10 @@ function RepoCtrl($scope, $sanitize, Restangular, ImageMetadataService, ApiServi
|
|||
$scope.specificImages = [];
|
||||
|
||||
// Build various images for quick lookup of images.
|
||||
$scope.imageByInternalId = {};
|
||||
$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;
|
||||
}
|
||||
|
||||
// Dispose of any existing tree.
|
||||
|
|
Reference in a new issue