appStartup.tsx 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. import styled from '@emotion/styled';
  2. import Feature from 'sentry/components/acl/feature';
  3. import ErrorBoundary from 'sentry/components/errorBoundary';
  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 {space} from 'sentry/styles/space';
  12. import {PageAlert, PageAlertProvider} from 'sentry/utils/performance/contexts/pageAlert';
  13. import useOrganization from 'sentry/utils/useOrganization';
  14. import {ReleaseComparisonSelector} from 'sentry/views/starfish/components/releaseSelector';
  15. import {ROUTE_NAMES} from 'sentry/views/starfish/utils/routeNames';
  16. import AppStartup from 'sentry/views/starfish/views/appStartup';
  17. export default function InitializationModule() {
  18. const organization = useOrganization();
  19. return (
  20. <Feature features="starfish-mobile-appstart" organization={organization}>
  21. <SentryDocumentTitle title={ROUTE_NAMES['app-startup']} orgSlug={organization.slug}>
  22. <Layout.Page>
  23. <PageAlertProvider>
  24. <Layout.Header>
  25. <Layout.HeaderContent>
  26. <Layout.Title>{ROUTE_NAMES['app-startup']}</Layout.Title>
  27. </Layout.HeaderContent>
  28. </Layout.Header>
  29. <Layout.Body>
  30. <Layout.Main fullWidth>
  31. <PageAlert />
  32. <PageFiltersContainer>
  33. <Container>
  34. <PageFilterBar condensed>
  35. <ProjectPageFilter />
  36. <EnvironmentPageFilter />
  37. <DatePageFilter />
  38. </PageFilterBar>
  39. <ReleaseComparisonSelector />
  40. </Container>
  41. <ErrorBoundary mini>
  42. <AppStartup chartHeight={240} />
  43. </ErrorBoundary>
  44. </PageFiltersContainer>
  45. </Layout.Main>
  46. </Layout.Body>
  47. </PageAlertProvider>
  48. </Layout.Page>
  49. </SentryDocumentTitle>
  50. </Feature>
  51. );
  52. }
  53. const Container = styled('div')`
  54. display: grid;
  55. grid-template-rows: auto auto auto;
  56. gap: ${space(2)};
  57. margin-bottom: ${space(2)};
  58. @media (min-width: ${p => p.theme.breakpoints.large}) {
  59. grid-template-rows: auto;
  60. grid-template-columns: auto 1fr auto;
  61. }
  62. `;