-
{item.title}
+
+ {item.title}
+ {item.is_new && NEW
}
+
{item.description}
diff --git a/frontend/src/pages/Integrations/utils.ts b/frontend/src/pages/Integrations/utils.ts
index 0785eb89c035..c3fbb4b2d67b 100644
--- a/frontend/src/pages/Integrations/utils.ts
+++ b/frontend/src/pages/Integrations/utils.ts
@@ -20,3 +20,7 @@ export const INTEGRATION_TELEMETRY_EVENTS = {
INTEGRATIONS_DETAIL_CONFIGURE_INSTRUCTION:
'Integrations Detail Page: Navigated to configure an integration',
};
+
+export const INTEGRATION_TYPES = {
+ AWS_INTEGRATION: 'aws-integration',
+};
diff --git a/frontend/src/pages/IntegrationsModulePage/IntegrationsModulePage.tsx b/frontend/src/pages/IntegrationsModulePage/IntegrationsModulePage.tsx
index bdcf05b2de6b..9521f1d187d7 100644
--- a/frontend/src/pages/IntegrationsModulePage/IntegrationsModulePage.tsx
+++ b/frontend/src/pages/IntegrationsModulePage/IntegrationsModulePage.tsx
@@ -2,18 +2,27 @@ import './IntegrationsModulePage.styles.scss';
import RouteTab from 'components/RouteTab';
import { TabRoutes } from 'components/RouteTab/types';
+import CloudIntegrationPage from 'container/CloudIntegrationPage/CloudIntegrationPage';
+import useUrlQuery from 'hooks/useUrlQuery';
import history from 'lib/history';
+import { INTEGRATION_TYPES } from 'pages/Integrations/utils';
import { useLocation } from 'react-use';
import { installedIntegrations } from './constants';
function IntegrationsModulePage(): JSX.Element {
const { pathname } = useLocation();
+ const urlQuery = useUrlQuery();
+ const selectedIntegration = urlQuery.get('integration');
const routes: TabRoutes[] = [installedIntegrations];
return (
-
+ {selectedIntegration === INTEGRATION_TYPES.AWS_INTEGRATION ? (
+
+ ) : (
+
+ )}
);
}
diff --git a/frontend/src/types/api/integrations/aws.ts b/frontend/src/types/api/integrations/aws.ts
new file mode 100644
index 000000000000..31b191b23138
--- /dev/null
+++ b/frontend/src/types/api/integrations/aws.ts
@@ -0,0 +1,39 @@
+import { CloudAccount } from 'container/CloudIntegrationPage/ServicesSection/types';
+
+export interface GenerateConnectionUrlPayload {
+ agent_config: {
+ region: string;
+ };
+ account_config: {
+ regions: string[];
+ };
+ account_id?: string;
+}
+
+export interface ConnectionUrlResponse {
+ connection_url: string;
+ account_id: string;
+}
+
+export interface AccountStatusResponse {
+ status: 'success';
+ data: {
+ id: string;
+ status: {
+ integration: {
+ last_heartbeat_ts_ms: number | null;
+ };
+ };
+ };
+}
+
+export interface AccountConfigPayload {
+ config: {
+ regions: string[];
+ };
+}
+
+export interface AccountConfigResponse {
+ status: string;
+ data: CloudAccount;
+}
diff --git a/frontend/src/types/api/integrations/types.ts b/frontend/src/types/api/integrations/types.ts
index b9f5e5548016..6ab67136098a 100644
--- a/frontend/src/types/api/integrations/types.ts
+++ b/frontend/src/types/api/integrations/types.ts
@@ -1,4 +1,4 @@
-interface IntegrationsProps {
+export interface IntegrationsProps {
author: {
email: string;
homepage: string;
@@ -8,6 +8,7 @@ interface IntegrationsProps {
id: string;
icon: string;
is_installed: boolean;
+ is_new?: boolean;
title: string;
}
diff --git a/frontend/src/utils/regions.ts b/frontend/src/utils/regions.ts
new file mode 100644
index 000000000000..20e3951a5950
--- /dev/null
+++ b/frontend/src/utils/regions.ts
@@ -0,0 +1,152 @@
+export interface Region {
+ id: string;
+ name: string;
+ subRegions: SubRegion[];
+}
+export interface SubRegion {
+ id: string;
+ name: string;
+ displayName: string;
+}
+const regions: Region[] = [
+ {
+ id: 'north-america',
+ name: 'North America',
+ subRegions: [
+ { id: 'us-east-1', name: 'us-east-1', displayName: 'US East (N. Virginia)' },
+ { id: 'us-east-2', name: 'us-east-2', displayName: 'US East (Ohio)' },
+ {
+ id: 'us-west-1',
+ name: 'us-west-1',
+ displayName: 'US West (N. California)',
+ },
+ { id: 'us-west-2', name: 'us-west-2', displayName: 'US West (Oregon)' },
+ {
+ id: 'ca-central-1',
+ name: 'ca-central-1',
+ displayName: 'Canada (Central)',
+ },
+ { id: 'ca-west-1', name: 'ca-west-1', displayName: 'Canada (West)' },
+ ],
+ },
+ {
+ id: 'africa',
+ name: 'Africa',
+ subRegions: [
+ { id: 'af-south-1', name: 'af-south-1', displayName: 'Africa (Cape Town)' },
+ ],
+ },
+ {
+ id: 'asia-pacific',
+ name: 'Asia Pacific',
+ subRegions: [
+ {
+ id: 'ap-east-1',
+ name: 'ap-east-1',
+ displayName: 'Asia Pacific (Hong Kong)',
+ },
+ {
+ id: 'ap-northeast-1',
+ name: 'ap-northeast-1',
+ displayName: 'Asia Pacific (Tokyo)',
+ },
+ {
+ id: 'ap-northeast-2',
+ name: 'ap-northeast-2',
+ displayName: 'Asia Pacific (Seoul)',
+ },
+ {
+ id: 'ap-northeast-3',
+ name: 'ap-northeast-3',
+ displayName: 'Asia Pacific (Osaka)',
+ },
+ {
+ id: 'ap-south-1',
+ name: 'ap-south-1',
+ displayName: 'Asia Pacific (Mumbai)',
+ },
+ {
+ id: 'ap-south-2',
+ name: 'ap-south-2',
+ displayName: 'Asia Pacific (Hyderabad)',
+ },
+ {
+ id: 'ap-southeast-1',
+ name: 'ap-southeast-1',
+ displayName: 'Asia Pacific (Singapore)',
+ },
+ {
+ id: 'ap-southeast-2',
+ name: 'ap-southeast-2',
+ displayName: 'Asia Pacific (Sydney)',
+ },
+ {
+ id: 'ap-southeast-3',
+ name: 'ap-southeast-3',
+ displayName: 'Asia Pacific (Jakarta)',
+ },
+ {
+ id: 'ap-southeast-4',
+ name: 'ap-southeast-4',
+ displayName: 'Asia Pacific (Melbourne)',
+ },
+ {
+ id: 'ap-southeast-5',
+ name: 'ap-southeast-5',
+ displayName: 'Asia Pacific (Auckland)',
+ },
+ ],
+ },
+ {
+ id: 'europe',
+ name: 'Europe',
+ subRegions: [
+ {
+ id: 'eu-central-1',
+ name: 'eu-central-1',
+ displayName: 'Europe (Frankfurt)',
+ },
+ { id: 'eu-central-2', name: 'eu-central-2', displayName: 'Europe (Zurich)' },
+ { id: 'eu-north-1', name: 'eu-north-1', displayName: 'Europe (Stockholm)' },
+ { id: 'eu-south-1', name: 'eu-south-1', displayName: 'Europe (Milan)' },
+ { id: 'eu-south-2', name: 'eu-south-2', displayName: 'Europe (Spain)' },
+ { id: 'eu-west-1', name: 'eu-west-1', displayName: 'Europe (Ireland)' },
+ { id: 'eu-west-2', name: 'eu-west-2', displayName: 'Europe (London)' },
+ { id: 'eu-west-3', name: 'eu-west-3', displayName: 'Europe (Paris)' },
+ ],
+ },
+ {
+ id: 'middle-east',
+ name: 'Middle East',
+ subRegions: [
+ {
+ id: 'il-central-1',
+ name: 'il-central-1',
+ displayName: 'Israel (Tel Aviv)',
+ },
+ {
+ id: 'me-central-1',
+ name: 'me-central-1',
+ displayName: 'Middle East (UAE)',
+ },
+ {
+ id: 'me-south-1',
+ name: 'me-south-1',
+ displayName: 'Middle East (Bahrain)',
+ },
+ ],
+ },
+ {
+ id: 'south-america',
+ name: 'South America',
+ subRegions: [
+ {
+ id: 'sa-east-1',
+ name: 'sa-east-1',
+ displayName: 'South America (São Paulo)',
+ },
+ ],
+ },
+];
+
+export { regions };
diff --git a/frontend/yarn.lock b/frontend/yarn.lock
index bfa1f03cd7de..8b2e1bd451df 100644
--- a/frontend/yarn.lock
+++ b/frontend/yarn.lock
@@ -4320,6 +4320,13 @@
dependencies:
react-helmet-async "*"
+"@types/react-lottie@1.2.10":
+ version "1.2.10"
+ resolved "https://registry.yarnpkg.com/@types/react-lottie/-/react-lottie-1.2.10.tgz#220f68a2dfa0d4b131ab4930e8bf166b9442c68c"
+ integrity sha512-rCd1p3US4ELKJlqwVnP0h5b24zt5p9OCvKUoNpYExLqwbFZMWEiJ6EGLMmH7nmq5V7KomBIbWO2X/XRFsL0vCA==
+ dependencies:
+ "@types/react" "*"
+
"@types/react-redux@^7.1.11", "@types/react-redux@^7.1.20":
version "7.1.25"
resolved "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.25.tgz"
@@ -11022,6 +11029,11 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3
dependencies:
js-tokens "^3.0.0 || ^4.0.0"
+lottie-web@^5.12.2:
+ version "5.12.2"
+ resolved "https://registry.yarnpkg.com/lottie-web/-/lottie-web-5.12.2.tgz#579ca9fe6d3fd9e352571edd3c0be162492f68e5"
+ integrity sha512-uvhvYPC8kGPjXT3MyKMrL3JitEAmDMp30lVkuq/590Mw9ok6pWcFCwXJveo0t5uqYw1UREQHofD+jVpdjBv8wg==
+
lower-case@^2.0.2:
version "2.0.2"
resolved "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz"
@@ -13221,7 +13233,7 @@ prompts@^2.0.1:
kleur "^3.0.3"
sisteransi "^1.0.5"
-prop-types@15, prop-types@15.x, prop-types@^15.0.0, prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1:
+prop-types@15, prop-types@15.8.1, prop-types@15.x, prop-types@^15.0.0, prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1:
version "15.8.1"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
@@ -13941,6 +13953,15 @@ react-lifecycles-compat@^3.0.4:
resolved "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz"
integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==
+react-lottie@1.2.10:
+ version "1.2.10"
+ resolved "https://registry.yarnpkg.com/react-lottie/-/react-lottie-1.2.10.tgz#399f78a448a7833b2380d74fc489ecf15f8d18c7"
+ integrity sha512-x0eWX3Z6zSx1XM5QSjnLupc6D22LlMCB0PH06O/N/epR2hsLaj1Vxd9RtMnbbEHjJ/qlsgHJ6bpN3vnZI92hjw==
+ dependencies:
+ babel-runtime "^6.26.0"
+ lottie-web "^5.12.2"
+ prop-types "^15.6.1"
+
react-markdown@8.0.7, react-markdown@~8.0.0:
version "8.0.7"
resolved "https://registry.yarnpkg.com/react-markdown/-/react-markdown-8.0.7.tgz#c8dbd1b9ba5f1c5e7e5f2a44de465a3caafdf89b"