1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00
portainer/app/azure/rest/container_group.js
Chaim Lev-Ari b58c2facfe
revert(azure): revert removal (#3890)
* Revert "fix(sidebar): show docker sidebar when needed (#3852)"

This reverts commit 59da17dde4.

* Revert "refactor(azure): remove Azure ACI endpoint support (#3803)"

This reverts commit 493de20540.
2020-06-09 14:43:32 +12:00

45 lines
1.3 KiB
JavaScript

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;
},
]);