mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 05:45:22 +02:00
This commit is contained in:
parent
d2702d6d7b
commit
5bca9560c9
16 changed files with 278 additions and 10 deletions
|
@ -26,6 +26,12 @@ function ImageFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider, HttpR
|
|||
headers: { 'X-Registry-Auth': HttpRequestHelper.registryAuthenticationHeader },
|
||||
ignoreLoadingBar: true
|
||||
},
|
||||
download: {
|
||||
method: 'GET', params: {action:'get', names: '@names'},
|
||||
transformResponse: imageGetResponse,
|
||||
responseType: 'blob',
|
||||
ignoreLoadingBar: true
|
||||
},
|
||||
remove: {
|
||||
method: 'DELETE', params: {id: '@id', force: '@force'},
|
||||
isArray: true, transformResponse: deleteImageHandler
|
||||
|
|
10
app/docker/rest/response/image.js
Normal file
10
app/docker/rest/response/image.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
// The get action of the Image service returns a file.
|
||||
// ngResource will transform it as an array of chars.
|
||||
// This functions simply creates a response object and assign
|
||||
// the data to a field.
|
||||
function imageGetResponse(data) {
|
||||
var response = {};
|
||||
response.file = data;
|
||||
return response;
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue