mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 18:29:00 +08:00
feat: aws integration feature flag changes (#7033)
* feat: aws integration feature flag changes * fix: fix the failing build
This commit is contained in:
parent
94c2398a08
commit
b215c6a0ce
@ -157,6 +157,13 @@ var BasicPlan = basemodel.FeatureSet{
|
|||||||
UsageLimit: -1,
|
UsageLimit: -1,
|
||||||
Route: "",
|
Route: "",
|
||||||
},
|
},
|
||||||
|
basemodel.Feature{
|
||||||
|
Name: basemodel.AWSIntegration,
|
||||||
|
Active: false,
|
||||||
|
Usage: 0,
|
||||||
|
UsageLimit: -1,
|
||||||
|
Route: "",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
var ProPlan = basemodel.FeatureSet{
|
var ProPlan = basemodel.FeatureSet{
|
||||||
@ -279,6 +286,13 @@ var ProPlan = basemodel.FeatureSet{
|
|||||||
UsageLimit: -1,
|
UsageLimit: -1,
|
||||||
Route: "",
|
Route: "",
|
||||||
},
|
},
|
||||||
|
basemodel.Feature{
|
||||||
|
Name: basemodel.AWSIntegration,
|
||||||
|
Active: false,
|
||||||
|
Usage: 0,
|
||||||
|
UsageLimit: -1,
|
||||||
|
Route: "",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
var EnterprisePlan = basemodel.FeatureSet{
|
var EnterprisePlan = basemodel.FeatureSet{
|
||||||
@ -415,4 +429,11 @@ var EnterprisePlan = basemodel.FeatureSet{
|
|||||||
UsageLimit: -1,
|
UsageLimit: -1,
|
||||||
Route: "",
|
Route: "",
|
||||||
},
|
},
|
||||||
|
basemodel.Feature{
|
||||||
|
Name: basemodel.AWSIntegration,
|
||||||
|
Active: false,
|
||||||
|
Usage: 0,
|
||||||
|
UsageLimit: -1,
|
||||||
|
Route: "",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
@ -23,4 +23,5 @@ export enum FeatureKeys {
|
|||||||
PREMIUM_SUPPORT = 'PREMIUM_SUPPORT',
|
PREMIUM_SUPPORT = 'PREMIUM_SUPPORT',
|
||||||
QUERY_BUILDER_SEARCH_V2 = 'QUERY_BUILDER_SEARCH_V2',
|
QUERY_BUILDER_SEARCH_V2 = 'QUERY_BUILDER_SEARCH_V2',
|
||||||
ANOMALY_DETECTION = 'ANOMALY_DETECTION',
|
ANOMALY_DETECTION = 'ANOMALY_DETECTION',
|
||||||
|
AWS_INTEGRATION = 'AWS_INTEGRATION',
|
||||||
}
|
}
|
||||||
|
@ -4,8 +4,10 @@ import './Integrations.styles.scss';
|
|||||||
|
|
||||||
import { Color } from '@signozhq/design-tokens';
|
import { Color } from '@signozhq/design-tokens';
|
||||||
import { Button, List, Typography } from 'antd';
|
import { Button, List, Typography } from 'antd';
|
||||||
|
import { FeatureKeys } from 'constants/features';
|
||||||
import { useGetAllIntegrations } from 'hooks/Integrations/useGetAllIntegrations';
|
import { useGetAllIntegrations } from 'hooks/Integrations/useGetAllIntegrations';
|
||||||
import { MoveUpRight, RotateCw } from 'lucide-react';
|
import { MoveUpRight, RotateCw } from 'lucide-react';
|
||||||
|
import { useAppContext } from 'providers/App/App';
|
||||||
import { Dispatch, SetStateAction, useMemo } from 'react';
|
import { Dispatch, SetStateAction, useMemo } from 'react';
|
||||||
import { IntegrationsProps } from 'types/api/integrations/types';
|
import { IntegrationsProps } from 'types/api/integrations/types';
|
||||||
import { isCloudUser } from 'utils/app';
|
import { isCloudUser } from 'utils/app';
|
||||||
@ -16,7 +18,13 @@ export const AWS_INTEGRATION = {
|
|||||||
id: INTEGRATION_TYPES.AWS_INTEGRATION,
|
id: INTEGRATION_TYPES.AWS_INTEGRATION,
|
||||||
title: 'AWS Web Services',
|
title: 'AWS Web Services',
|
||||||
description: 'One-click setup for AWS monitoring with SigNoz',
|
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`,
|
icon: `Logos/aws-dark.svg`,
|
||||||
|
is_installed: false,
|
||||||
is_new: true,
|
is_new: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -38,13 +46,20 @@ function IntegrationsList(props: IntegrationsListProps): JSX.Element {
|
|||||||
refetch,
|
refetch,
|
||||||
} = useGetAllIntegrations();
|
} = useGetAllIntegrations();
|
||||||
|
|
||||||
|
const { featureFlags } = useAppContext();
|
||||||
|
const isAwsIntegrationEnabled =
|
||||||
|
featureFlags?.find((flag) => flag.name === FeatureKeys.AWS_INTEGRATION)
|
||||||
|
?.active || false;
|
||||||
|
|
||||||
const filteredDataList = useMemo(() => {
|
const filteredDataList = useMemo(() => {
|
||||||
let integrationsList: IntegrationsProps[] = [];
|
let integrationsList: IntegrationsProps[] = [];
|
||||||
|
|
||||||
// Temporarily hide AWS Integration from the list, uncomment when the BE changes are finalized
|
if (
|
||||||
// if (AWS_INTEGRATION.title.toLowerCase().includes(searchTerm.toLowerCase())) {
|
isAwsIntegrationEnabled &&
|
||||||
// integrationsList.push(AWS_INTEGRATION);
|
AWS_INTEGRATION.title.toLowerCase().includes(searchTerm.toLowerCase())
|
||||||
// }
|
) {
|
||||||
|
integrationsList.push(AWS_INTEGRATION);
|
||||||
|
}
|
||||||
|
|
||||||
// Add other integrations
|
// Add other integrations
|
||||||
if (data?.data.data.integrations) {
|
if (data?.data.data.integrations) {
|
||||||
@ -57,7 +72,7 @@ function IntegrationsList(props: IntegrationsListProps): JSX.Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return integrationsList;
|
return integrationsList;
|
||||||
}, [data?.data.data.integrations, searchTerm]);
|
}, [data?.data.data.integrations, isAwsIntegrationEnabled, searchTerm]);
|
||||||
|
|
||||||
const loading = isLoading || isFetching || isRefetching;
|
const loading = isLoading || isFetching || isRefetching;
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ const AlertChannelOpsgenie = "ALERT_CHANNEL_OPSGENIE"
|
|||||||
const AlertChannelEmail = "ALERT_CHANNEL_EMAIL"
|
const AlertChannelEmail = "ALERT_CHANNEL_EMAIL"
|
||||||
const AnomalyDetection = "ANOMALY_DETECTION"
|
const AnomalyDetection = "ANOMALY_DETECTION"
|
||||||
const HostsInfraMonitoring = "HOSTS_INFRA_MONITORING"
|
const HostsInfraMonitoring = "HOSTS_INFRA_MONITORING"
|
||||||
|
const AWSIntegration = "AWS_INTEGRATION"
|
||||||
|
|
||||||
var BasicPlan = FeatureSet{
|
var BasicPlan = FeatureSet{
|
||||||
Feature{
|
Feature{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user