Actually set the proposed tag to the current tag.
This commit is contained in:
parent
8987f32d9d
commit
98cb902cf8
1 changed files with 7 additions and 1 deletions
|
@ -317,6 +317,11 @@ function RepoCtrl($scope, Restangular, $routeParams, $rootScope) {
|
|||
$scope.tree = new ImageHistoryTree(namespace, name, resp.images,
|
||||
$scope.getCommentFirstLine, $scope.getTimeSince);
|
||||
|
||||
// If we already have a tag, use it
|
||||
if ($scope.currentTag) {
|
||||
$scope.tree.setTag($scope.currentTag.name);
|
||||
}
|
||||
|
||||
$scope.tree.draw('image-history-container');
|
||||
$($scope.tree).bind('tagChanged', function(e) {
|
||||
$scope.$apply(function() { $scope.setTag(e.tag); });
|
||||
|
@ -348,7 +353,8 @@ function RepoCtrl($scope, Restangular, $routeParams, $rootScope) {
|
|||
}
|
||||
|
||||
if (proposedTag) {
|
||||
$scope.currentTag = repo.tags[tagName] || repo.tags['latest'];
|
||||
console.log('Setting tag to: ' + proposedTag.name);
|
||||
$scope.currentTag = proposedTag;
|
||||
$scope.currentImage = $scope.currentTag.image;
|
||||
if ($scope.tree) {
|
||||
$scope.tree.setTag($scope.currentTag.name);
|
||||
|
|
Reference in a new issue