navigationConfiguration.tsx 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. import FeatureBadge from 'sentry/components/badge/featureBadge';
  2. import {t} from 'sentry/locale';
  3. import {hasDynamicSamplingCustomFeature} from 'sentry/utils/dynamicSampling/features';
  4. import type {NavigationSection} from 'sentry/views/settings/types';
  5. const organizationSettingsPathPrefix = '/settings/:orgId';
  6. const userSettingsPathPrefix = '/settings/account';
  7. const organizationNavigation: NavigationSection[] = [
  8. {
  9. name: t('User Settings'),
  10. items: [
  11. {
  12. path: `${userSettingsPathPrefix}/`,
  13. title: t('General Settings'),
  14. description: t('Configure general settings for your account'),
  15. id: 'user-settings',
  16. },
  17. ],
  18. },
  19. {
  20. name: t('Organization'),
  21. items: [
  22. {
  23. path: `${organizationSettingsPathPrefix}/`,
  24. title: t('General Settings'),
  25. index: true,
  26. description: t('Configure general settings for an organization'),
  27. id: 'general',
  28. },
  29. {
  30. path: `${organizationSettingsPathPrefix}/projects/`,
  31. title: t('Projects'),
  32. description: t("View and manage an organization's projects"),
  33. id: 'projects',
  34. },
  35. {
  36. path: `${organizationSettingsPathPrefix}/teams/`,
  37. title: t('Teams'),
  38. description: t("Manage an organization's teams"),
  39. id: 'teams',
  40. },
  41. {
  42. path: `${organizationSettingsPathPrefix}/members/`,
  43. title: t('Members'),
  44. description: t('Manage user membership for an organization'),
  45. id: 'members',
  46. },
  47. {
  48. path: `${organizationSettingsPathPrefix}/security-and-privacy/`,
  49. title: t('Security & Privacy'),
  50. description: t(
  51. 'Configuration related to dealing with sensitive data and other security settings. (Data Scrubbing, Data Privacy, Data Scrubbing)'
  52. ),
  53. id: 'security-and-privacy',
  54. },
  55. {
  56. path: `${organizationSettingsPathPrefix}/auth/`,
  57. title: t('Auth'),
  58. description: t('Configure single sign-on'),
  59. id: 'sso',
  60. },
  61. {
  62. path: `${organizationSettingsPathPrefix}/api-keys/`,
  63. title: t('API Keys'),
  64. show: ({access, features}) =>
  65. features!.has('api-keys') && access!.has('org:admin'),
  66. id: 'api-keys',
  67. },
  68. {
  69. path: `${organizationSettingsPathPrefix}/audit-log/`,
  70. title: t('Audit Log'),
  71. description: t('View the audit log for an organization'),
  72. id: 'audit-log',
  73. },
  74. {
  75. path: `${organizationSettingsPathPrefix}/rate-limits/`,
  76. title: t('Rate Limits'),
  77. show: ({features}) => features!.has('legacy-rate-limits'),
  78. description: t('Configure rate limits for all projects in the organization'),
  79. id: 'rate-limits',
  80. },
  81. {
  82. path: `${organizationSettingsPathPrefix}/relay/`,
  83. title: t('Relay'),
  84. description: t('Manage relays connected to the organization'),
  85. id: 'relay',
  86. },
  87. {
  88. path: `${organizationSettingsPathPrefix}/repos/`,
  89. title: t('Repositories'),
  90. description: t('Manage repositories connected to the organization'),
  91. id: 'repos',
  92. },
  93. {
  94. path: `${organizationSettingsPathPrefix}/integrations/`,
  95. title: t('Integrations'),
  96. description: t(
  97. 'Manage organization-level integrations, including: Slack, Github, Bitbucket, Jira, and Azure DevOps'
  98. ),
  99. id: 'integrations',
  100. recordAnalytics: true,
  101. },
  102. {
  103. path: `${organizationSettingsPathPrefix}/early-features/`,
  104. title: t('Early Features'),
  105. description: t('Manage early access features'),
  106. badge: () => <FeatureBadge type="new" />,
  107. show: ({isSelfHosted}) => isSelfHosted || false,
  108. id: 'early-features',
  109. recordAnalytics: true,
  110. },
  111. {
  112. path: `${organizationSettingsPathPrefix}/dynamic-sampling/`,
  113. title: t('Dynamic Sampling'),
  114. description: t('Manage your sampling rate'),
  115. badge: () => <FeatureBadge type="alpha" />,
  116. show: ({organization}) =>
  117. !!organization && hasDynamicSamplingCustomFeature(organization),
  118. },
  119. ],
  120. },
  121. {
  122. name: t('Developer Settings'),
  123. items: [
  124. {
  125. path: `${organizationSettingsPathPrefix}/auth-tokens/`,
  126. title: t('Auth Tokens'),
  127. description: t('Manage organization auth tokens'),
  128. id: 'auth-tokens',
  129. },
  130. {
  131. path: `${organizationSettingsPathPrefix}/developer-settings/`,
  132. title: t('Custom Integrations'),
  133. description: t('Manage custom integrations'),
  134. id: 'developer-settings',
  135. },
  136. ],
  137. },
  138. ];
  139. export default organizationNavigation;