chore(analytics): remove tinybird (#11146)
Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -15,10 +15,6 @@ import {
|
||||
useIcons,
|
||||
} from 'twenty-ui';
|
||||
|
||||
import { AnalyticsActivityGraph } from '@/analytics/components/AnalyticsActivityGraph';
|
||||
import { AnalyticsGraphEffect } from '@/analytics/components/AnalyticsGraphEffect';
|
||||
import { AnalyticsGraphDataInstanceContext } from '@/analytics/states/contexts/AnalyticsGraphDataInstanceContext';
|
||||
import { isAnalyticsEnabledState } from '@/client-config/states/isAnalyticsEnabledState';
|
||||
import { useObjectMetadataItems } from '@/object-metadata/hooks/useObjectMetadataItems';
|
||||
import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';
|
||||
import { useWebhookUpdateForm } from '@/settings/developers/hooks/useWebhookUpdateForm';
|
||||
@ -28,10 +24,7 @@ import { TextArea } from '@/ui/input/components/TextArea';
|
||||
import { TextInput } from '@/ui/input/components/TextInput';
|
||||
import { ConfirmationModal } from '@/ui/layout/modal/components/ConfirmationModal';
|
||||
import { SubMenuTopBarContainer } from '@/ui/layout/page/components/SubMenuTopBarContainer';
|
||||
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
|
||||
import { Trans, useLingui } from '@lingui/react/macro';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
import { FeatureFlagKey } from '~/generated/graphql';
|
||||
import { getSettingsPath } from '~/utils/navigation/getSettingsPath';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
|
||||
@ -61,8 +54,6 @@ export const SettingsDevelopersWebhooksDetail = () => {
|
||||
|
||||
const { objectMetadataItems } = useObjectMetadataItems();
|
||||
|
||||
const isAnalyticsEnabled = useRecoilValue(isAnalyticsEnabledState);
|
||||
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
const { getIcon } = useIcons();
|
||||
@ -90,10 +81,6 @@ export const SettingsDevelopersWebhooksDetail = () => {
|
||||
const [isDeleteWebhookModalOpen, setIsDeleteWebhookModalOpen] =
|
||||
useState(false);
|
||||
|
||||
const isAnalyticsV2Enabled = useIsFeatureEnabled(
|
||||
FeatureFlagKey.IsAnalyticsV2Enabled,
|
||||
);
|
||||
|
||||
const fieldTypeOptions: SelectOption<string>[] = useMemo(
|
||||
() => [
|
||||
{ value: '*', label: t`All Objects`, Icon: IconNorthStar },
|
||||
@ -223,20 +210,6 @@ export const SettingsDevelopersWebhooksDetail = () => {
|
||||
fullWidth
|
||||
/>
|
||||
</Section>
|
||||
{!isCreationMode && isAnalyticsEnabled && isAnalyticsV2Enabled && (
|
||||
<AnalyticsGraphDataInstanceContext.Provider
|
||||
value={{ instanceId: `webhook-${webhookId}-analytics` }}
|
||||
>
|
||||
<AnalyticsGraphEffect
|
||||
recordId={webhookId}
|
||||
endpointName="getWebhookAnalytics"
|
||||
/>
|
||||
<AnalyticsActivityGraph
|
||||
recordId={webhookId}
|
||||
endpointName="getWebhookAnalytics"
|
||||
/>
|
||||
</AnalyticsGraphDataInstanceContext.Provider>
|
||||
)}
|
||||
<Section>
|
||||
<H2Title
|
||||
title={t`Danger zone`}
|
||||
|
||||
@ -1,8 +1,6 @@
|
||||
import { isAnalyticsEnabledState } from '@/client-config/states/isAnalyticsEnabledState';
|
||||
import { useTestServerlessFunction } from '@/serverless-functions/hooks/useTestServerlessFunction';
|
||||
import { SettingsPageContainer } from '@/settings/components/SettingsPageContainer';
|
||||
import { SettingsServerlessFunctionCodeEditorTab } from '@/settings/serverless-functions/components/tabs/SettingsServerlessFunctionCodeEditorTab';
|
||||
import { SettingsServerlessFunctionMonitoringTab } from '@/settings/serverless-functions/components/tabs/SettingsServerlessFunctionMonitoringTab';
|
||||
import { SettingsServerlessFunctionSettingsTab } from '@/settings/serverless-functions/components/tabs/SettingsServerlessFunctionSettingsTab';
|
||||
import { SettingsServerlessFunctionTestTab } from '@/settings/serverless-functions/components/tabs/SettingsServerlessFunctionTestTab';
|
||||
import { useGetOneServerlessFunctionSourceCode } from '@/settings/serverless-functions/hooks/useGetOneServerlessFunctionSourceCode';
|
||||
@ -16,13 +14,10 @@ import { SubMenuTopBarContainer } from '@/ui/layout/page/components/SubMenuTopBa
|
||||
import { TabList } from '@/ui/layout/tab/components/TabList';
|
||||
import { activeTabIdComponentState } from '@/ui/layout/tab/states/activeTabIdComponentState';
|
||||
import { useRecoilComponentStateV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentStateV2';
|
||||
import { useIsFeatureEnabled } from '@/workspace/hooks/useIsFeatureEnabled';
|
||||
import { useState } from 'react';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { useRecoilValue } from 'recoil';
|
||||
import { IconCode, IconGauge, IconSettings, IconTestPipe } from 'twenty-ui';
|
||||
import { IconCode, IconSettings, IconTestPipe } from 'twenty-ui';
|
||||
import { useDebouncedCallback } from 'use-debounce';
|
||||
import { FeatureFlagKey } from '~/generated/graphql';
|
||||
import { isDeeplyEqual } from '~/utils/isDeeplyEqual';
|
||||
import { getSettingsPath } from '~/utils/navigation/getSettingsPath';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
@ -126,19 +121,10 @@ export const SettingsServerlessFunctionDetail = () => {
|
||||
setActiveTabId('test');
|
||||
};
|
||||
|
||||
const isAnalyticsEnabled = useRecoilValue(isAnalyticsEnabledState);
|
||||
|
||||
const isAnalyticsV2Enabled = useIsFeatureEnabled(
|
||||
FeatureFlagKey.IsAnalyticsV2Enabled,
|
||||
);
|
||||
|
||||
const tabs = [
|
||||
{ id: 'editor', title: 'Editor', Icon: IconCode },
|
||||
{ id: 'test', title: 'Test', Icon: IconTestPipe },
|
||||
{ id: 'settings', title: 'Settings', Icon: IconSettings },
|
||||
...(isAnalyticsEnabled && isAnalyticsV2Enabled
|
||||
? [{ id: 'monitoring', title: 'Monitoring', Icon: IconGauge }]
|
||||
: []),
|
||||
];
|
||||
|
||||
const files = formValues.code
|
||||
@ -184,12 +170,6 @@ export const SettingsServerlessFunctionDetail = () => {
|
||||
onCodeChange={onCodeChange}
|
||||
/>
|
||||
);
|
||||
case 'monitoring':
|
||||
return (
|
||||
<SettingsServerlessFunctionMonitoringTab
|
||||
serverlessFunctionId={serverlessFunctionId}
|
||||
/>
|
||||
);
|
||||
default:
|
||||
return <></>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user