cspReports.tsx 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // Export route to make these forms searchable by label/help
  2. import {JsonFormObject} from 'sentry/components/forms/type';
  3. import {t} from 'sentry/locale';
  4. export const route = '/settings/:orgId/projects/:projectId/csp/';
  5. const formGroups: JsonFormObject[] = [
  6. {
  7. // Form "section"/"panel"
  8. title: 'CSP Settings',
  9. fields: [
  10. {
  11. name: 'sentry:csp_ignored_sources_defaults',
  12. type: 'boolean',
  13. label: t('Use default ignored sources'),
  14. help: t(
  15. 'Our default list will attempt to ignore common issues and reduce noise.'
  16. ),
  17. getData: data => ({options: data}),
  18. },
  19. // XXX: Org details endpoints accept these multiline inputs as a list,
  20. // where as it looks like project details accepts it as a string with newlines
  21. {
  22. name: 'sentry:csp_ignored_sources',
  23. type: 'string',
  24. multiline: true,
  25. autosize: true,
  26. rows: 4,
  27. placeholder: 'e.g.\nfile://*\n*.example.com\nexample.com',
  28. label: t('Additional ignored sources'),
  29. help: t(
  30. 'Discard reports about requests from the given sources. Separate multiple entries with a newline.'
  31. ),
  32. extraHelp: t('Separate multiple entries with a newline.'),
  33. getData: data => ({options: data}),
  34. },
  35. ],
  36. },
  37. ];
  38. export default formGroups;