organizationGeneralSettings.tsx 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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: 'uptimeAutodetection',
  46. type: 'boolean',
  47. label: t('Automatically Configure Uptime Alerts'),
  48. help: t('Detect most-used URLs for uptime monitoring.'),
  49. // TOOD(epurkhiser): Currently there's no need for users to change this
  50. // setting as it will just be confusing. In the future when
  51. // autodetection is used for suggested URLs it will make more sense to
  52. // for users to have the option to disable this.
  53. visible: false,
  54. },
  55. ],
  56. },
  57. ];
  58. export default formGroups;