mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 12:25:22 +02:00
refactor(azure/aci): migrate create view to react [EE-2188] (#6371)
This commit is contained in:
parent
1bb02eea59
commit
6f6f78fbe5
53 changed files with 1476 additions and 571 deletions
76
app/setup-tests/setup-handlers/azure.ts
Normal file
76
app/setup-tests/setup-handlers/azure.ts
Normal file
|
@ -0,0 +1,76 @@
|
|||
import { rest } from 'msw';
|
||||
|
||||
export const azureHandlers = [
|
||||
rest.get('/api/endpoints/:endpointId/azure/subscriptions', (req, res, ctx) =>
|
||||
res(
|
||||
ctx.json({
|
||||
value: [
|
||||
{
|
||||
id: '/subscriptions/sub1',
|
||||
authorizationSource: 'RoleBased',
|
||||
subscriptionId: 'sub1',
|
||||
displayName: 'Portainer',
|
||||
state: 'Enabled',
|
||||
},
|
||||
],
|
||||
})
|
||||
)
|
||||
),
|
||||
rest.get(
|
||||
'/api/endpoints/:endpointId/azure/subscriptions/:subscriptionId/providers/Microsoft.ContainerInstance',
|
||||
(req, res, ctx) =>
|
||||
res(
|
||||
ctx.json({
|
||||
id: `/subscriptions/${req.params.subscriptionId}/providers/Microsoft.ContainerInstance`,
|
||||
namespace: 'Microsoft.ContainerInstance',
|
||||
resourceTypes: [
|
||||
{
|
||||
resourceType: 'containerGroups',
|
||||
locations: [
|
||||
'Australia East',
|
||||
'Australia Southeast',
|
||||
'Brazil South',
|
||||
],
|
||||
},
|
||||
{
|
||||
resourceType: 'serviceAssociationLinks',
|
||||
locations: [
|
||||
'Korea Central',
|
||||
'North Central US',
|
||||
'North Europe',
|
||||
'Norway East',
|
||||
'South Africa North',
|
||||
'South Central US',
|
||||
],
|
||||
},
|
||||
{
|
||||
resourceType: 'locations',
|
||||
locations: [],
|
||||
},
|
||||
],
|
||||
})
|
||||
)
|
||||
),
|
||||
rest.get(
|
||||
'/api/endpoints/:endpointId/azure/subscriptions/:subsriptionId/resourcegroups',
|
||||
(res, req, ctx) =>
|
||||
req(
|
||||
ctx.json({
|
||||
value: [
|
||||
{
|
||||
id: `/subscriptions/${res.params.subscriptionId}/resourceGroups/rg1`,
|
||||
name: 'rg1',
|
||||
location: 'southcentralus',
|
||||
properties: { provisioningState: 'Succeeded' },
|
||||
},
|
||||
{
|
||||
id: `/subscriptions/${res.params.subscriptionId}/resourceGroups/rg2`,
|
||||
name: 'rg2',
|
||||
location: 'southcentralus',
|
||||
properties: { provisioningState: 'Succeeded' },
|
||||
},
|
||||
],
|
||||
})
|
||||
)
|
||||
),
|
||||
];
|
Loading…
Add table
Add a link
Reference in a new issue