accountNotificationSettings.tsx 2.5 KB

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