Skip to content

Commit 4d73256

Browse files
Revert "feat(relay): Managed Relay for all (front-end) (#98688)"
This reverts commit a9454bc. Co-authored-by: tobias-wilfert <[email protected]>
1 parent a9454bc commit 4d73256

File tree

6 files changed

+124
-1
lines changed

6 files changed

+124
-1
lines changed

static/app/types/hooks.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,7 @@ export type FeatureDisabledHooks = {
268268
'feature-disabled:project-selector-all-projects': FeatureDisabledHook;
269269
'feature-disabled:project-selector-checkbox': FeatureDisabledHook;
270270
'feature-disabled:rate-limits': FeatureDisabledHook;
271+
'feature-disabled:relay': FeatureDisabledHook;
271272
'feature-disabled:replay-sidebar-item': FeatureDisabledHook;
272273
'feature-disabled:sso-basic': FeatureDisabledHook;
273274
'feature-disabled:sso-saml2': FeatureDisabledHook;
Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,34 @@
1+
import Feature from 'sentry/components/acl/feature';
2+
import FeatureDisabled from 'sentry/components/acl/featureDisabled';
3+
import Panel from 'sentry/components/panels/panel';
4+
import PanelBody from 'sentry/components/panels/panelBody';
5+
import {t} from 'sentry/locale';
6+
import useOrganization from 'sentry/utils/useOrganization';
7+
18
import {RelayWrapper} from './relayWrapper';
29

310
function OrganizationRelay() {
4-
return <RelayWrapper />;
11+
const organization = useOrganization();
12+
return (
13+
<Feature
14+
organization={organization}
15+
features="relay"
16+
hookName="feature-disabled:relay"
17+
renderDisabled={p => (
18+
<Panel>
19+
<PanelBody withPadding>
20+
<FeatureDisabled
21+
features={p.features}
22+
hideHelpToggle
23+
featureName={t('Relay')}
24+
/>
25+
</PanelBody>
26+
</Panel>
27+
)}
28+
>
29+
<RelayWrapper />
30+
</Feature>
31+
);
532
}
633

734
export default OrganizationRelay;
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
import styled from '@emotion/styled';
2+
3+
import {Button} from 'sentry/components/core/button';
4+
import EmptyMessage from 'sentry/components/emptyMessage';
5+
import Panel from 'sentry/components/panels/panel';
6+
import {IconBroadcast, IconBusiness} from 'sentry/icons';
7+
import {t, tct} from 'sentry/locale';
8+
import {space} from 'sentry/styles/space';
9+
import type {Organization} from 'sentry/types/organization';
10+
11+
import {openUpsellModal} from 'getsentry/actionCreators/modal';
12+
import LearnMoreButton from 'getsentry/components/features/learnMoreButton';
13+
import PlanFeature from 'getsentry/components/features/planFeature';
14+
import {displayPlanName} from 'getsentry/utils/billing';
15+
16+
type Props = {
17+
features: string[];
18+
organization: Organization;
19+
};
20+
21+
function DisabledRelay({organization, features}: Props) {
22+
return (
23+
<PlanFeature {...{organization, features}}>
24+
{({plan}) => (
25+
<Panel dashedBorder data-test-id="disabled-relay">
26+
<EmptyMessage
27+
size="large"
28+
icon={<IconBroadcast size="xl" />}
29+
title={t('Protect your private data and more by running a local Relay')}
30+
description={tct(
31+
'[strong: Sentry Relay] offers enterprise-grade data security by providing a standalone service that acts as a middle layer between your application and sentry.io. This feature [planRequirement] or above.',
32+
33+
{
34+
strong: <strong />,
35+
planRequirement: (
36+
<strong>{t('requires a %s Plan', displayPlanName(plan))}</strong>
37+
),
38+
}
39+
)}
40+
action={
41+
<ButtonBar>
42+
<StyledButton
43+
priority="primary"
44+
icon={<IconBusiness />}
45+
onClick={() => openUpsellModal({organization, source: 'feature.relay'})}
46+
>
47+
{t('Learn More')}
48+
</StyledButton>
49+
<StyledLearnMoreButton
50+
organization={organization}
51+
source="feature.relay"
52+
href="https://docs.sentry.io/product/relay/"
53+
external
54+
>
55+
{t('Documentation')}
56+
</StyledLearnMoreButton>
57+
</ButtonBar>
58+
}
59+
/>
60+
</Panel>
61+
)}
62+
</PlanFeature>
63+
);
64+
}
65+
66+
export default DisabledRelay;
67+
68+
const ButtonBar = styled('div')`
69+
display: flex;
70+
flex-wrap: wrap;
71+
justify-content: center;
72+
align-items: center;
73+
margin: -${space(0.75)};
74+
`;
75+
76+
const StyledButton = styled(Button)`
77+
margin: ${space(0.75)};
78+
`;
79+
80+
const StyledLearnMoreButton = styled(LearnMoreButton)`
81+
margin: ${space(0.75)};
82+
`;

static/gsApp/components/labelWithPowerIcon.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import type {Subscription} from 'getsentry/types';
1111
import {isEnterprise} from 'getsentry/utils/billing';
1212

1313
const SSO = 'sso';
14+
const RELAY = 'relay';
1415
const ALLOCATIONS = 'allocations-upsell';
1516
const TEAM_ROLES = 'team-roles-upsell';
1617

@@ -36,6 +37,11 @@ const POWER_FEATURE_CONFIG = [
3637
features: ['sso-saml2'],
3738
partial: true,
3839
},
40+
{
41+
id: RELAY,
42+
features: ['relay'],
43+
partial: false,
44+
},
3945
{
4046
id: ALLOCATIONS,
4147
features: ['spend-allocations'],

static/gsApp/registerHooks.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import DisabledDataForwarding from 'getsentry/components/features/disabledDataFo
1919
import DisabledDateRange from 'getsentry/components/features/disabledDateRange';
2020
import DisabledDiscardGroup from 'getsentry/components/features/disabledDiscardGroup';
2121
import DisabledRateLimits from 'getsentry/components/features/disabledRateLimits';
22+
import DisabledRelay from 'getsentry/components/features/disabledRelay';
2223
import DisabledSelectorItems from 'getsentry/components/features/disabledSelectorItems';
2324
import ExploreDateRangeQueryLimitFooter from 'getsentry/components/features/exploreDateRangeQueryLimitFooter';
2425
import InsightsDateRangeQueryLimitFooter from 'getsentry/components/features/insightsDateRangeQueryLimitFooter';
@@ -254,6 +255,7 @@ const GETSENTRY_HOOKS: Partial<Hooks> = {
254255

255256
'feature-disabled:discard-groups': p => <DisabledDiscardGroup {...p} />,
256257
'feature-disabled:data-forwarding': p => <DisabledDataForwarding {...p} />,
258+
'feature-disabled:relay': p => <DisabledRelay {...p} />,
257259
'feature-disabled:rate-limits': p => <DisabledRateLimits {...p} />,
258260
'feature-disabled:sso-basic': p => <DisabledAuthProvider {...p} />,
259261
'feature-disabled:sso-saml2': p => <DisabledAuthProvider {...p} />,

tests/js/getsentry-test/fixtures/featureList.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ export function FeatureListFixture(): Record<string, Feature> {
9292
description:
9393
'Configure custom Symbol Servers, Amazon S3 buckets, or GCS buckets for debug files.',
9494
},
95+
relay: {
96+
name: 'Relay',
97+
description:
98+
'Use Relay as middle layer for on premise data scrubbing before sending data to Sentry.',
99+
},
95100
'app-store-connect-multiple': {
96101
name: 'Multiple App Store Connect apps',
97102
description: 'Add multiple Apple App Store Connect apps per project',

0 commit comments

Comments
 (0)