From 6b8dfb3bdfa2e2def4f73c722f71f6e587b2a56a Mon Sep 17 00:00:00 2001 From: milan-deepfence Date: Fri, 3 Feb 2023 21:15:42 +0530 Subject: [PATCH 1/2] added static integrations home page --- .../integrations/pages/Integrations.tsx | 274 ++++++++++++++++++ .../apps/dashboard/src/routes/private.tsx | 6 + 2 files changed, 280 insertions(+) create mode 100644 deepfence_frontend/apps/dashboard/src/features/integrations/pages/Integrations.tsx diff --git a/deepfence_frontend/apps/dashboard/src/features/integrations/pages/Integrations.tsx b/deepfence_frontend/apps/dashboard/src/features/integrations/pages/Integrations.tsx new file mode 100644 index 0000000000..97c5916285 --- /dev/null +++ b/deepfence_frontend/apps/dashboard/src/features/integrations/pages/Integrations.tsx @@ -0,0 +1,274 @@ +import { IconContext } from 'react-icons'; +import { + FaAws, + FaBook, + FaBullhorn, + FaCopyright, + FaFire, + FaGoogle, + FaInstalod, + FaMagento, + FaMicrosoft, + FaMixer, + FaReact, + FaSearchengin, + FaSlack, +} from 'react-icons/fa'; +import { HiArrowSmRight } from 'react-icons/hi'; +import { Card } from 'ui-components'; + +import { DFLink } from '@/components/DFLink'; + +const IntegrationsData = [ + { + name: 'Notification', + icon: ( + <> +
+ + + +
+ + ), + types: [ + { + name: 'Slack', + icon: ( + + + + ), + }, + { + name: 'Microsoft Teams', + icon: ( + + + + ), + }, + { + name: 'Page Duty', + icon: ( + + + + ), + }, + { + name: 'HTTP Endpoint', + icon: ( + + + + ), + }, + ], + }, + { + name: 'SEIM', + icon: ( +
+ + + +
+ ), + types: [ + { + name: 'Splunk', + icon: ( + + + + ), + }, + { + name: 'Elasticsearch', + icon: ( + + + + ), + }, + { + name: 'Sumo Logic', + icon: ( + + + + ), + }, + { + name: 'Google Chronicle', + icon: ( + + + + ), + }, + ], + }, + { + name: 'Ticketing', + icon: ( +
+ + + +
+ ), + types: [ + { + name: 'Jira', + icon: ( + + + + ), + }, + ], + }, + { + name: 'Archival', + icon: ( +
+ + + +
+ ), + types: [ + { + name: 'S3', + icon: ( + + + + ), + }, + ], + }, +]; + +export const Integrations = () => { + return ( +
+ {IntegrationsData.map((integration) => { + return ( +
+
+ + {integration.icon} + +

+ {integration.name.toUpperCase()} +

+
+
+ {integration?.types?.map((type) => { + return ( + +
+

+ {type.name} +

+
+ + + Configure + + + + + +
+
+
+
+ {type.icon} +
+
+ + 23 + + + Connections + +
+
+
+ ); + })} +
+
+ ); + })} +
+ ); +}; diff --git a/deepfence_frontend/apps/dashboard/src/routes/private.tsx b/deepfence_frontend/apps/dashboard/src/routes/private.tsx index a09a6ba292..6086401b9a 100644 --- a/deepfence_frontend/apps/dashboard/src/routes/private.tsx +++ b/deepfence_frontend/apps/dashboard/src/routes/private.tsx @@ -3,6 +3,7 @@ import { Outlet } from 'react-router-dom'; import { DashboardLayout } from '@/features/dashboard/layouts/DashboardLayout'; import { dashboardLoader } from '@/features/dashboard/loaders/dashboardLoader'; import { Dashboard } from '@/features/dashboard/pages/Dashboard'; +import { Integrations } from '@/features/integrations/pages/Integrations'; import { ConnectorsLayout, connectorsLoader, @@ -155,6 +156,11 @@ export const privateRoutes: CustomRouteObject[] = [ element: , meta: { title: 'Registries' }, }, + { + path: 'integrations', + element: , + meta: { title: 'Integrations' }, + }, ], }, ]; From 91a571813c47151d37f052db8ada971862294c78 Mon Sep 17 00:00:00 2001 From: milan-deepfence Date: Fri, 3 Feb 2023 21:18:12 +0530 Subject: [PATCH 2/2] module exported --- .../src/features/integrations/pages/Integrations.tsx | 6 +++++- deepfence_frontend/apps/dashboard/src/routes/private.tsx | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/deepfence_frontend/apps/dashboard/src/features/integrations/pages/Integrations.tsx b/deepfence_frontend/apps/dashboard/src/features/integrations/pages/Integrations.tsx index 97c5916285..0f03e1c8ac 100644 --- a/deepfence_frontend/apps/dashboard/src/features/integrations/pages/Integrations.tsx +++ b/deepfence_frontend/apps/dashboard/src/features/integrations/pages/Integrations.tsx @@ -208,7 +208,7 @@ const IntegrationsData = [ }, ]; -export const Integrations = () => { +const Integrations = () => { return (
{IntegrationsData.map((integration) => { @@ -272,3 +272,7 @@ export const Integrations = () => {
); }; + +export const module = { + element: , +}; diff --git a/deepfence_frontend/apps/dashboard/src/routes/private.tsx b/deepfence_frontend/apps/dashboard/src/routes/private.tsx index 6086401b9a..5328123a2a 100644 --- a/deepfence_frontend/apps/dashboard/src/routes/private.tsx +++ b/deepfence_frontend/apps/dashboard/src/routes/private.tsx @@ -3,7 +3,7 @@ import { Outlet } from 'react-router-dom'; import { DashboardLayout } from '@/features/dashboard/layouts/DashboardLayout'; import { dashboardLoader } from '@/features/dashboard/loaders/dashboardLoader'; import { Dashboard } from '@/features/dashboard/pages/Dashboard'; -import { Integrations } from '@/features/integrations/pages/Integrations'; +import { module as integrations } from '@/features/integrations/pages/Integrations'; import { ConnectorsLayout, connectorsLoader, @@ -158,7 +158,7 @@ export const privateRoutes: CustomRouteObject[] = [ }, { path: 'integrations', - element: , + ...integrations, meta: { title: 'Integrations' }, }, ],