1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-04 21:35:23 +02:00

#414 feat(node-details): add ability to view and edit Swarm mode nodes (#417)

This commit is contained in:
Glowbal 2017-01-25 22:12:04 +01:00 committed by Anthony Lapenna
parent e6dee37af0
commit fa9ba303aa
7 changed files with 464 additions and 5 deletions

View file

@ -153,10 +153,11 @@ angular.module('portainer.services', ['ngResource', 'ngSanitize'])
.factory('Node', ['$resource', 'Settings', function NodeFactory($resource, Settings) {
'use strict';
// https://docs.docker.com/engine/reference/api/docker_remote_api_<%= remoteApiVersion %>/#/3-7-nodes
return $resource(Settings.url + '/nodes', {}, {
query: {
method: 'GET', isArray: true
}
return $resource(Settings.url + '/nodes/:id/:action', {}, {
query: {method: 'GET', isArray: true},
get: {method: 'GET', params: {id: '@id'}},
update: { method: 'POST', params: {id: '@id', action: 'update', version: '@version'} },
remove: { method: 'DELETE', params: {id: '@id'} }
});
}])
.factory('Swarm', ['$resource', 'Settings', function SwarmFactory($resource, Settings) {