2018-02-01 12:27:52 +00:00
|
|
|
angular.module('portainer.docker')
|
2017-07-20 14:22:27 +00:00
|
|
|
.factory('Task', ['$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider', function TaskFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
|
2017-01-31 23:26:29 +00:00
|
|
|
'use strict';
|
2018-02-28 06:19:28 +00:00
|
|
|
return $resource(API_ENDPOINT_ENDPOINTS + '/:endpointId/docker/tasks/:id/:action', {
|
2017-03-12 16:24:15 +00:00
|
|
|
endpointId: EndpointProvider.endpointID
|
|
|
|
},
|
|
|
|
{
|
2017-01-31 23:26:29 +00:00
|
|
|
get: { method: 'GET', params: {id: '@id'} },
|
2018-02-28 06:19:28 +00:00
|
|
|
query: { method: 'GET', isArray: true, params: {filters: '@filters'} },
|
|
|
|
logs: {
|
|
|
|
method: 'GET', params: { id: '@id', action: 'logs' },
|
|
|
|
timeout: 4500, ignoreLoadingBar: true,
|
2018-05-04 07:45:05 +00:00
|
|
|
transformResponse: logsHandler
|
2018-02-28 06:19:28 +00:00
|
|
|
}
|
2017-01-31 23:26:29 +00:00
|
|
|
});
|
|
|
|
}]);
|