Integrations
-
- Manage Integrations for this workspace
-
+
+
+ Manage Integrations for this workspace
+
+
+
-
}
- className="all-integrations-btn"
- onClick={(): void => {
- setSelectedIntegration(null);
- }}
- >
- All Integrations
-
+
+ }
+ className="all-integrations-btn"
+ onClick={(): void => {
+ setSelectedIntegration(null);
+ }}
+ >
+ All Integrations
+
+
+
{loading ? (
diff --git a/frontend/src/pages/Integrations/Integrations.styles.scss b/frontend/src/pages/Integrations/Integrations.styles.scss
index aec8433a26..fe0eaa3c23 100644
--- a/frontend/src/pages/Integrations/Integrations.styles.scss
+++ b/frontend/src/pages/Integrations/Integrations.styles.scss
@@ -172,6 +172,20 @@
}
}
}
+
+ .request-entity-container {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ align-items: center;
+
+ border-radius: 4px;
+ border: 0.5px solid rgba(78, 116, 248, 0.2);
+ background: rgba(69, 104, 220, 0.1);
+ padding: 12px;
+ margin: 24px 0;
+ margin-bottom: 80px;
+ }
}
}
diff --git a/frontend/src/pages/Integrations/Integrations.tsx b/frontend/src/pages/Integrations/Integrations.tsx
index 332c808311..8fdc943f77 100644
--- a/frontend/src/pages/Integrations/Integrations.tsx
+++ b/frontend/src/pages/Integrations/Integrations.tsx
@@ -8,6 +8,7 @@ import { useHistory, useLocation } from 'react-router-dom';
import Header from './Header';
import IntegrationDetailPage from './IntegrationDetailPage/IntegrationDetailPage';
import IntegrationsList from './IntegrationsList';
+import { RequestIntegrationBtn } from './RequestIntegrationBtn';
import { INTEGRATION_TELEMETRY_EVENTS } from './utils';
function Integrations(): JSX.Element {
@@ -65,6 +66,7 @@ function Integrations(): JSX.Element {
searchTerm={searchTerm}
setActiveDetailTab={setActiveDetailTab}
/>
+
>
)}
diff --git a/frontend/src/pages/Integrations/RequestIntegrationBtn.tsx b/frontend/src/pages/Integrations/RequestIntegrationBtn.tsx
new file mode 100644
index 0000000000..a65e87baae
--- /dev/null
+++ b/frontend/src/pages/Integrations/RequestIntegrationBtn.tsx
@@ -0,0 +1,95 @@
+import './Integrations.styles.scss';
+
+import { LoadingOutlined } from '@ant-design/icons';
+import { Button, Input, Space, Typography } from 'antd';
+import logEvent from 'api/common/logEvent';
+import { useNotifications } from 'hooks/useNotifications';
+import { Check } from 'lucide-react';
+import { useState } from 'react';
+import { useTranslation } from 'react-i18next';
+
+export function RequestIntegrationBtn(): JSX.Element {
+ const [
+ isSubmittingRequestForIntegration,
+ setIsSubmittingRequestForIntegration,
+ ] = useState(false);
+
+ const [requestedIntegrationName, setRequestedIntegrationName] = useState('');
+
+ const { notifications } = useNotifications();
+ const { t } = useTranslation(['common']);
+
+ const handleRequestIntegrationSubmit = async (): Promise
=> {
+ try {
+ setIsSubmittingRequestForIntegration(true);
+ const response = await logEvent('Integration Requested', {
+ screen: 'Integration list page',
+ integration: requestedIntegrationName,
+ });
+
+ if (response.statusCode === 200) {
+ notifications.success({
+ message: 'Integration Request Submitted',
+ });
+
+ setIsSubmittingRequestForIntegration(false);
+ } else {
+ notifications.error({
+ message:
+ response.error ||
+ t('something_went_wrong', {
+ ns: 'common',
+ }),
+ });
+
+ setIsSubmittingRequestForIntegration(false);
+ }
+ } catch (error) {
+ notifications.error({
+ message: t('something_went_wrong', {
+ ns: 'common',
+ }),
+ });
+
+ setIsSubmittingRequestForIntegration(false);
+ }
+ };
+
+ return (
+
+
+ Cannot find what you’re looking for? Request more integrations
+
+
+
+
+ setRequestedIntegrationName(e.target.value)}
+ />
+
+ ) : (
+
+ )
+ }
+ type="primary"
+ onClick={handleRequestIntegrationSubmit}
+ disabled={
+ isSubmittingRequestForIntegration ||
+ !requestedIntegrationName ||
+ requestedIntegrationName?.trim().length === 0
+ }
+ >
+ Submit
+
+
+
+
+ );
+}