Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

feat: remove search input and add view data sources button in integrations header (#10123)

Vishal Sharmae7c812e07fe0
diff --git a/frontend/src/pages/Integrations/Header.tsx b/frontend/src/pages/Integrations/Header.tsx
index bd85db6659..07454708e7 100644
--- a/frontend/src/pages/Integrations/Header.tsx
+++ b/frontend/src/pages/Integrations/Header.tsx
@@ -1,37 +1,42 @@
import './Integrations.styles.scss';
-import { Color } from '@signozhq/design-tokens';
-import { Flex, Input, Typography } from 'antd';
-import { Search } from 'lucide-react';
-import { Dispatch, SetStateAction } from 'react';
+import { Button, Flex, Typography } from 'antd';
+import ROUTES from 'constants/routes';
+import { ArrowRight } from 'lucide-react';
+import { useAppContext } from 'providers/App/App';
+import { useHistory } from 'react-router-dom';
+import { routePermission } from 'utils/permission';
-interface HeaderProps {
- searchTerm: string;
- setSearchTerm: Dispatch<SetStateAction<string>>;
-}
+function Header(): JSX.Element {
+ const history = useHistory();
+ const { user } = useAppContext();
-function Header(props: HeaderProps): JSX.Element {
- const { searchTerm, setSearchTerm } = props;
+ const isGetStartedWithCloudAllowed = routePermission.GET_STARTED_WITH_CLOUD.includes(
+ user.role,
+ );
- const handleSearch = (e: React.ChangeEvent<HTMLInputElement>): void => {
- setSearchTerm(e.target.value);
- };
return (
<div className="integrations-header">
<Typography.Title className="title">Integrations</Typography.Title>
- <Flex justify="space-between" align="center">
+ <Flex
+ justify="space-between"
+ align="center"
+ className="integrations-header__subrow"
+ >
<Typography.Text className="subtitle">
- Manage Integrations for this workspace
+ Manage a curated list of one-click workspace integrations.
</Typography.Text>
+ {isGetStartedWithCloudAllowed && (
+ <Button
+ className="periscope-btn primary view-data-sources-btn"
+ type="primary"
+ onClick={(): void => history.push(ROUTES.GET_STARTED_WITH_CLOUD)}
+ >
+ <span>View 150+ Data Sources</span>
+ <ArrowRight size={14} />
+ </Button>
+ )}
</Flex>
-
- <Input
- placeholder="Search for an integration..."
- prefix={<Search size={12} color={Color.BG_VANILLA_400} />}
- value={searchTerm}
- onChange={handleSearch}
- className="integrations-search-input"
- />
</div>
);
}
diff --git a/frontend/src/pages/Integrations/Integrations.styles.scss b/frontend/src/pages/Integrations/Integrations.styles.scss
index 8aa15107d8..3eec7ff5cc 100644
--- a/frontend/src/pages/Integrations/Integrations.styles.scss
+++ b/frontend/src/pages/Integrations/Integrations.styles.scss
@@ -9,6 +9,15 @@
max-width: 920px;
.integrations-header {
+ .integrations-header__subrow {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ gap: 16px;
+ flex-wrap: wrap;
+ margin-top: 4px;
+ }
+
.title {
color: var(--bg-vanilla-100);
font-size: var(--font-size-lg);
@@ -16,6 +25,7 @@
line-height: 28px; /* 155.556% */
letter-spacing: -0.09px;
font-weight: 500;
+ margin: 0;
}
.subtitle {
@@ -25,17 +35,16 @@
line-height: 20px; /* 142.857% */
letter-spacing: -0.07px;
font-weight: 400;
+ display: block;
}
- .integrations-search-input {
- margin-top: 1rem;
- border-radius: 2px;
- border: 1px solid var(--bg-slate-400);
- background: var(--bg-ink-300);
-
- .ant-input {
- background-color: unset;
- }
+ .view-data-sources-btn {
+ gap: 8px;
+ padding: 6px 14px;
+ height: 32px;
+ font-size: 12px;
+ font-weight: 500;
+ white-space: nowrap;
}
}
@@ -206,10 +215,6 @@
.subtitle {
color: var(--bg-slate-200);
}
- .integrations-search-input {
- border: 1px solid rgba(53, 59, 76, 0.2);
- background: var(--bg-vanilla-100);
- }
}
.integrations-list {
diff --git a/frontend/src/pages/Integrations/Integrations.tsx b/frontend/src/pages/Integrations/Integrations.tsx
index d8bd318ae5..48e379c5d6 100644
--- a/frontend/src/pages/Integrations/Integrations.tsx
+++ b/frontend/src/pages/Integrations/Integrations.tsx
@@ -8,7 +8,6 @@ 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 {
@@ -45,7 +44,6 @@ function Integrations(): JSX.Element {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
- const [searchTerm, setSearchTerm] = useState<string>('');
return (
<div className="integrations-container">
<div className="integrations-content">
@@ -58,13 +56,11 @@ function Integrations(): JSX.Element {
/>
) : (
<>
- <Header setSearchTerm={setSearchTerm} searchTerm={searchTerm} />
+ <Header />
<IntegrationsList
setSelectedIntegration={setSelectedIntegration}
- searchTerm={searchTerm}
setActiveDetailTab={setActiveDetailTab}
/>
- <RequestIntegrationBtn />
</>
)}
</div>
diff --git a/frontend/src/pages/Integrations/IntegrationsList.tsx b/frontend/src/pages/Integrations/IntegrationsList.tsx
index 56d52c7d30..0fa7732006 100644
--- a/frontend/src/pages/Integrations/IntegrationsList.tsx
+++ b/frontend/src/pages/Integrations/IntegrationsList.tsx
@@ -29,11 +29,10 @@ export const AWS_INTEGRATION = {
interface IntegrationsListProps {
setSelectedIntegration: (id: string) => void;
setActiveDetailTab: Dispatch<SetStateAction<string | null>>;
- searchTerm: string;
}
function IntegrationsList(props: IntegrationsListProps): JSX.Element {
- const { setSelectedIntegration, searchTerm, setActiveDetailTab } = props;
+ const { setSelectedIntegration, setActiveDetailTab } = props;
const {
data,
@@ -46,25 +45,15 @@ function IntegrationsList(props: IntegrationsListProps): JSX.Element {
const { isCloudUser: isCloudUserVal } = useGetTenantLicense();
- const filteredDataList = useMemo(() => {
- let integrationsList: IntegrationsProps[] = [];
+ const integrationsList = useMemo(() => {
+ const baseList: IntegrationsProps[] = [AWS_INTEGRATION];
- if (AWS_INTEGRATION.title.toLowerCase().includes(searchTerm.toLowerCase())) {
- integrationsList.push(AWS_INTEGRATION);
- }
-
- // Add other integrations
if (data?.data.data.integrations) {
- integrationsList = [
- ...integrationsList,
- ...data.data.data.integrations.filter((item) =>
- item.title.toLowerCase().includes(searchTerm.toLowerCase()),
- ),
- ];
+ baseList.push(...data.data.data.integrations);
}
- return integrationsList;
- }, [data?.data.data.integrations, searchTerm]);
+ return baseList;
+ }, [data?.data.data.integrations]);
const loading = isLoading || isFetching || isRefetching;
@@ -104,7 +93,7 @@ function IntegrationsList(props: IntegrationsListProps): JSX.Element {
)}
{!isError && (
<List
- dataSource={filteredDataList}
+ dataSource={integrationsList}
loading={loading}
itemLayout="horizontal"
renderItem={(item): JSX.Element => (