Add tree view for image history
This commit is contained in:
parent
b924fa5336
commit
bb5fea6a5f
3 changed files with 138 additions and 44 deletions
|
@ -254,10 +254,11 @@ function RepoCtrl($scope, Restangular, $routeParams, $rootScope) {
|
|||
$scope.listImages = function() {
|
||||
if ($scope.imageHistory) { return; }
|
||||
|
||||
var imageFetch = Restangular.one('repository/' + namespace + '/' + name + '/tag/' + $scope.currentTag.name + '/images');
|
||||
var imageFetch = Restangular.one('repository/' + namespace + '/' + name + '/image');
|
||||
imageFetch.get().then(function(resp) {
|
||||
$scope.imageHistory = resp.images;
|
||||
var tree = new ImageHistoryTree(resp.images, $scope.currentTag.image, $scope.getCommentFirstLine, $scope.getTimeSince);
|
||||
var tree = new ImageHistoryTree(namespace, name, resp.images, $scope.currentTag,
|
||||
$scope.getCommentFirstLine, $scope.getTimeSince);
|
||||
tree.draw('image-history-container');
|
||||
});
|
||||
};
|
||||
|
|
Reference in a new issue