accountNotificationSettings.tsx 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. import {t} from 'app/locale';
  2. import {Field, JsonFormObject} from 'app/views/settings/components/forms/type';
  3. // TODO: cleanup unused fields and exports
  4. // Export route to make these forms searchable by label/help
  5. export const route = '/settings/account/notifications/';
  6. export const fields: {[key: string]: Field} = {
  7. subscribeByDefault: {
  8. name: 'subscribeByDefault',
  9. type: 'boolean',
  10. label: t('Send Me Alerts'),
  11. // TODO(billy): Make this a real link
  12. help: t(
  13. 'Enable this to receive notifications for Alerts sent to your teams. You will always receive alerts configured to be sent directly to you.'
  14. ),
  15. },
  16. workflowNotifications: {
  17. name: 'workflowNotifications',
  18. type: 'radio',
  19. label: t('Send Me Workflow Notifications'),
  20. choices: [
  21. [0, t('Always')],
  22. [1, t('Only On Issues I Subscribe To')],
  23. [2, t('Never')],
  24. ],
  25. help: t('E.g. changes in issue assignment, resolution status, and comments.'),
  26. },
  27. weeklyReports: {
  28. // Form is not visible because currently not implemented
  29. name: 'weeklyReports',
  30. type: 'boolean',
  31. label: t('Send Me Weekly Reports'),
  32. help: t("Reports contain a summary of what's happened within your organization."),
  33. disabled: true,
  34. },
  35. deployNotifications: {
  36. name: 'deployNotifications',
  37. type: 'radio',
  38. label: t('Send Me Deploy Notifications'),
  39. choices: [
  40. [2, t('Always')],
  41. [3, t('Only On Deploys With My Commits')],
  42. [4, t('Never')],
  43. ],
  44. help: t('Deploy emails include release, environment and commit overviews.'),
  45. },
  46. personalActivityNotifications: {
  47. name: 'personalActivityNotifications',
  48. type: 'boolean',
  49. label: t('Notify Me About My Own Activity'),
  50. help: t('Enable this to receive notifications about your own actions on Sentry.'),
  51. },
  52. selfAssignOnResolve: {
  53. name: 'selfAssignOnResolve',
  54. type: 'boolean',
  55. label: t("Claim Unassigned Issues I've Resolved"),
  56. help: t("You'll receive notifications about any changes that happen afterwards."),
  57. },
  58. };
  59. const formGroups: JsonFormObject[] = [
  60. {
  61. title: t('Alerts'),
  62. fields: [fields.subscribeByDefault],
  63. },
  64. {
  65. title: t('Workflow Notifications'),
  66. fields: [fields.workflowNotifications],
  67. },
  68. {
  69. title: t('Email Routing'),
  70. fields: [],
  71. },
  72. {
  73. title: t('Weekly Reports'),
  74. fields: [],
  75. },
  76. {
  77. title: t('Deploy Notifications'),
  78. fields: [fields.deployNotifications],
  79. },
  80. {
  81. title: t('My Activity'),
  82. fields: [fields.personalActivityNotifications, fields.selfAssignOnResolve],
  83. },
  84. ];
  85. export default formGroups;