diff --git a/static/js/app.js b/static/js/app.js index 1af812f5b..97b750ba5 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -5416,7 +5416,8 @@ quayApp.directive('tagSpecificImagesView', function () { scope: { 'repository': '=repository', 'tag': '=tag', - 'images': '=images' + 'images': '=images', + 'imageCutoff': '=imageCutoff' }, controller: function($scope, $element) { $scope.getFirstTextLine = getFirstTextLine; @@ -5438,7 +5439,7 @@ quayApp.directive('tagSpecificImagesView', function () { return classes; }; - var forAllTagImages = function(tag, callback) { + var forAllTagImages = function(tag, callback, opt_cutoff) { if (!tag) { return; } if (!$scope.imageByDBID) { @@ -5456,10 +5457,14 @@ quayApp.directive('tagSpecificImagesView', function () { callback(tag_image); - var ancestors = tag_image.ancestors.split('/'); + var ancestors = tag_image.ancestors.split('/').reverse(); for (var i = 0; i < ancestors.length; ++i) { var image = $scope.imageByDBID[ancestors[i]]; if (image) { + if (image == opt_cutoff) { + return; + } + callback(image); } } @@ -5481,7 +5486,7 @@ quayApp.directive('tagSpecificImagesView', function () { var ids = {}; forAllTagImages(currentTag, function(image) { ids[image.dbid] = true; - }); + }, $scope.imageCutoff); return ids; }; diff --git a/static/partials/view-repo.html b/static/partials/view-repo.html index 7df865add..9e9e83702 100644 --- a/static/partials/view-repo.html +++ b/static/partials/view-repo.html @@ -367,7 +367,7 @@