pageload.tsx 2.6 KB

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