pageload.tsx 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. import styled from '@emotion/styled';
  2. import * as Layout from 'sentry/components/layouts/thirds';
  3. import PageFilterBar from 'sentry/components/organizations/pageFilterBar';
  4. import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
  5. import {space} from 'sentry/styles/space';
  6. import {
  7. PageErrorAlert,
  8. PageErrorProvider,
  9. } from 'sentry/utils/performance/contexts/pageError';
  10. import useOrganization from 'sentry/utils/useOrganization';
  11. import StarfishDatePicker from 'sentry/views/starfish/components/datePicker';
  12. import {ReleaseComparisonSelector} from 'sentry/views/starfish/components/releaseSelector';
  13. import {StarfishPageFiltersContainer} from 'sentry/views/starfish/components/starfishPageFiltersContainer';
  14. import {StarfishProjectSelector} from 'sentry/views/starfish/components/starfishProjectSelector';
  15. import {ROUTE_NAMES} from 'sentry/views/starfish/utils/routeNames';
  16. import {ScreensView, YAxis} from 'sentry/views/starfish/views/screens';
  17. export default function PageloadModule() {
  18. const organization = useOrganization();
  19. return (
  20. <SentryDocumentTitle title={ROUTE_NAMES.pageload} orgSlug={organization.slug}>
  21. <Layout.Page>
  22. <PageErrorProvider>
  23. <Layout.Header>
  24. <Layout.HeaderContent>
  25. <Layout.Title>{ROUTE_NAMES.pageload}</Layout.Title>
  26. </Layout.HeaderContent>
  27. </Layout.Header>
  28. <Layout.Body>
  29. <Layout.Main fullWidth>
  30. <PageErrorAlert />
  31. <StarfishPageFiltersContainer>
  32. <SearchContainerWithFilterAndMetrics>
  33. <PageFilterBar condensed>
  34. <StarfishProjectSelector />
  35. <StarfishDatePicker />
  36. </PageFilterBar>
  37. <ReleaseComparisonSelector />
  38. </SearchContainerWithFilterAndMetrics>
  39. <ScreensView yAxes={[YAxis.TTID, YAxis.TTFD]} />
  40. </StarfishPageFiltersContainer>
  41. </Layout.Main>
  42. </Layout.Body>
  43. </PageErrorProvider>
  44. </Layout.Page>
  45. </SentryDocumentTitle>
  46. );
  47. }
  48. const SearchContainerWithFilterAndMetrics = styled('div')`
  49. display: grid;
  50. grid-template-rows: auto auto auto;
  51. gap: ${space(2)};
  52. margin-bottom: ${space(2)};
  53. @media (min-width: ${p => p.theme.breakpoints.small}) {
  54. grid-template-rows: auto;
  55. grid-template-columns: auto 1fr auto;
  56. }
  57. `;