diff --git a/static/directives/repo-view/repo-panel-tags.html b/static/directives/repo-view/repo-panel-tags.html index fab02e409..8bb75e848 100644 --- a/static/directives/repo-view/repo-panel-tags.html +++ b/static/directives/repo-view/repo-panel-tags.html @@ -26,16 +26,25 @@ - - View History - - + diff --git a/static/js/directives/repo-view/repo-panel-tags.js b/static/js/directives/repo-view/repo-panel-tags.js index 998d73f05..105eafebe 100644 --- a/static/js/directives/repo-view/repo-panel-tags.js +++ b/static/js/directives/repo-view/repo-panel-tags.js @@ -11,6 +11,7 @@ angular.module('quay').directive('repoPanelTags', function () { scope: { 'repository': '=repository', 'selectedTags': '=selectedTags', + 'historyFilter': '=historyFilter', 'imagesResource': '=imagesResource', 'imageLoader': '=imageLoader', @@ -349,6 +350,15 @@ angular.module('quay').directive('repoPanelTags', function () { }); }; + $scope.showHistory = function(checked) { + if (!checked.length) { + return; + } + + $scope.historyFilter = $scope.getTagNames(checked); + $scope.setTab('history'); + }; + $scope.getTagNames = function(checked) { var names = checked.map(function(tag) { return tag.name; diff --git a/static/partials/repo-view.html b/static/partials/repo-view.html index f2e58e783..746345390 100644 --- a/static/partials/repo-view.html +++ b/static/partials/repo-view.html @@ -86,6 +86,7 @@ repository="viewScope.repository" image-loader="viewScope.imageLoader" selected-tags="viewScope.selectedTags" + history-filter="viewScope.historyFilter" is-enabled="tagsShown">