Skip to content

Commit d74fb0b

Browse files
committed
AWS Integration skeleton UI (#6758)
* feat: add AWS integration in the integrations list and redirect to the new Cloud Integration page * feat: cloud integration details page header (i.e. breadcrumb and get help button) UI * feat: hero section UI * refactor: extract Header and HeroSection components from CloudIntegrationPage * feat: services tab bar and sidebar UI * feat: cloud integration details services UI * refactor: group and extract cloud integration components to files * fix: set default active service to the first service in the list if no service is specified * feat: add NEW flag for AWS integration in the integrations list page * chore: overall improvements * chore: move cloud integration pages to /container * fix: hero section background * AWS Integration: Account setup basic UI and functionality (#6806) * feat: implement basic cloud account management UI in HeroSection * AWS Integration: Integrate now modal (#6807) * feat: implement basic cloud account management UI in HeroSection * feat: start working on integrate now modal UI * feat: integrate now modal UI * feat: integrate now modal states and json server API integration * feat: get accounts from json-server API, and redirect Add new account to the integrations modal * feat: display error state if last_heartbeat_ts_ms is null even after 5 minutes * chore: update import path for regions data in useRegionSelection hook * chore: move hero section components inside the HeroSection/components * feat: create a reusable modal component * refactor: make the cloud account setup modal readable / DRYer * AWS Integration: Account settings modal (#6808) * feat: implement basic cloud account management UI in HeroSection * feat: start working on integrate now modal UI * feat: get accounts from json-server API, and redirect Add new account to the integrations modal * feat: integrate now modal UI * feat: integrate now modal states and json server API integration * feat: account settings * feat: service status UI * refactor: make account settings modal more readable and overall improvements * feat: Get data from json server api data in service sections (#6809) * feat: implement basic cloud account management UI in HeroSection * feat: start working on integrate now modal UI * feat: get accounts from json-server API, and redirect Add new account to the integrations modal * refactor: make the cloud account setup modal readable / DRYer * feat: integrate now modal states and json server API integration * refactor: make account settings modal more readable and overall improvements * feat: integrate now modal states and json server API integration * feat: display error state if last_heartbeat_ts_ms is null even after 5 minutes * feat: get the services list and details from json server API response * feat: update account actions to set accountId in URL query on initial account load * feat: configure service modal (#6814) * feat: implement basic cloud account management UI in HeroSection * feat: start working on integrate now modal UI * feat: get accounts from json-server API, and redirect Add new account to the integrations modal * refactor: make the cloud account setup modal readable / DRYer * feat: integrate now modal states and json server API integration * feat: get accounts from json-server API, and redirect Add new account to the integrations modal * feat: integrate now modal states and json server API integration * feat: get accounts from json-server API, and redirect Add new account to the integrations modal * feat: display error state if last_heartbeat_ts_ms is null even after 5 minutes * feat: account settings * feat: service status UI * feat: get the services list and details from json server API response * feat: update account actions to set accountId in URL query on initial account load * feat: configure service modal UI * feat: configure service modal functionality and API changes * feat: replace loading indicators with Spinner component in ServiceDetails and ServicesList * fix: make the configure service modal work * Light mode support and overall improvements to AWS integration page (#6817) * refactor: make the cloud account setup modal readable / DRYer * feat: integrate now modal states and json server API integration * refactor: make account settings modal more readable and overall improvements * fix: integrate now modal button improvements * feat: aws integrations light mode * refactor: overall improvements * refactor: define react query keys in constant * feat: services filter * feat: render service overview as markdown * feat: integrate AWS integration page API (#6851) * feat: replace json-server APIs with actual APIs * fix: add null checks and fix the issues
1 parent ffd72cf commit d74fb0b

File tree

66 files changed

+19717
-21
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+19717
-21
lines changed

frontend/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
"react-grid-layout": "^1.3.4",
108108
"react-helmet-async": "1.3.0",
109109
"react-i18next": "^11.16.1",
110+
"react-lottie": "1.2.10",
110111
"react-markdown": "8.0.7",
111112
"react-query": "3.39.3",
112113
"react-redux": "^7.2.2",
@@ -178,6 +179,7 @@
178179
"@types/react-dom": "18.0.10",
179180
"@types/react-grid-layout": "^1.1.2",
180181
"@types/react-helmet-async": "1.0.3",
182+
"@types/react-lottie": "1.2.10",
181183
"@types/react-redux": "^7.1.11",
182184
"@types/react-resizable": "3.0.3",
183185
"@types/react-router-dom": "^5.1.6",
@@ -218,6 +220,7 @@
218220
"portfinder-sync": "^0.0.2",
219221
"postcss": "8.4.38",
220222
"prettier": "2.2.1",
223+
"prop-types": "15.8.1",
221224
"raw-loader": "4.0.2",
222225
"react-hooks-testing-library": "0.6.0",
223226
"react-hot-loader": "^4.13.0",
Loading
Loading

frontend/public/Logos/aws-dark.svg

+23
Loading

frontend/public/Logos/aws-light.svg

+9
Loading
+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
import axios from 'api';
2+
import {
3+
CloudAccount,
4+
Service,
5+
ServiceData,
6+
UpdateServiceConfigPayload,
7+
UpdateServiceConfigResponse,
8+
} from 'container/CloudIntegrationPage/ServicesSection/types';
9+
import {
10+
AccountConfigPayload,
11+
AccountConfigResponse,
12+
ConnectionUrlResponse,
13+
} from 'types/api/integrations/aws';
14+
15+
export const getAwsAccounts = async (): Promise<CloudAccount[]> => {
16+
const response = await axios.get('/cloud-integrations/aws/accounts');
17+
18+
return response.data.data;
19+
};
20+
21+
export const getAwsServices = async (
22+
accountId?: string,
23+
): Promise<Service[]> => {
24+
const params = accountId ? { account_id: accountId } : undefined;
25+
const response = await axios.get('/cloud-integrations/aws/services', {
26+
params,
27+
});
28+
29+
return response.data.data.services;
30+
};
31+
32+
export const getServiceDetails = async (
33+
serviceId: string,
34+
accountId?: string,
35+
): Promise<ServiceData> => {
36+
const params = accountId ? { account_id: accountId } : undefined;
37+
const response = await axios.get(
38+
`/cloud-integrations/aws/services/${serviceId}`,
39+
{ params },
40+
);
41+
return response.data.data;
42+
};
43+
44+
export const generateConnectionUrl = async (params: {
45+
agent_config: { region: string };
46+
account_config: { regions: string[] };
47+
account_id?: string;
48+
}): Promise<ConnectionUrlResponse> => {
49+
const response = await axios.post(
50+
'/cloud-integrations/aws/accounts/generate-connection-url',
51+
params,
52+
);
53+
return response.data.data;
54+
};
55+
56+
export const updateAccountConfig = async (
57+
accountId: string,
58+
payload: AccountConfigPayload,
59+
): Promise<AccountConfigResponse> => {
60+
const response = await axios.post<AccountConfigResponse>(
61+
`/cloud-integrations/aws/accounts/${accountId}/config`,
62+
payload,
63+
);
64+
return response.data;
65+
};
66+
67+
export const updateServiceConfig = async (
68+
serviceId: string,
69+
payload: UpdateServiceConfigPayload,
70+
): Promise<UpdateServiceConfigResponse> => {
71+
const response = await axios.post<UpdateServiceConfigResponse>(
72+
`/cloud-integrations/aws/services/${serviceId}/config`,
73+
payload,
74+
);
75+
console.log({ serviceId });
76+
return response.data;
77+
};

0 commit comments

Comments
 (0)