mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 05:45:22 +02:00
refactor(app): move storidge to new 'integrations' module (#2905)
* refactor(app): move storidge to new 'integrations' module * style(storidge): revert TODO note removal
This commit is contained in:
parent
67de71a18f
commit
144e0ae07e
59 changed files with 32 additions and 29 deletions
45
app/integrations/storidge/rest/storidge.js
Normal file
45
app/integrations/storidge/rest/storidge.js
Normal file
|
@ -0,0 +1,45 @@
|
|||
angular.module('portainer.integrations.storidge')
|
||||
.factory('Storidge', ['$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider', function StoridgeFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
|
||||
'use strict';
|
||||
return $resource(API_ENDPOINT_ENDPOINTS + '/:endpointId/storidge/:resource/:id/:action', {
|
||||
endpointId: EndpointProvider.endpointID
|
||||
},
|
||||
{
|
||||
rebootCluster: { method: 'POST', params: { resource: 'clusters', action: 'reboot' } },
|
||||
shutdownCluster: { method: 'POST', params: { resource: 'clusters', action: 'shutdown' } },
|
||||
queryEvents: { method: 'GET', params: { resource: 'clusters', action: 'events' }, timeout: 4500, ignoreLoadingBar: true, isArray: true },
|
||||
getVersion: { method: 'GET', params: { resource: 'clusters', action: 'version' } },
|
||||
getInfo: { method: 'GET', params: { resource: 'clusters', action: 'info' }, timeout: 4500, ignoreLoadingBar: true },
|
||||
|
||||
queryNodes: { method: 'GET', params: { resource: 'nodes' } },
|
||||
getNode: { method: 'GET', params: { resource: 'nodes', id: '@id' } },
|
||||
addNode: { method: 'POST', params: { resource: 'nodes' } },
|
||||
removeNode: { method: 'DELETE', params: { resource: 'nodes', id: '@id' } },
|
||||
cordonNode: { method: 'POST', params : { resource: 'nodes', action:'cordon', id: '@id' } },
|
||||
uncordonNode: { method: 'POST', params : { resource: 'nodes', action: 'uncordon', id:'@id' } },
|
||||
|
||||
queryProfiles: { method: 'GET', params: { resource: 'profiles' } },
|
||||
getProfile: { method: 'GET', params: { resource: 'profiles' } },
|
||||
createProfile: { method: 'POST', params: { resource: 'profiles' } },
|
||||
updateProfile: { method: 'PUT', params: { resource: 'profiles', id: '@name' } },
|
||||
deleteProfile: { method: 'DELETE', params: { resource: 'profiles' } },
|
||||
|
||||
queryDrives: { method: 'GET', params: { resource: 'drives' } },
|
||||
getDrive: { method: 'GET', params: { resource: 'drives', id: '@id' } },
|
||||
addDrive: { method: 'POST', params: { resource: 'drives' } },
|
||||
removeDrive: { method: 'DELETE', params: { resource: 'drives', id: '@id' } },
|
||||
rescanDrives: { method: 'POST', params: { resource: 'drives', action: 'rescan' } },
|
||||
|
||||
queryVolumes: { method: 'GET', params: { resource: 'volumes' } },
|
||||
createVolume: { method: 'POST', params: { resource: 'volumes' } },
|
||||
getVolume: { method: 'GET', params: { resource: 'volumes', id: '@id' } },
|
||||
updateVolume: { method: 'POST', params: { resource: 'volumes', id: '@name' } },
|
||||
removeVolume: { method: 'DELETE', params: { resource: 'volumes' , id: '@id' } },
|
||||
|
||||
querySnapshots: { method: 'GET', params: { resource: 'volumes', id: '@id', action: 'snapshots' } },
|
||||
createSnapshot: { method: 'POST', params: { resource: 'volumes', id: '@id', action: 'snapshot' } },
|
||||
getSnapshot: { method: 'GET', params: { resource: 'snapshots', id: '@id' } },
|
||||
removeSnapshot: { method: 'DELETE', params: { resource: 'snapshots', id: '@id'} }
|
||||
|
||||
});
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue