cf5056d9c0
* chore(project): install prettier and lint-staged * chore(project): apply prettier to html too * chore(project): git ignore eslintcache * chore(project): add a comment about format script * chore(prettier): update printWidth * chore(prettier): remove useTabs option * chore(prettier): add HTML validation * refactor(prettier): fix closing tags * feat(prettier): define angular parser for html templates * style(prettier): run prettier on codebase Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com>
46 lines
1.3 KiB
JavaScript
46 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;
|
|
},
|
|
]);
|