1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-23 15:29:42 +02:00
portainer/app/agent/rest/host.js
Chaim Lev-Ari 7eb8d5449a
refactor(agent): refactor rest factories to es6 (#4090)
* refactor(agent): replace v1 browse with es6 module

* refactor(agent): refactor agentv1 to es6

* refactor(agent): replace agent factory with es6

* refactor(agent): refactor browse response to es6

* refactor(agent): refactor browse to es6

* refactor(agent): import angular

* refactor(agent): refactor host to es6

* refactor(agent): refactor ping to es6
2020-07-23 19:45:01 +12:00

16 lines
468 B
JavaScript

import angular from 'angular';
angular.module('portainer.agent').factory('Host', HostFactory);
function HostFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider, StateManager) {
return $resource(
`${API_ENDPOINT_ENDPOINTS}/:endpointId/docker/v:version/host/:action`,
{
endpointId: EndpointProvider.endpointID,
version: StateManager.getAgentApiVersion,
},
{
info: { method: 'GET', params: { action: 'info' } },
}
);
}