- Finished new image view
- Add the CoreOS icon font
This commit is contained in:
		
							parent
							
								
									049148cb87
								
							
						
					
					
						commit
						8042f1a985
					
				
					 7 changed files with 93 additions and 15 deletions
				
			
		|  | @ -24,8 +24,9 @@ angular.module('quay').directive('imageViewLayer', function () { | |||
|         if (command[0] != '/bin/sh' || command[1] != '-c') { return ''; } | ||||
| 
 | ||||
|         var cmd = command[2]; | ||||
| 
 | ||||
|         if (cmd.substring(0, commandPrefix.length) != commandPrefix) { return ''; } | ||||
|         if (cmd.substring(0, commandPrefix.length) != commandPrefix) { | ||||
|           return 'RUN ' + cmd; | ||||
|         } | ||||
| 
 | ||||
|         return command[2].substr(commandPrefix.length + 1); | ||||
|       }; | ||||
|  |  | |||
|  | @ -13,7 +13,7 @@ | |||
|     }, ['old-layout']); | ||||
|   }]); | ||||
| 
 | ||||
|   function ImageViewCtrl($scope, $routeParams, $rootScope, ApiService, ImageMetadataService) { | ||||
|   function ImageViewCtrl($scope, $routeParams, $rootScope, $timeout, ApiService, ImageMetadataService) { | ||||
|     var namespace = $routeParams.namespace; | ||||
|     var name = $routeParams.name; | ||||
|     var imageid = $routeParams.image; | ||||
|  | @ -42,6 +42,44 @@ | |||
| 
 | ||||
|     loadImage(); | ||||
|     loadRepository(); | ||||
| 
 | ||||
|     $scope.downloadChanges = function() { | ||||
|       if ($scope.changesResource) { return; } | ||||
| 
 | ||||
|       var params = { | ||||
|         'repository': namespace + '/' + name, | ||||
|         'image_id': imageid | ||||
|       }; | ||||
| 
 | ||||
|       $scope.changesResource = ApiService.getImageChangesAsResource(params).get(function(changes) { | ||||
|         var combinedChanges = []; | ||||
|         var addCombinedChanges = function(c, kind) { | ||||
|           for (var i = 0;  i < c.length; ++i) { | ||||
|             combinedChanges.push({ | ||||
|               'kind': kind, | ||||
|               'file': c[i] | ||||
|             }); | ||||
|           } | ||||
|         }; | ||||
| 
 | ||||
|         addCombinedChanges(changes.added, 'added'); | ||||
|         addCombinedChanges(changes.removed, 'removed'); | ||||
|         addCombinedChanges(changes.changed, 'changed'); | ||||
| 
 | ||||
|         $scope.combinedChanges = combinedChanges; | ||||
|         $scope.imageChanges = changes; | ||||
|         $scope.initializeTree(); | ||||
|       }); | ||||
|     }; | ||||
| 
 | ||||
|     $scope.initializeTree = function() { | ||||
|       if ($scope.tree) { return; } | ||||
| 
 | ||||
|       $scope.tree = new ImageFileChangeTree($scope.image, $scope.combinedChanges); | ||||
|       $timeout(function() { | ||||
|         $scope.tree.draw('changes-tree-container'); | ||||
|       }, 100); | ||||
|     }; | ||||
|   } | ||||
| 
 | ||||
|   function OldImageViewCtrl($scope, $routeParams, $rootScope, $timeout, ApiService, ImageMetadataService) { | ||||
|  |  | |||
		Reference in a new issue