1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-05 13:55:21 +02:00

feat(azure): add experimental Azure endpoint support (#1936)

This commit is contained in:
Anthony Lapenna 2018-05-28 16:40:33 +02:00 committed by GitHub
parent 415c6ce5e1
commit 9ad9cc5e2d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 1665 additions and 79 deletions

View file

@ -0,0 +1,41 @@
angular.module('portainer.azure')
.factory('ContainerGroup', ['$resource', 'API_ENDPOINT_ENDPOINTS', 'EndpointProvider',
function ContainerGroupFactory($resource, API_ENDPOINT_ENDPOINTS, EndpointProvider) {
'use strict';
var resource = {};
var base = $resource(
API_ENDPOINT_ENDPOINTS +'/:endpointId/azure/subscriptions/:subscriptionId/providers/Microsoft.ContainerInstance/containerGroups',
{
'endpointId': EndpointProvider.endpointID,
'api-version': '2018-04-01'
},
{
query: { method: 'GET', params: { subscriptionId: '@subscriptionId' } }
}
);
var withResourceGroup = $resource(
API_ENDPOINT_ENDPOINTS +'/:endpointId/azure/subscriptions/:subscriptionId/resourceGroups/:resourceGroupName/providers/Microsoft.ContainerInstance/containerGroups/:containerGroupName',
{
'endpointId': EndpointProvider.endpointID,
'api-version': '2018-04-01'
},
{
create: {
method: 'PUT',
params: {
subscriptionId: '@subscriptionId',
resourceGroupName: '@resourceGroupName',
containerGroupName: '@containerGroupName'
}
}
}
);
resource.query = base.query;
resource.create = withResourceGroup.create;
return resource;
}]);