DBModule.tsx 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 {StarfishPageFiltersContainer} from 'sentry/views/starfish/components/starfishPageFiltersContainer';
  13. import {StarfishProjectSelector} from 'sentry/views/starfish/components/starfishProjectSelector';
  14. import {ModuleName} from 'sentry/views/starfish/types';
  15. import {ROUTE_NAMES} from 'sentry/views/starfish/utils/routeNames';
  16. import SpansView from 'sentry/views/starfish/views/spans/spansView';
  17. export default function DBModule() {
  18. const organization = useOrganization();
  19. return (
  20. <SentryDocumentTitle title={ROUTE_NAMES.database} orgSlug={organization.slug}>
  21. <Layout.Page>
  22. <PageErrorProvider>
  23. <Layout.Header>
  24. <Layout.HeaderContent>
  25. <Layout.Title>{ROUTE_NAMES.database}</Layout.Title>
  26. </Layout.HeaderContent>
  27. </Layout.Header>
  28. <Layout.Body>
  29. <Layout.Main fullWidth>
  30. <PageErrorAlert />
  31. <StarfishPageFiltersContainer>
  32. <StyledPageFilterBar condensed>
  33. <StarfishProjectSelector />
  34. <StarfishDatePicker />
  35. </StyledPageFilterBar>
  36. <SpansView moduleName={ModuleName.DB} />
  37. </StarfishPageFiltersContainer>
  38. </Layout.Main>
  39. </Layout.Body>
  40. </PageErrorProvider>
  41. </Layout.Page>
  42. </SentryDocumentTitle>
  43. );
  44. }
  45. const StyledPageFilterBar = styled(PageFilterBar)`
  46. margin-bottom: ${space(2)};
  47. `;