pageload.tsx 2.4 KB

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