1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 07:49:41 +02:00

feat(image): add the ability to push an image tag

This commit is contained in:
Anthony Lapenna 2016-08-17 12:27:54 +12:00
parent 722dc0b3af
commit f0e4cdc13e
4 changed files with 35 additions and 3 deletions

View file

@ -12,6 +12,13 @@ function createImageHandler(data) {
return angular.fromJson(str);
}
// Image push API return a list of JSON object.
// This handler wrap the JSON objects in an array.
function pushImageHandler(data) {
var str = "[" + data.replace(/\n/g, " ").replace(/\}\s*\{/g, "}, {") + "]";
return angular.fromJson(str);
}
// Image delete API returns an array on success and an object on error.
// This handler creates an array from an object in case of error.
function deleteImageHandler(data) {