feat: aws integration feature flag changes (#7033)

* feat: aws integration feature flag changes

* fix: fix the failing build
This commit is contained in:
Shaheer Kochai 2025-02-06 13:56:10 +04:30 committed by GitHub
parent 94c2398a08
commit b215c6a0ce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 43 additions and 5 deletions

View File

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

View File

@ -23,4 +23,5 @@ 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

@ -4,8 +4,10 @@ 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';
@ -16,7 +18,13 @@ export const AWS_INTEGRATION = {
id: INTEGRATION_TYPES.AWS_INTEGRATION,
title: 'AWS Web Services',
description: 'One-click setup for AWS monitoring with SigNoz',
author: {
name: 'SigNoz',
email: 'integrations@signoz.io',
homepage: 'https://signoz.io',
},
icon: `Logos/aws-dark.svg`,
is_installed: false,
is_new: true,
};
@ -38,13 +46,20 @@ 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[] = [];
// Temporarily hide AWS Integration from the list, uncomment when the BE changes are finalized
// if (AWS_INTEGRATION.title.toLowerCase().includes(searchTerm.toLowerCase())) {
// integrationsList.push(AWS_INTEGRATION);
// }
if (
isAwsIntegrationEnabled &&
AWS_INTEGRATION.title.toLowerCase().includes(searchTerm.toLowerCase())
) {
integrationsList.push(AWS_INTEGRATION);
}
// Add other integrations
if (data?.data.data.integrations) {
@ -57,7 +72,7 @@ function IntegrationsList(props: IntegrationsListProps): JSX.Element {
}
return integrationsList;
}, [data?.data.data.integrations, searchTerm]);
}, [data?.data.data.integrations, isAwsIntegrationEnabled, searchTerm]);
const loading = isLoading || isFetching || isRefetching;

View File

@ -24,6 +24,7 @@ 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{