1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

refactor(global): service separation #552

This commit is contained in:
Anthony Lapenna 2017-02-01 12:26:29 +13:00 committed by GitHub
parent 0abe8883d1
commit fe0bf77bbb
48 changed files with 1029 additions and 1015 deletions

12
app/rest/network.js Normal file
View file

@ -0,0 +1,12 @@
angular.module('portainer.rest')
.factory('Network', ['$resource', 'Settings', function NetworkFactory($resource, Settings) {
'use strict';
return $resource(Settings.url + '/networks/:id/:action', {id: '@id'}, {
query: {method: 'GET', isArray: true},
get: {method: 'GET'},
create: {method: 'POST', params: {action: 'create'}, transformResponse: genericHandler},
remove: { method: 'DELETE', transformResponse: genericHandler },
connect: {method: 'POST', params: {action: 'connect'}},
disconnect: {method: 'POST', params: {action: 'disconnect'}}
});
}]);