2017-02-01 12:26:29 +13:00
|
|
|
angular.module('portainer.rest')
|
2017-06-01 10:14:55 +02:00
|
|
|
.factory('Events', ['$resource', 'DOCKER_ENDPOINT', 'EndpointProvider', function EventFactory($resource, DOCKER_ENDPOINT, EndpointProvider) {
|
2017-02-01 12:26:29 +13:00
|
|
|
'use strict';
|
2017-06-01 10:14:55 +02:00
|
|
|
return $resource(DOCKER_ENDPOINT + '/:endpointId/events', {
|
2017-03-12 17:24:15 +01:00
|
|
|
endpointId: EndpointProvider.endpointID
|
|
|
|
},
|
|
|
|
{
|
2017-02-01 12:26:29 +13:00
|
|
|
query: {
|
|
|
|
method: 'GET', params: {since: '@since', until: '@until'},
|
|
|
|
isArray: true, transformResponse: jsonObjectsToArrayHandler
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}]);
|