2020-04-10 21:54:53 +00:00
|
|
|
angular.module('portainer.agent').factory('Agent', [
|
|
|
|
'$resource',
|
|
|
|
'API_ENDPOINT_ENDPOINTS',
|
|
|
|
'EndpointProvider',
|
|
|
|
'StateManager',
|
2018-10-26 03:16:29 +00:00
|
|
|
function AgentFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider, StateManager) {
|
2020-04-10 21:54:53 +00:00
|
|
|
'use strict';
|
|
|
|
return $resource(
|
|
|
|
API_ENDPOINT_ENDPOINTS + '/:endpointId/docker/v:version/agents',
|
|
|
|
{
|
|
|
|
endpointId: EndpointProvider.endpointID,
|
|
|
|
version: StateManager.getAgentApiVersion,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
query: { method: 'GET', isArray: true },
|
|
|
|
}
|
|
|
|
);
|
2018-05-06 07:15:57 +00:00
|
|
|
},
|
2020-04-10 21:54:53 +00:00
|
|
|
]);
|