chore: enable AWS integrations for all (#7111)

* chore: enable AWS integrations for all

* chore: don't show either of configure/enable for a service when not in ctx of a cloud account

* chore: remove AWS integration feature flag
This commit is contained in:
Raj Kamal Singh 2025-02-14 18:49:52 +05:30 committed by GitHub
parent 52f41e0064
commit 966f11fd5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 19 additions and 51 deletions

View File

@ -157,13 +157,6 @@ var BasicPlan = basemodel.FeatureSet{
UsageLimit: -1,
Route: "",
},
basemodel.Feature{
Name: basemodel.AWSIntegration,
Active: false,
Usage: 0,
UsageLimit: -1,
Route: "",
},
}
var ProPlan = basemodel.FeatureSet{
@ -286,13 +279,6 @@ var ProPlan = basemodel.FeatureSet{
UsageLimit: -1,
Route: "",
},
basemodel.Feature{
Name: basemodel.AWSIntegration,
Active: false,
Usage: 0,
UsageLimit: -1,
Route: "",
},
}
var EnterprisePlan = basemodel.FeatureSet{
@ -429,11 +415,4 @@ var EnterprisePlan = basemodel.FeatureSet{
UsageLimit: -1,
Route: "",
},
basemodel.Feature{
Name: basemodel.AWSIntegration,
Active: false,
Usage: 0,
UsageLimit: -1,
Route: "",
},
}

View File

@ -23,5 +23,4 @@ export enum FeatureKeys {
PREMIUM_SUPPORT = 'PREMIUM_SUPPORT',
QUERY_BUILDER_SEARCH_V2 = 'QUERY_BUILDER_SEARCH_V2',
ANOMALY_DETECTION = 'ANOMALY_DETECTION',
AWS_INTEGRATION = 'AWS_INTEGRATION',
}

View File

@ -115,22 +115,23 @@ function ServiceDetails(): JSX.Element | null {
<ServiceStatus serviceStatus={serviceDetailsData.status} />
)}
{!!cloudAccountId && isAnySignalConfigured ? (
<Button
className="configure-button configure-button--default"
onClick={(): void => setIsConfigureServiceModalOpen(true)}
>
Configure ({enabledSignals}/{totalSupportedSignals})
</Button>
) : (
<Button
type="primary"
className="configure-button configure-button--primary"
onClick={(): void => setIsConfigureServiceModalOpen(true)}
>
Enable Service
</Button>
)}
{!!cloudAccountId &&
(isAnySignalConfigured ? (
<Button
className="configure-button configure-button--default"
onClick={(): void => setIsConfigureServiceModalOpen(true)}
>
Configure ({enabledSignals}/{totalSupportedSignals})
</Button>
) : (
<Button
type="primary"
className="configure-button configure-button--primary"
onClick={(): void => setIsConfigureServiceModalOpen(true)}
>
Enable Service
</Button>
))}
</div>
</div>
<div className="service-details__overview">

View File

@ -4,10 +4,8 @@ import './Integrations.styles.scss';
import { Color } from '@signozhq/design-tokens';
import { Button, List, Typography } from 'antd';
import { FeatureKeys } from 'constants/features';
import { useGetAllIntegrations } from 'hooks/Integrations/useGetAllIntegrations';
import { MoveUpRight, RotateCw } from 'lucide-react';
import { useAppContext } from 'providers/App/App';
import { Dispatch, SetStateAction, useMemo } from 'react';
import { IntegrationsProps } from 'types/api/integrations/types';
import { isCloudUser } from 'utils/app';
@ -46,18 +44,10 @@ function IntegrationsList(props: IntegrationsListProps): JSX.Element {
refetch,
} = useGetAllIntegrations();
const { featureFlags } = useAppContext();
const isAwsIntegrationEnabled =
featureFlags?.find((flag) => flag.name === FeatureKeys.AWS_INTEGRATION)
?.active || false;
const filteredDataList = useMemo(() => {
let integrationsList: IntegrationsProps[] = [];
if (
isAwsIntegrationEnabled &&
AWS_INTEGRATION.title.toLowerCase().includes(searchTerm.toLowerCase())
) {
if (AWS_INTEGRATION.title.toLowerCase().includes(searchTerm.toLowerCase())) {
integrationsList.push(AWS_INTEGRATION);
}
@ -72,7 +62,7 @@ function IntegrationsList(props: IntegrationsListProps): JSX.Element {
}
return integrationsList;
}, [data?.data.data.integrations, isAwsIntegrationEnabled, searchTerm]);
}, [data?.data.data.integrations, searchTerm]);
const loading = isLoading || isFetching || isRefetching;

View File

@ -24,7 +24,6 @@ const AlertChannelOpsgenie = "ALERT_CHANNEL_OPSGENIE"
const AlertChannelEmail = "ALERT_CHANNEL_EMAIL"
const AnomalyDetection = "ANOMALY_DETECTION"
const HostsInfraMonitoring = "HOSTS_INFRA_MONITORING"
const AWSIntegration = "AWS_INTEGRATION"
var BasicPlan = FeatureSet{
Feature{