disabledCustomSymbolSources.tsx 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. import styled from '@emotion/styled';
  2. import {Button, ButtonLabel} from 'sentry/components/button';
  3. import ButtonBar from 'sentry/components/buttonBar';
  4. import EmptyMessage from 'sentry/components/emptyMessage';
  5. import {IconBusiness, IconLock} from 'sentry/icons';
  6. import {t, tct} from 'sentry/locale';
  7. import {space} from 'sentry/styles/space';
  8. import type {Organization} from 'sentry/types/organization';
  9. import {openUpsellModal} from 'getsentry/actionCreators/modal';
  10. import LearnMoreButton from 'getsentry/components/features/learnMoreButton';
  11. import PlanFeature from 'getsentry/components/features/planFeature';
  12. import {displayPlanName} from 'getsentry/utils/billing';
  13. const FEATURE = 'custom-symbol-sources';
  14. type Props = {
  15. organization: Organization;
  16. };
  17. function DisabledCustomSymbolSources({organization}: Props) {
  18. return (
  19. <Content
  20. data-test-id={`disabled-${FEATURE}`}
  21. size="large"
  22. icon={<IconLock size="xl" />}
  23. title={tct('Configuring custom repositories [requiredPlan]', {
  24. requiredPlan: (
  25. <PlanFeature organization={organization} features={[FEATURE]}>
  26. {({plan}) =>
  27. tct('requires a [planName] Plan or above.', {
  28. planName: displayPlanName(plan),
  29. })
  30. }
  31. </PlanFeature>
  32. ),
  33. })}
  34. description={tct(
  35. '[strong: Sentry] can download debug information files from custom repositories. This allows you to stop uploading debug files and instead configure an HTTP symbol server, Amazon S3 bucket, Google Cloud Storage bucket or an App Store Connect.',
  36. {
  37. strong: <strong />,
  38. }
  39. )}
  40. action={
  41. <ButtonBar gap={0.75}>
  42. <StyledButton
  43. priority="primary"
  44. icon={<IconBusiness />}
  45. onClick={() =>
  46. openUpsellModal({
  47. organization,
  48. source: `feature.${FEATURE}`,
  49. })
  50. }
  51. >
  52. {t('Learn More')}
  53. </StyledButton>
  54. <StyledLearnMoreButton
  55. organization={organization}
  56. source={`feature.${FEATURE}`}
  57. href="https://docs.sentry.io/platforms/native/data-management/debug-files/symbol-servers/"
  58. external
  59. >
  60. {t('Documentation')}
  61. </StyledLearnMoreButton>
  62. </ButtonBar>
  63. }
  64. />
  65. );
  66. }
  67. export default DisabledCustomSymbolSources;
  68. const Content = styled(EmptyMessage)`
  69. padding: 0;
  70. `;
  71. const StyledButton = styled(Button)`
  72. margin: ${space(0.75)};
  73. ${ButtonLabel} {
  74. white-space: nowrap;
  75. }
  76. `;
  77. const StyledLearnMoreButton = styled(LearnMoreButton)`
  78. margin: ${space(0.75)};
  79. `;