Add tree view for image history

This commit is contained in:
Joseph Schorr 2013-10-10 02:09:17 -04:00
parent b924fa5336
commit bb5fea6a5f
3 changed files with 138 additions and 44 deletions

View file

@ -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');
});
};