organizationGeneralSettings.tsx 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import type {JsonFormObject} from 'sentry/components/forms/types';
  2. import ExternalLink from 'sentry/components/links/externalLink';
  3. import {t, tct} from 'sentry/locale';
  4. import ConfigStore from 'sentry/stores/configStore';
  5. import slugify from 'sentry/utils/slugify';
  6. // Export route to make these forms searchable by label/help
  7. export const route = '/settings/:orgId/';
  8. const formGroups: JsonFormObject[] = [
  9. {
  10. // Form "section"/"panel"
  11. title: t('General'),
  12. fields: [
  13. {
  14. name: 'slug',
  15. type: 'string',
  16. required: true,
  17. label: t('Organization Slug'),
  18. help: t('A unique ID used to identify this organization'),
  19. transformInput: slugify,
  20. saveOnBlur: false,
  21. saveMessageAlertType: 'info',
  22. saveMessage: t(
  23. 'You will be redirected to the new organization slug after saving'
  24. ),
  25. },
  26. {
  27. name: 'name',
  28. type: 'string',
  29. required: true,
  30. label: t('Display Name'),
  31. help: t('A human-friendly name for the organization'),
  32. },
  33. {
  34. name: 'isEarlyAdopter',
  35. type: 'boolean',
  36. label: t('Early Adopter'),
  37. help: tct("Opt-in to [link:new features] before they're released to the public", {
  38. link: (
  39. <ExternalLink href="https://docs.sentry.io/product/accounts/early-adopter/" />
  40. ),
  41. }),
  42. visible: () => !ConfigStore.get('isSelfHostedErrorsOnly'),
  43. },
  44. {
  45. name: 'aiSuggestedSolution',
  46. type: 'boolean',
  47. label: t('AI Suggested Solution'),
  48. help: tct(
  49. 'Opt-in to [link:ai suggested solution] to get AI help on how to solve an issue.',
  50. {
  51. link: (
  52. <ExternalLink href="https://docs.sentry.io/product/issues/issue-details/ai-suggested-solution/" />
  53. ),
  54. }
  55. ),
  56. visible: ({features}) =>
  57. !ConfigStore.get('isSelfHostedErrorsOnly') && !features.has('autofix'),
  58. },
  59. {
  60. name: 'uptimeAutodetection',
  61. type: 'boolean',
  62. label: t('Automatically Configure Uptime Alerts'),
  63. help: t('Detect most-used URLs for uptime monitoring.'),
  64. // TOOD(epurkhiser): Currently there's no need for users to change this
  65. // setting as it will just be confusing. In the future when
  66. // autodetection is used for suggested URLs it will make more sense to
  67. // for users to have the option to disable this.
  68. visible: false,
  69. },
  70. ],
  71. },
  72. ];
  73. export default formGroups;