index.tsx 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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/database/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 title={[t('Performance'), t('Interactions')].join(' — ')}>
  26. <Layout.Header>
  27. <Layout.HeaderContent>
  28. <Breadcrumbs
  29. crumbs={[
  30. {
  31. label: 'Performance',
  32. to: normalizeUrl(`/organizations/${organization.slug}/performance/`),
  33. preservePageFilters: true,
  34. },
  35. {
  36. label: 'Interactions',
  37. to: normalizeUrl(
  38. `/organizations/${organization.slug}/performance/browser/interactions/`
  39. ),
  40. preservePageFilters: true,
  41. },
  42. {
  43. label: 'Interaction Summary',
  44. },
  45. ]}
  46. />
  47. <Layout.Title>
  48. {getActionName(browserFilters?.['transaction.op'] || '')}
  49. {` ${browserFilters.component} on ${browserFilters.page}`}
  50. <FeatureBadge type="alpha" />
  51. </Layout.Title>
  52. </Layout.HeaderContent>
  53. </Layout.Header>
  54. <Layout.Body>
  55. <Layout.Main fullWidth>
  56. <PaddedContainer>
  57. <PageFilterBar condensed>
  58. <DatePageFilter />
  59. </PageFilterBar>
  60. </PaddedContainer>
  61. <InteractionBreakdownChart
  62. operation={operation}
  63. page={page}
  64. element={element}
  65. />
  66. <InteractionSampleTable />
  67. </Layout.Main>
  68. </Layout.Body>
  69. </ModulePageProviders>
  70. );
  71. }
  72. export default InteractionSummary;