Add ability to revert tags via time machine
This commit is contained in:
parent
2a77bd2c92
commit
f19d2f684e
16 changed files with 277 additions and 19 deletions
|
@ -24,6 +24,7 @@ angular.module('quay').directive('repoPanelTags', function () {
|
|||
};
|
||||
|
||||
$scope.iterationState = {};
|
||||
$scope.tagHistory = {};
|
||||
$scope.tagActionHandler = null;
|
||||
$scope.showingHistory = false;
|
||||
|
||||
|
@ -84,6 +85,9 @@ angular.module('quay').directive('repoPanelTags', function () {
|
|||
'count': imageMap[image_id].length,
|
||||
'tags': imageMap[image_id]
|
||||
});
|
||||
|
||||
imageMap[image_id]['color'] = colors(index);
|
||||
|
||||
++index;
|
||||
}
|
||||
});
|
||||
|
@ -224,6 +228,24 @@ angular.module('quay').directive('repoPanelTags', function () {
|
|||
|
||||
return names.join(',');
|
||||
};
|
||||
|
||||
$scope.loadTagHistory = function(tag) {
|
||||
delete $scope.tagHistory[tag.name];
|
||||
|
||||
var params = {
|
||||
'repository': $scope.repository.namespace + '/' + $scope.repository.name,
|
||||
'specificTag': tag.name,
|
||||
'limit': 5
|
||||
};
|
||||
|
||||
ApiService.listRepoTags(null, params).then(function(resp) {
|
||||
$scope.tagHistory[tag.name] = resp.tags;
|
||||
}, ApiService.errorDisplay('Could not load tag history'));
|
||||
};
|
||||
|
||||
$scope.askRevertTag = function(tag, image_id) {
|
||||
$scope.tagActionHandler.askRevertTag(tag, image_id);
|
||||
};
|
||||
}
|
||||
};
|
||||
return directiveDefinitionObject;
|
||||
|
|
Reference in a new issue