index.tsx 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. import {Breadcrumbs} from 'sentry/components/breadcrumbs';
  2. import FeatureBadge from 'sentry/components/featureBadge';
  3. import * as Layout from 'sentry/components/layouts/thirds';
  4. import {DatePageFilter} from 'sentry/components/organizations/datePageFilter';
  5. import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
  6. import {t} from 'sentry/locale';
  7. import useOrganization from 'sentry/utils/useOrganization';
  8. import {normalizeUrl} from 'sentry/utils/withDomainRequired';
  9. import {PaddedContainer} from 'sentry/views/performance/browser/interactionsLandingPage';
  10. import {InteractionBreakdownChart} from 'sentry/views/performance/browser/interactionSummary/interactionBreakdownChart';
  11. import InteractionSampleTable from 'sentry/views/performance/browser/interactionSummary/sampleTable';
  12. import {getActionName} from 'sentry/views/performance/browser/interactionTable';
  13. import {
  14. BrowserStarfishFields,
  15. useBrowserModuleFilters,
  16. } from 'sentry/views/performance/browser/useBrowserFilters';
  17. import {ModulePageProviders} from 'sentry/views/performance/modulePageProviders';
  18. function InteractionSummary() {
  19. const organization = useOrganization();
  20. const browserFilters = useBrowserModuleFilters();
  21. const operation = browserFilters?.[BrowserStarfishFields.TRANSACTION_OP] ?? '';
  22. const page = browserFilters?.[BrowserStarfishFields.PAGE] ?? '';
  23. const element = browserFilters?.[BrowserStarfishFields.COMPONENT] ?? '';
  24. return (
  25. <ModulePageProviders
  26. title={[t('Performance'), t('Interactions')].join(' — ')}
  27. baseURL="/performance/browser/interactions"
  28. features="starfish-view"
  29. >
  30. <Layout.Header>
  31. <Layout.HeaderContent>
  32. <Breadcrumbs
  33. crumbs={[
  34. {
  35. label: 'Performance',
  36. to: normalizeUrl(`/organizations/${organization.slug}/performance/`),
  37. preservePageFilters: true,
  38. },
  39. {
  40. label: 'Interactions',
  41. to: normalizeUrl(
  42. `/organizations/${organization.slug}/performance/browser/interactions/`
  43. ),
  44. preservePageFilters: true,
  45. },
  46. {
  47. label: 'Interaction Summary',
  48. },
  49. ]}
  50. />
  51. <Layout.Title>
  52. {getActionName(browserFilters?.['transaction.op'] || '')}
  53. {` ${browserFilters.component} on ${browserFilters.page}`}
  54. <FeatureBadge type="alpha" />
  55. </Layout.Title>
  56. </Layout.HeaderContent>
  57. </Layout.Header>
  58. <Layout.Body>
  59. <Layout.Main fullWidth>
  60. <PaddedContainer>
  61. <PageFilterBar condensed>
  62. <DatePageFilter />
  63. </PageFilterBar>
  64. </PaddedContainer>
  65. <InteractionBreakdownChart
  66. operation={operation}
  67. page={page}
  68. element={element}
  69. />
  70. <InteractionSampleTable />
  71. </Layout.Main>
  72. </Layout.Body>
  73. </ModulePageProviders>
  74. );
  75. }
  76. export default InteractionSummary;