mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
refactor(environments): remove endpoints cache [DTD-100] (#6408)
This commit is contained in:
parent
9ef2e27aae
commit
37d4a80769
51 changed files with 155 additions and 353 deletions
|
@ -2,11 +2,10 @@ import angular from 'angular';
|
|||
|
||||
angular.module('portainer.agent').factory('Agent', AgentFactory);
|
||||
|
||||
function AgentFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider, StateManager) {
|
||||
function AgentFactory($resource, API_ENDPOINT_ENDPOINTS, StateManager) {
|
||||
return $resource(
|
||||
`${API_ENDPOINT_ENDPOINTS}/:endpointId/docker/v:version/agents`,
|
||||
{
|
||||
endpointId: EndpointProvider.endpointID,
|
||||
version: StateManager.getAgentApiVersion,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -4,11 +4,10 @@ import { browseGetResponse } from './response/browse';
|
|||
|
||||
angular.module('portainer.agent').factory('Browse', BrowseFactory);
|
||||
|
||||
function BrowseFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider, StateManager) {
|
||||
function BrowseFactory($resource, API_ENDPOINT_ENDPOINTS, StateManager) {
|
||||
return $resource(
|
||||
`${API_ENDPOINT_ENDPOINTS}/:endpointId/docker/v:version/browse/:action`,
|
||||
{
|
||||
endpointId: EndpointProvider.endpointID,
|
||||
version: StateManager.getAgentApiVersion,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -2,11 +2,10 @@ import angular from 'angular';
|
|||
|
||||
angular.module('portainer.agent').factory('Host', HostFactory);
|
||||
|
||||
function HostFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider, StateManager) {
|
||||
function HostFactory($resource, API_ENDPOINT_ENDPOINTS, StateManager) {
|
||||
return $resource(
|
||||
`${API_ENDPOINT_ENDPOINTS}/:endpointId/docker/v:version/host/:action`,
|
||||
{
|
||||
endpointId: EndpointProvider.endpointID,
|
||||
version: StateManager.getAgentApiVersion,
|
||||
},
|
||||
{
|
||||
|
|
|
@ -2,12 +2,10 @@ import angular from 'angular';
|
|||
|
||||
angular.module('portainer.agent').factory('AgentPing', AgentPingFactory);
|
||||
|
||||
function AgentPingFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider, $q) {
|
||||
function AgentPingFactory($resource, API_ENDPOINT_ENDPOINTS, $q) {
|
||||
return $resource(
|
||||
`${API_ENDPOINT_ENDPOINTS}/:endpointId/docker/ping`,
|
||||
{
|
||||
endpointId: EndpointProvider.endpointID,
|
||||
},
|
||||
{},
|
||||
{
|
||||
ping: {
|
||||
method: 'GET',
|
||||
|
|
|
@ -2,12 +2,10 @@ import angular from 'angular';
|
|||
|
||||
angular.module('portainer.agent').factory('AgentVersion1', AgentFactory);
|
||||
|
||||
function AgentFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
|
||||
function AgentFactory($resource, API_ENDPOINT_ENDPOINTS) {
|
||||
return $resource(
|
||||
`${API_ENDPOINT_ENDPOINTS}/:endpointId/docker/agents`,
|
||||
{
|
||||
endpointId: EndpointProvider.endpointID,
|
||||
},
|
||||
{},
|
||||
{
|
||||
query: { method: 'GET', isArray: true },
|
||||
}
|
||||
|
|
|
@ -4,12 +4,10 @@ import { browseGetResponse } from '../response/browse';
|
|||
|
||||
angular.module('portainer.agent').factory('BrowseVersion1', BrowseFactory);
|
||||
|
||||
function BrowseFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
|
||||
function BrowseFactory($resource, API_ENDPOINT_ENDPOINTS) {
|
||||
return $resource(
|
||||
`${API_ENDPOINT_ENDPOINTS}/:endpointId/docker/browse/:volumeID/:action`,
|
||||
{
|
||||
endpointId: EndpointProvider.endpointID,
|
||||
},
|
||||
{},
|
||||
{
|
||||
ls: {
|
||||
method: 'GET',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue