parent
							
								
									d606a42e39
								
							
						
					
					
						commit
						fee72225cf
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		|  | @ -17,6 +17,9 @@ angular.module('quay').directive('repoTagHistory', function () { | |||
|       $scope.tagHistoryData = null; | ||||
|       $scope.tagHistoryLeaves = {}; | ||||
| 
 | ||||
|       // A delete followed by a create of a tag within this threshold is considered a move.
 | ||||
|       var MOVE_THRESHOLD = 2; | ||||
| 
 | ||||
|       var loadTimeline = function() { | ||||
|         if (!$scope.repository || !$scope.isEnabled) { return; } | ||||
| 
 | ||||
|  | @ -68,11 +71,11 @@ angular.module('quay').directive('repoTagHistory', function () { | |||
| 
 | ||||
|           // If the tag has an end time, it was either deleted or moved.
 | ||||
|           if (tag.end_ts) { | ||||
|             // If a future entry exists with a start time equal to the end time for this tag,
 | ||||
|             // If a future entry exists with a start time "equal" to the end time for this tag,
 | ||||
|             // then the action was a move, rather than a delete and a create.
 | ||||
|             var currentEntries = tagEntries[tagName]; | ||||
|             var futureEntry = currentEntries.length > 0 ? currentEntries[currentEntries.length - 1] : {}; | ||||
|             if (futureEntry.start_ts == tag.end_ts) { | ||||
|             if (tag.end_ts - futureEntry.start_ts <= MOVE_THRESHOLD) { | ||||
|               removeEntry(futureEntry); | ||||
|               addEntry(futureEntry.reversion ? 'revert': 'move', tag.end_ts, | ||||
|                        futureEntry.docker_image_id, dockerImageId); | ||||
|  |  | |||
		Reference in a new issue