mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 13:55:21 +02:00
feat(registries): add registry management (#930)
This commit is contained in:
parent
9360f24d89
commit
08c5a5a4f6
75 changed files with 2317 additions and 621 deletions
|
@ -1,13 +0,0 @@
|
|||
angular.module('portainer.rest')
|
||||
.factory('Events', ['$resource', 'DOCKER_ENDPOINT', 'EndpointProvider', function EventFactory($resource, DOCKER_ENDPOINT, EndpointProvider) {
|
||||
'use strict';
|
||||
return $resource(DOCKER_ENDPOINT + '/:endpointId/events', {
|
||||
endpointId: EndpointProvider.endpointID
|
||||
},
|
||||
{
|
||||
query: {
|
||||
method: 'GET', params: {since: '@since', until: '@until'},
|
||||
isArray: true, transformResponse: jsonObjectsToArrayHandler
|
||||
}
|
||||
});
|
||||
}]);
|
|
@ -1,6 +1,7 @@
|
|||
angular.module('portainer.rest')
|
||||
.factory('Image', ['$resource', 'DOCKER_ENDPOINT', 'EndpointProvider', function ImageFactory($resource, DOCKER_ENDPOINT, EndpointProvider) {
|
||||
.factory('Image', ['$resource', 'DOCKER_ENDPOINT', 'EndpointProvider', 'HttpRequestHelper', function ImageFactory($resource, DOCKER_ENDPOINT, EndpointProvider, HttpRequestHelper) {
|
||||
'use strict';
|
||||
|
||||
return $resource(DOCKER_ENDPOINT + '/:endpointId/images/:id/:action', {
|
||||
endpointId: EndpointProvider.endpointID
|
||||
},
|
||||
|
@ -14,11 +15,13 @@ angular.module('portainer.rest')
|
|||
inspect: {method: 'GET', params: {id: '@id', action: 'json'}},
|
||||
push: {
|
||||
method: 'POST', params: {action: 'push', id: '@tag'},
|
||||
isArray: true, transformResponse: jsonObjectsToArrayHandler
|
||||
isArray: true, transformResponse: jsonObjectsToArrayHandler,
|
||||
headers: { 'X-Registry-Auth': HttpRequestHelper.registryAuthenticationHeader }
|
||||
},
|
||||
create: {
|
||||
method: 'POST', params: {action: 'create', fromImage: '@fromImage', tag: '@tag'},
|
||||
isArray: true, transformResponse: jsonObjectsToArrayHandler
|
||||
isArray: true, transformResponse: jsonObjectsToArrayHandler,
|
||||
headers: { 'X-Registry-Auth': HttpRequestHelper.registryAuthenticationHeader }
|
||||
},
|
||||
remove: {
|
||||
method: 'DELETE', params: {id: '@id', force: '@force'},
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
angular.module('portainer.rest')
|
||||
.factory('Info', ['$resource', 'DOCKER_ENDPOINT', 'EndpointProvider', function InfoFactory($resource, DOCKER_ENDPOINT, EndpointProvider) {
|
||||
'use strict';
|
||||
return $resource(DOCKER_ENDPOINT + '/:endpointId/info', {
|
||||
endpointId: EndpointProvider.endpointID
|
||||
});
|
||||
}]);
|
|
@ -1,5 +1,5 @@
|
|||
angular.module('portainer.rest')
|
||||
.factory('Service', ['$resource', 'DOCKER_ENDPOINT', 'EndpointProvider', function ServiceFactory($resource, DOCKER_ENDPOINT, EndpointProvider) {
|
||||
.factory('Service', ['$resource', 'DOCKER_ENDPOINT', 'EndpointProvider', 'HttpRequestHelper' ,function ServiceFactory($resource, DOCKER_ENDPOINT, EndpointProvider, HttpRequestHelper) {
|
||||
'use strict';
|
||||
return $resource(DOCKER_ENDPOINT + '/:endpointId/services/:id/:action', {
|
||||
endpointId: EndpointProvider.endpointID
|
||||
|
@ -7,7 +7,10 @@ angular.module('portainer.rest')
|
|||
{
|
||||
get: { method: 'GET', params: {id: '@id'} },
|
||||
query: { method: 'GET', isArray: true },
|
||||
create: { method: 'POST', params: {action: 'create'} },
|
||||
create: {
|
||||
method: 'POST', params: {action: 'create'},
|
||||
headers: { 'X-Registry-Auth': HttpRequestHelper.registryAuthenticationHeader }
|
||||
},
|
||||
update: { method: 'POST', params: {id: '@id', action: 'update', version: '@version'} },
|
||||
remove: { method: 'DELETE', params: {id: '@id'} }
|
||||
});
|
||||
|
|
17
app/rest/docker/system.js
Normal file
17
app/rest/docker/system.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
angular.module('portainer.rest')
|
||||
.factory('System', ['$resource', 'DOCKER_ENDPOINT', 'EndpointProvider', function SystemFactory($resource, DOCKER_ENDPOINT, EndpointProvider) {
|
||||
'use strict';
|
||||
return $resource(DOCKER_ENDPOINT + '/:endpointId/:action', {
|
||||
name: '@name',
|
||||
endpointId: EndpointProvider.endpointID
|
||||
},
|
||||
{
|
||||
info: { method: 'GET', params: { action: 'info' } },
|
||||
version: { method: 'GET', params: { action: 'version' } },
|
||||
events: {
|
||||
method: 'GET', params: { action: 'events', since: '@since', until: '@until' },
|
||||
isArray: true, transformResponse: jsonObjectsToArrayHandler
|
||||
},
|
||||
auth: { method: 'POST', params: { action: 'auth' } }
|
||||
});
|
||||
}]);
|
|
@ -1,7 +0,0 @@
|
|||
angular.module('portainer.rest')
|
||||
.factory('Version', ['$resource', 'DOCKER_ENDPOINT', 'EndpointProvider', function VersionFactory($resource, DOCKER_ENDPOINT, EndpointProvider) {
|
||||
'use strict';
|
||||
return $resource(DOCKER_ENDPOINT + '/:endpointId/version', {
|
||||
endpointId: EndpointProvider.endpointID
|
||||
});
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue