mirror of
https://github.com/portainer/portainer.git
synced 2025-07-22 06:49:40 +02:00
feat(image): add the ability to push an image tag
This commit is contained in:
parent
722dc0b3af
commit
f0e4cdc13e
4 changed files with 35 additions and 3 deletions
|
@ -15,6 +15,21 @@ function ($scope, $stateParams, $state, Image, Messages) {
|
|||
});
|
||||
}
|
||||
|
||||
$scope.pushImage = function(tag) {
|
||||
$('#loadingViewSpinner').show();
|
||||
Image.push({tag: tag}, function (d) {
|
||||
if (d[d.length-1].error) {
|
||||
Messages.error("Unable to push image", d[d.length-1].error);
|
||||
} else {
|
||||
Messages.send('Image successfully pushed');
|
||||
}
|
||||
$('#loadingViewSpinner').hide();
|
||||
}, function (e) {
|
||||
$('#loadingViewSpinner').hide();
|
||||
Messages.error("Unable to push image", e.data);
|
||||
});
|
||||
};
|
||||
|
||||
$scope.removeImage = function (id) {
|
||||
$('#loadingViewSpinner').show();
|
||||
Image.remove({id: id}, function (d) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue